1
1
name : Build Package
2
2
on :
3
+ pull_request :
3
4
push :
4
5
branches :
5
6
- main
10
11
strategy :
11
12
fail-fast : false
12
13
matrix :
13
- os : [ubuntu-latest, ubuntu-arm, macos-intel, macos-arm, windows-latest]
14
+ os : [ubuntu-latest, ubuntu-arm, alpine-latest, macos-intel, macos-arm, windows-latest]
14
15
include :
15
16
- os : ubuntu-latest
16
17
out-file : libtemporal_sdk_bridge.so
25
26
# We use the Python manylinux image for glibc compatibility
26
27
container : quay.io/pypa/manylinux2014_aarch64
27
28
protobuf-url : https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protoc-22.3-linux-aarch_64.zip
29
+ - os : alpine-latest
30
+ out-file : libtemporal_sdk_bridge.so
31
+ out-prefix : linux-musl-x64
32
+ # Need Alpine container since GH runner doesn't have one
33
+ container : mcr.microsoft.com/dotnet/sdk:8.0-alpine
34
+ protobuf-url : https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protoc-22.3-linux-x86_64.zip
35
+ runsOn : ubuntu-latest
28
36
- os : macos-intel
29
37
out-file : libtemporal_sdk_bridge.dylib
30
38
out-prefix : osx-x64
68
76
if : ${{ !matrix.container }}
69
77
run : cargo build --manifest-path src/Temporalio/Bridge/Cargo.toml --release
70
78
71
- - name : Build (Docker)
72
- if : ${{ matrix.container }}
79
+ - name : Build (Docker non-Alpine )
80
+ if : ${{ matrix.container && matrix.os != 'alpine-latest' }}
73
81
run : |
74
82
docker run --rm -v "$(pwd):/workspace" -w /workspace \
75
83
${{ matrix.container }} \
82
90
&& cargo build --manifest-path src/Temporalio/Bridge/Cargo.toml --release \
83
91
'
84
92
93
+ - name : Build (Docker Alpine)
94
+ if : ${{ matrix.container && matrix.os == 'alpine-latest' }}
95
+ run : |
96
+ docker run --rm -v "$(pwd):/workspace" -w /workspace \
97
+ ${{ matrix.container }} \
98
+ sh -c ' \
99
+ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y \
100
+ && . $HOME/.cargo/env \
101
+ && rustup target add x86_64-unknown-linux-musl \
102
+ && apk add --no-cache build-base musl-dev musl-gcc \
103
+ && curl -LO ${{ matrix.protobuf-url }} \
104
+ && unzip protoc-*.zip -d /usr/local/protobuf \
105
+ && export PATH="$PATH:/usr/local/protobuf/bin" \
106
+ && cargo build --manifest-path src/Temporalio/Bridge/Cargo.toml --release --target x86_64-unknown-linux-musl \
107
+ '
108
+
85
109
- name : Upload bridge library
86
110
uses : actions/upload-artifact@v4
87
111
with :
@@ -129,15 +153,18 @@ jobs:
129
153
strategy :
130
154
fail-fast : false
131
155
matrix :
132
- os : [ubuntu-latest, ubuntu-arm, macos-intel, macos-arm, windows-latest]
156
+ os : [ubuntu-latest, ubuntu-arm, alpine-latest, macos-intel, macos-arm, windows-latest]
133
157
include :
134
158
- os : ubuntu-arm
135
159
runsOn : buildjet-4vcpu-ubuntu-2204-arm
160
+ - os : alpine-latest
161
+ container : mcr.microsoft.com/dotnet/sdk:8.0-alpine
136
162
- os : macos-intel
137
163
runsOn : macos-13
138
164
- os : macos-arm
139
165
runsOn : macos-14
140
166
runs-on : ${{ matrix.runsOn || matrix.os }}
167
+ container : ${{ matrix.container }}
141
168
steps :
142
169
- name : Checkout repository
143
170
uses : actions/checkout@v4
@@ -151,6 +178,7 @@ jobs:
151
178
path : nuget-package
152
179
153
180
- name : Setup .NET
181
+ if : ${{ !matrix.container }}
154
182
uses : actions/setup-dotnet@v4
155
183
with :
156
184
# Specific .NET version required because GitHub macos ARM image has
0 commit comments