1- # This file was autogenerated by dist: https://opensource.axo.dev /cargo-dist/
1+ # This file was autogenerated by dist: https://axodotdev.github.io /cargo-dist
22#
33# Copyright 2022-2024, axodotdev
44# SPDX-License-Identifier: MIT or Apache-2.0
4747jobs :
4848 # Run 'dist plan' (or host) to determine what tasks we need to do
4949 plan :
50- runs-on : " ubuntu-20 .04"
50+ runs-on : " ubuntu-22 .04"
5151 outputs :
5252 val : ${{ steps.plan.outputs.manifest }}
5353 tag : ${{ !github.event.pull_request && github.ref_name || '' }}
@@ -56,16 +56,17 @@ jobs:
5656 env :
5757 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5858 steps :
59- - uses : actions/checkout@v4
59+ - uses : actions/checkout@v6
6060 with :
61+ persist-credentials : false
6162 submodules : recursive
6263 - name : Install dist
6364 # we specify bash to get pipefail; it guards against the `curl` command
6465 # failing. otherwise `sh` won't catch that `curl` returned non-0
6566 shell : bash
66- run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.24.1 /cargo-dist-installer.sh | sh"
67+ run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.31.0 /cargo-dist-installer.sh | sh"
6768 - name : Cache dist
68- uses : actions/upload-artifact@v4
69+ uses : actions/upload-artifact@v6
6970 with :
7071 name : cargo-dist-cache
7172 path : ~/.cargo/bin/dist
8182 cat plan-dist-manifest.json
8283 echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT"
8384 - name : " Upload dist-manifest.json"
84- uses : actions/upload-artifact@v4
85+ uses : actions/upload-artifact@v6
8586 with :
8687 name : artifacts-plan-dist-manifest
8788 path : plan-dist-manifest.json
@@ -107,21 +108,47 @@ jobs:
107108 # - N "local" tasks that build each platform's binaries and platform-specific installers
108109 matrix : ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix }}
109110 runs-on : ${{ matrix.runner }}
111+ container : ${{ matrix.container && matrix.container.image || null }}
110112 env :
111113 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
112114 BUILD_MANIFEST_NAME : target/distrib/${{ join(matrix.targets, '-') }}-dist-manifest.json
113115 steps :
114116 - name : enable windows longpaths
115117 run : |
116118 git config --global core.longpaths true
117- - uses : actions/checkout@v4
119+ - uses : actions/checkout@v6
118120 with :
121+ persist-credentials : false
119122 submodules : recursive
123+ - name : Install Rust non-interactively if not already installed
124+ if : ${{ matrix.container }}
125+ run : |
126+ if ! command -v cargo > /dev/null 2>&1; then
127+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
128+ echo "$HOME/.cargo/bin" >> $GITHUB_PATH
129+ fi
130+ - name : " Use portable Cargo config for CI builds"
131+ run : |
132+ set -euo pipefail
133+ cp .cargo/config-portable.toml .cargo/config.toml
134+ shell : " bash"
135+ - name : " Force AVX2 for x86_64 (via RUSTFLAGS)"
136+ if : " contains(join(matrix.targets, ','), 'x86_64-')"
137+ run : |
138+ set -euo pipefail
139+ echo 'RUSTFLAGS=-C target-cpu=x86-64-v3 -C target-feature=+avx2' >> "$GITHUB_ENV"
140+ shell : " bash"
141+ - name : " Show effective x86_64 rustflags (proof)"
142+ if : " contains(join(matrix.targets, ','), 'x86_64-')"
143+ run : |
144+ set -euo pipefail
145+ echo "RUSTFLAGS=${RUSTFLAGS-}"
146+ shell : " bash"
120147 - name : Install dist
121- run : ${{ matrix.install_dist }}
148+ run : ${{ matrix.install_dist.run }}
122149 # Get the dist-manifest
123150 - name : Fetch local artifacts
124- uses : actions/download-artifact@v4
151+ uses : actions/download-artifact@v7
125152 with :
126153 pattern : artifacts-*
127154 path : target/distrib/
@@ -143,12 +170,12 @@ jobs:
143170 run : |
144171 # Parse out what we just built and upload it to scratch storage
145172 echo "paths<<EOF" >> "$GITHUB_OUTPUT"
146- jq --raw-output ".upload_files[]" dist-manifest.json >> "$GITHUB_OUTPUT"
173+ dist print-upload-files-from-manifest --manifest dist-manifest.json >> "$GITHUB_OUTPUT"
147174 echo "EOF" >> "$GITHUB_OUTPUT"
148175
149176 cp dist-manifest.json "$BUILD_MANIFEST_NAME"
150177 - name : " Upload artifacts"
151- uses : actions/upload-artifact@v4
178+ uses : actions/upload-artifact@v6
152179 with :
153180 name : artifacts-build-local-${{ join(matrix.targets, '_') }}
154181 path : |
@@ -160,23 +187,24 @@ jobs:
160187 needs :
161188 - plan
162189 - build-local-artifacts
163- runs-on : " ubuntu-20 .04"
190+ runs-on : " ubuntu-22 .04"
164191 env :
165192 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
166193 BUILD_MANIFEST_NAME : target/distrib/global-dist-manifest.json
167194 steps :
168- - uses : actions/checkout@v4
195+ - uses : actions/checkout@v6
169196 with :
197+ persist-credentials : false
170198 submodules : recursive
171199 - name : Install cached dist
172- uses : actions/download-artifact@v4
200+ uses : actions/download-artifact@v7
173201 with :
174202 name : cargo-dist-cache
175203 path : ~/.cargo/bin/
176204 - run : chmod +x ~/.cargo/bin/dist
177205 # Get all the local artifacts for the global tasks to use (for e.g. checksums)
178206 - name : Fetch local artifacts
179- uses : actions/download-artifact@v4
207+ uses : actions/download-artifact@v7
180208 with :
181209 pattern : artifacts-*
182210 path : target/distrib/
@@ -194,7 +222,7 @@ jobs:
194222
195223 cp dist-manifest.json "$BUILD_MANIFEST_NAME"
196224 - name : " Upload artifacts"
197- uses : actions/upload-artifact@v4
225+ uses : actions/upload-artifact@v6
198226 with :
199227 name : artifacts-build-global
200228 path : |
@@ -206,26 +234,27 @@ jobs:
206234 - plan
207235 - build-local-artifacts
208236 - build-global-artifacts
209- # Only run if we're "publishing", and only if local and global didn't fail (skipped is fine)
210- if : ${{ always() && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }}
237+ # Only run if we're "publishing", and only if plan, local and global didn't fail (skipped is fine)
238+ if : ${{ always() && needs.plan.result == 'success' && needs.plan. outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }}
211239 env :
212240 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
213- runs-on : " ubuntu-20 .04"
241+ runs-on : " ubuntu-22 .04"
214242 outputs :
215243 val : ${{ steps.host.outputs.manifest }}
216244 steps :
217- - uses : actions/checkout@v4
245+ - uses : actions/checkout@v6
218246 with :
247+ persist-credentials : false
219248 submodules : recursive
220249 - name : Install cached dist
221- uses : actions/download-artifact@v4
250+ uses : actions/download-artifact@v7
222251 with :
223252 name : cargo-dist-cache
224253 path : ~/.cargo/bin/
225254 - run : chmod +x ~/.cargo/bin/dist
226255 # Fetch artifacts from scratch-storage
227256 - name : Fetch artifacts
228- uses : actions/download-artifact@v4
257+ uses : actions/download-artifact@v7
229258 with :
230259 pattern : artifacts-*
231260 path : target/distrib/
@@ -238,14 +267,14 @@ jobs:
238267 cat dist-manifest.json
239268 echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
240269 - name : " Upload dist-manifest.json"
241- uses : actions/upload-artifact@v4
270+ uses : actions/upload-artifact@v6
242271 with :
243272 # Overwrite the previous copy
244273 name : artifacts-dist-manifest
245274 path : dist-manifest.json
246275 # Create a GitHub Release while uploading all files to it
247276 - name : " Download GitHub Artifacts"
248- uses : actions/download-artifact@v4
277+ uses : actions/download-artifact@v7
249278 with :
250279 pattern : artifacts-*
251280 path : artifacts
@@ -274,10 +303,11 @@ jobs:
274303 # still allowing individual publish jobs to skip themselves (for prereleases).
275304 # "host" however must run to completion, no skipping allowed!
276305 if : ${{ always() && needs.host.result == 'success' }}
277- runs-on : " ubuntu-20 .04"
306+ runs-on : " ubuntu-22 .04"
278307 env :
279308 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
280309 steps :
281- - uses : actions/checkout@v4
310+ - uses : actions/checkout@v6
282311 with :
312+ persist-credentials : false
283313 submodules : recursive
0 commit comments