diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d780cea..fad5268 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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: @@ -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: