Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update artifacts actions to v4 #107

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,13 @@ jobs:
- rust-ci
- check-inputs
steps:
- name: Download Artifacts
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # pin@v3
- name: Download Rust Artifacts
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # pin@v4.1.7
with:
name: artifacts
# didn't specify artifact name, so all artifacts are downloaded and merged
# into the `artifacts` dir
path: artifacts
merge-multiple: true

- name: List Downloaded Artifacts
run: ls -aRsh artifacts
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/rust-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,29 +179,33 @@ jobs:
run: |
nix develop -c scripts/rust_ci_helper.py \
build_linux_artifacts \
--out_dir linux_artifacts \
--out_dir artifacts_linux \
--cargo_profile ${CI_PROFILE}
ls -aRsh linux_artifacts
ls -aRsh artifacts_linux

- name: Bundle artifacts
run: |
set -Eeuxo pipefail
mkdir final_artifacts
for b in linux_artifacts/*; do
mkdir artifacts_bundled
for b in artifacts_linux/*; do
b="$(basename ${b})"
# We make sure that the tarball is idempotent:
# https://stackoverflow.com/a/54908072
tar --sort=name --owner=root:0 --group=root:0 --mtime='@0' \
-vahcf final_artifacts/${b}.tar.zst -C linux_artifacts/${b} .
-vahcf artifacts_bundled/${b}.tar.zst -C artifacts_linux/${b} .
done
ls -aRsh final_artifacts
ls -aRsh artifacts_bundled

- name: Upload artifacts
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # pin@v3
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # pin@v4.3.3
with:
name: artifacts
path: final_artifacts
# upload v4 doesn't support writing multiple times to the same artifact name.
# so its important that we name it after the workflow and not something
# general like "artifacts"
name: rust
path: artifacts_bundled
if-no-files-found: error
retention-days: 14

cargo-deny:
name: Check licensing
Expand Down
Loading