Skip to content

Commit

Permalink
CI: use actions/cache for release
Browse files Browse the repository at this point in the history
This partially reverts 37a1b06.
  • Loading branch information
YtvwlD committed Jun 23, 2024
1 parent b84e6ec commit e5bb8f4
Showing 1 changed file with 24 additions and 19 deletions.
43 changes: 24 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@nightly
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
uses: actions/cache@v4
with:
shared-key: cargo-${{ vars.GITHUB_RUN_ID }}-${{ hashFiles('**/Cargo.lock') }}
cache-all-crates: true
cache-on-failure: true
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-${{ vars.GITHUB_RUN_ID }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install qemu
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends qemu-system-x86
run: sudo apt-get update && sudo apt-get install -y qemu-system-x86
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
Expand All @@ -37,14 +38,15 @@ jobs:
needs: test
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@nightly
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
uses: actions/cache@v4
with:
shared-key: cargo-${{ vars.GITHUB_RUN_ID }}-${{ hashFiles('**/Cargo.lock') }}
cache-all-crates: true
cache-on-failure: true
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-${{ vars.GITHUB_RUN_ID }}-${{ hashFiles('**/Cargo.lock') }}
- name: Build for i686
uses: clechasseur/rs-cargo@v2
with:
Expand Down Expand Up @@ -97,16 +99,19 @@ jobs:
needs: release
steps:
- uses: actions/checkout@v4
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-${{ vars.GITHUB_RUN_ID }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust for x86_64-apple and aarch64-apple
uses: dtolnay/rust-toolchain@nightly
with:
targets: x86_64-apple-darwin, aarch64-apple-darwin
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
shared-key: cargo-${{ vars.GITHUB_RUN_ID }}-${{ hashFiles('**/Cargo.lock') }}
cache-all-crates: true
cache-on-failure: true
- name: Build towbootctl for x86_64-apple
uses: clechasseur/rs-cargo@v2
with:
Expand Down

0 comments on commit e5bb8f4

Please sign in to comment.