@@ -148,7 +148,7 @@ jobs:
148
148
python3 -m venv .venv
149
149
. .venv/bin/activate
150
150
echo PATH=$PATH >> $GITHUB_ENV
151
- pip install ziglang==0.13.0 cargo-zigbuild==0.19.1
151
+ pip install ziglang==0.13.0.post1 cargo-zigbuild==0.19.8
152
152
- name : Setup Rust toolchain
153
153
uses : dtolnay/rust-toolchain@stable
154
154
with :
@@ -178,21 +178,26 @@ jobs:
178
178
matrix :
179
179
include :
180
180
- platform : ubuntu-latest
181
- target : x86_64-unknown-linux-gnu
181
+ target : x86_64-unknown-linux-gnu.2.31
182
+ target_base : x86_64-unknown-linux-gnu
182
183
name : linux-x86_64
183
184
packages : libgtk-3-dev
185
+ build : zigbuild
184
186
features : default
185
187
- platform : windows-latest
186
188
target : x86_64-pc-windows-msvc
187
189
name : windows-x86_64
190
+ build : build
188
191
features : default
189
192
- platform : macos-latest
190
193
target : x86_64-apple-darwin
191
194
name : macos-x86_64
195
+ build : build
192
196
features : default
193
197
- platform : macos-latest
194
198
target : aarch64-apple-darwin
195
199
name : macos-arm64
200
+ build : build
196
201
features : default
197
202
fail-fast : false
198
203
runs-on : ${{ matrix.platform }}
@@ -204,25 +209,32 @@ jobs:
204
209
sudo apt-get -y install ${{ matrix.packages }}
205
210
- name : Checkout
206
211
uses : actions/checkout@v4
212
+ - name : Install cargo-zigbuild
213
+ if : matrix.build == 'zigbuild'
214
+ run : |
215
+ python3 -m venv .venv
216
+ . .venv/bin/activate
217
+ echo PATH=$PATH >> $GITHUB_ENV
218
+ pip install ziglang==0.13.0.post1 cargo-zigbuild==0.19.8
207
219
- name : Setup Rust toolchain
208
220
uses : dtolnay/rust-toolchain@stable
209
221
with :
210
- targets : ${{ matrix.target }}
222
+ targets : ${{ matrix.target_base || matrix. target }}
211
223
- name : Cache Rust workspace
212
224
uses : Swatinem/rust-cache@v2
213
225
with :
214
226
key : ${{ matrix.target }}
215
227
- name : Cargo build
216
228
run : >
217
- cargo build --profile ${{ env.BUILD_PROFILE }} --target ${{ matrix.target }}
229
+ cargo ${{ matrix. build }} --profile ${{ env.BUILD_PROFILE }} --target ${{ matrix.target }}
218
230
--bin ${{ env.CARGO_BIN_NAME }} --features ${{ matrix.features }}
219
231
- name : Upload artifacts
220
232
uses : actions/upload-artifact@v4
221
233
with :
222
234
name : ${{ env.CARGO_BIN_NAME }}-${{ matrix.name }}
223
235
path : |
224
- target/${{ matrix.target }}/${{ env.BUILD_PROFILE }}/${{ env.CARGO_BIN_NAME }}
225
- target/${{ matrix.target }}/${{ env.BUILD_PROFILE }}/${{ env.CARGO_BIN_NAME }}.exe
236
+ target/${{ matrix.target_base || matrix. target }}/${{ env.BUILD_PROFILE }}/${{ env.CARGO_BIN_NAME }}
237
+ target/${{ matrix.target_base || matrix. target }}/${{ env.BUILD_PROFILE }}/${{ env.CARGO_BIN_NAME }}.exe
226
238
if-no-files-found : error
227
239
228
240
build-wasm :
0 commit comments