10
10
strategy :
11
11
fail-fast : false
12
12
matrix :
13
- os : [ubuntu-latest, ubuntu-arm, macos-intel, macos-arm, windows-latest]
13
+ os : [ubuntu-latest, ubuntu-arm, alpine-latest, macos-intel, macos-arm, windows-latest]
14
14
include :
15
15
- os : ubuntu-latest
16
16
out-file : libtemporal_sdk_bridge.so
25
25
# We use the Python manylinux image for glibc compatibility
26
26
container : quay.io/pypa/manylinux2014_aarch64
27
27
protobuf-url : https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protoc-22.3-linux-aarch_64.zip
28
+ - os : alpine-latest
29
+ out-file : libtemporal_sdk_bridge.so
30
+ out-prefix : linux-musl-x64
31
+ # Need Alpine container since GH runner doesn't have one
32
+ container : mcr.microsoft.com/dotnet/sdk:8.0-alpine
33
+ protobuf-url : https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protoc-22.3-linux-x86_64.zip
34
+ runsOn : ubuntu-latest
28
35
- os : macos-intel
29
36
out-file : libtemporal_sdk_bridge.dylib
30
37
out-prefix : osx-x64
68
75
if : ${{ !matrix.container }}
69
76
run : cargo build --manifest-path src/Temporalio/Bridge/Cargo.toml --release
70
77
71
- - name : Build (Docker)
72
- if : ${{ matrix.container }}
78
+ - name : Build (Docker non-Alpine )
79
+ if : ${{ matrix.container && matrix.os != 'alpine-latest' }}
73
80
run : |
74
81
docker run --rm -v "$(pwd):/workspace" -w /workspace \
75
82
${{ matrix.container }} \
@@ -82,11 +89,27 @@ jobs:
82
89
&& cargo build --manifest-path src/Temporalio/Bridge/Cargo.toml --release \
83
90
'
84
91
92
+ - name : Build (Docker Alpine)
93
+ if : ${{ matrix.container && matrix.os == 'alpine-latest' }}
94
+ run : |
95
+ docker run --rm -v "$(pwd):/workspace" -w /workspace \
96
+ ${{ matrix.container }} \
97
+ sh -c ' \
98
+ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y \
99
+ && . $HOME/.cargo/env \
100
+ && apk add --no-cache build-base \
101
+ && curl -LO ${{ matrix.protobuf-url }} \
102
+ && unzip protoc-*.zip -d /usr/local/protobuf \
103
+ && export PATH="$PATH:/usr/local/protobuf/bin" \
104
+ && RUSTFLAGS="-C target-feature=-crt-static" cargo build --manifest-path src/Temporalio/Bridge/Cargo.toml --release \
105
+ '
106
+
85
107
- name : Upload bridge library
86
108
uses : actions/upload-artifact@v4
87
109
with :
88
110
name : ${{ matrix.out-prefix }}-bridge
89
111
path : src/Temporalio/Bridge/target/release/${{ matrix.out-file }}
112
+ if-no-files-found : error
90
113
91
114
build-nuget-package :
92
115
needs :
@@ -129,15 +152,19 @@ jobs:
129
152
strategy :
130
153
fail-fast : false
131
154
matrix :
132
- os : [ubuntu-latest, ubuntu-arm, macos-intel, macos-arm, windows-latest]
155
+ os : [ubuntu-latest, ubuntu-arm, alpine-latest, macos-intel, macos-arm, windows-latest]
133
156
include :
134
157
- os : ubuntu-arm
135
158
runsOn : buildjet-4vcpu-ubuntu-2204-arm
159
+ - os : alpine-latest
160
+ container : mcr.microsoft.com/dotnet/sdk:6.0-alpine
161
+ runsOn : ubuntu-latest
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
@@ -148,18 +175,30 @@ jobs:
148
175
uses : actions/download-artifact@v4
149
176
with :
150
177
name : nuget-package
151
- path : nuget-package
178
+ path : ${{ github.workspace }}/ nuget-package
152
179
153
- - name : Setup .NET
180
+ - name : Setup .NET (non-Alpine)
154
181
uses : actions/setup-dotnet@v4
182
+ if : ${{ matrix.os != 'alpine-latest' }}
155
183
with :
156
184
# Specific .NET version required because GitHub macos ARM image has
157
185
# bad pre-installed .NET version
158
186
dotnet-version : 6.x
159
187
160
- - name : Run smoke test
188
+ - name : Setup .NET (Alpine)
189
+ if : ${{ matrix.os == 'alpine-latest' }}
190
+ run : apk add dotnet6-sdk
191
+
192
+ - name : Run smoke test (non-Windows)
193
+ if : ${{ matrix.os != 'windows-latest' }}
194
+ run : |
195
+ dotnet add tests/Temporalio.SmokeTest package Temporalio -s "$GITHUB_WORKSPACE/nuget-package/Temporalio/bin/Release;https://api.nuget.org/v3/index.json" --prerelease
196
+ dotnet run --project tests/Temporalio.SmokeTest
197
+
198
+ - name : Run smoke test (Windows)
199
+ if : ${{ matrix.os == 'windows-latest' }}
161
200
run : |
162
- dotnet add tests/Temporalio.SmokeTest package Temporalio -s "${{ github.workspace }} /nuget-package/Temporalio/bin/Release;https://api.nuget.org/v3/index.json" --prerelease
201
+ dotnet add tests/Temporalio.SmokeTest package Temporalio -s "$env:GITHUB_WORKSPACE /nuget-package/Temporalio/bin/Release;https://api.nuget.org/v3/index.json" --prerelease
163
202
dotnet run --project tests/Temporalio.SmokeTest
164
203
165
204
- name : Setup msbuild (Windows only)
@@ -169,6 +208,6 @@ jobs:
169
208
- name : Run .NET framework smoke test (Windows only)
170
209
if : ${{ matrix.os == 'windows-latest' }}
171
210
run : |
172
- dotnet add tests/Temporalio.SmokeTestDotNetFramework package Temporalio -s "${{ github.workspace }} /nuget-package/Temporalio/bin/Release;https://api.nuget.org/v3/index.json" --prerelease
211
+ dotnet add tests/Temporalio.SmokeTestDotNetFramework package Temporalio -s "$env:GITHUB_WORKSPACE /nuget-package/Temporalio/bin/Release;https://api.nuget.org/v3/index.json" --prerelease
173
212
msbuild tests/Temporalio.SmokeTestDotNetFramework -t:restore,build -p:Platform=x64
174
213
tests/Temporalio.SmokeTestDotNetFramework/bin/x64/Debug/Temporalio.SmokeTestDotNetFramework.exe
0 commit comments