@@ -148,7 +148,7 @@ jobs:
148148 python3 -m venv .venv
149149 . .venv/bin/activate
150150 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
152152 - name : Setup Rust toolchain
153153 uses : dtolnay/rust-toolchain@stable
154154 with :
@@ -178,21 +178,26 @@ jobs:
178178 matrix :
179179 include :
180180 - 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
182183 name : linux-x86_64
183184 packages : libgtk-3-dev
185+ build : zigbuild
184186 features : default
185187 - platform : windows-latest
186188 target : x86_64-pc-windows-msvc
187189 name : windows-x86_64
190+ build : build
188191 features : default
189192 - platform : macos-latest
190193 target : x86_64-apple-darwin
191194 name : macos-x86_64
195+ build : build
192196 features : default
193197 - platform : macos-latest
194198 target : aarch64-apple-darwin
195199 name : macos-arm64
200+ build : build
196201 features : default
197202 fail-fast : false
198203 runs-on : ${{ matrix.platform }}
@@ -204,25 +209,32 @@ jobs:
204209 sudo apt-get -y install ${{ matrix.packages }}
205210 - name : Checkout
206211 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
207219 - name : Setup Rust toolchain
208220 uses : dtolnay/rust-toolchain@stable
209221 with :
210- targets : ${{ matrix.target }}
222+ targets : ${{ matrix.target_base || matrix. target }}
211223 - name : Cache Rust workspace
212224 uses : Swatinem/rust-cache@v2
213225 with :
214226 key : ${{ matrix.target }}
215227 - name : Cargo build
216228 run : >
217- cargo build --profile ${{ env.BUILD_PROFILE }} --target ${{ matrix.target }}
229+ cargo ${{ matrix. build }} --profile ${{ env.BUILD_PROFILE }} --target ${{ matrix.target }}
218230 --bin ${{ env.CARGO_BIN_NAME }} --features ${{ matrix.features }}
219231 - name : Upload artifacts
220232 uses : actions/upload-artifact@v4
221233 with :
222234 name : ${{ env.CARGO_BIN_NAME }}-${{ matrix.name }}
223235 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
226238 if-no-files-found : error
227239
228240 build-wasm :
0 commit comments