diff --git a/.github/workflows/android-armv7.yml b/.github/workflows/android-armv7.yml index 82c64319..32afdc5c 100644 --- a/.github/workflows/android-armv7.yml +++ b/.github/workflows/android-armv7.yml @@ -40,6 +40,7 @@ jobs: path: | ~/.cargo/registry ~/.cargo/git + target key: stable-linux-android-armv7-node@16-cargo-cache - name: Cache NPM dependencies diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 73c817c4..968091b0 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -40,6 +40,7 @@ jobs: path: | ~/.cargo/registry ~/.cargo/git + target key: stable-linux-android-node@16-cargo-cache - name: Cache NPM dependencies diff --git a/.github/workflows/bench.yaml b/.github/workflows/bench.yaml index 757baaaa..a31a811c 100644 --- a/.github/workflows/bench.yaml +++ b/.github/workflows/bench.yaml @@ -38,6 +38,7 @@ jobs: path: | ~/.cargo/registry ~/.cargo/git + target key: bench-cargo-cache - name: Cache NPM dependencies diff --git a/.github/workflows/cli-binary.yml b/.github/workflows/cli-binary.yml index bd304067..278d0d75 100644 --- a/.github/workflows/cli-binary.yml +++ b/.github/workflows/cli-binary.yml @@ -36,6 +36,7 @@ jobs: path: | ~/.cargo/registry ~/.cargo/git + target key: stable-cargo-cache-build-binary - name: 'Install dependencies' diff --git a/.github/workflows/linux-armv7.yaml b/.github/workflows/linux-armv7.yaml index 69f3f66b..2a939465 100644 --- a/.github/workflows/linux-armv7.yaml +++ b/.github/workflows/linux-armv7.yaml @@ -33,26 +33,16 @@ jobs: toolchain: stable profile: minimal override: true - - - name: Install armv7 toolchain - run: rustup target add armv7-unknown-linux-gnueabihf - - - name: Generate Cargo.lock - uses: actions-rs/cargo@v1 - with: - command: generate-lockfile + target: armv7-unknown-linux-gnueabihf - name: Cache cargo uses: actions/cache@v2 with: - path: ~/.cargo/registry - key: stable-linux-armv7-gnu-node@16-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} - - - name: Cache cargo index - uses: actions/cache@v2 - with: - path: ~/.cargo/git - key: stable-linux-armv7-gnu-node@16-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: stable-linux-armv7-gnu-node@16-cargo-cache - name: Cache NPM dependencies uses: actions/cache@v2 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index dfed32cc..3230f94b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -43,6 +43,7 @@ jobs: path: | ~/.cargo/registry ~/.cargo/git + target key: stable-${{ matrix.os }}-node@${{ matrix.node }}-cargo-cache - name: Cache NPM dependencies @@ -69,8 +70,3 @@ jobs: yarn test --verbose env: RUST_BACKTRACE: 1 - - - name: Clear the cargo caches - run: | - cargo install cargo-cache --no-default-features --features ci-autoclean - cargo-cache diff --git a/.github/workflows/windows-arm.yml b/.github/workflows/windows-arm.yml index e7167d84..502f29f0 100644 --- a/.github/workflows/windows-arm.yml +++ b/.github/workflows/windows-arm.yml @@ -50,6 +50,7 @@ jobs: path: | ~/.cargo/registry ~/.cargo/git + target key: stable-windows-arm64-node@16-cargo-cache - name: Check build diff --git a/.github/workflows/windows-i686.yml b/.github/workflows/windows-i686.yml index 6eeb456e..92982591 100644 --- a/.github/workflows/windows-i686.yml +++ b/.github/workflows/windows-i686.yml @@ -49,14 +49,11 @@ jobs: - name: Cache cargo uses: actions/cache@v3 with: - path: ~/.cargo/registry - key: stable-windows-i686-node@lts-cargo-registry - - - name: Cache cargo index - uses: actions/cache@v3 - with: - path: ~/.cargo/git - key: stable-windows-i686-node@lts-cargo-index + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: stable-windows-i686-node@16-cargo-cache - name: Check build uses: actions-rs/cargo@v1 @@ -78,8 +75,3 @@ jobs: yarn test --verbose env: RUST_BACKTRACE: 1 - - - name: Clear the cargo caches - run: | - cargo install cargo-cache --no-default-features --features ci-autoclean - cargo-cache diff --git a/.github/workflows/zig.yaml b/.github/workflows/zig.yaml index 229c74af..4cd6e607 100644 --- a/.github/workflows/zig.yaml +++ b/.github/workflows/zig.yaml @@ -40,6 +40,14 @@ jobs: profile: minimal override: true target: ${{ matrix.target }} + - name: Cache cargo + uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: stable-zig-${{ matrix.target }}-cargo-cache - name: Install aarch64 toolchain run: rustup target add aarch64-unknown-linux-gnu - name: Install ziglang @@ -50,7 +58,7 @@ jobs: uses: actions/cache@v3 with: path: .yarn/cache - key: npm-cache-linux-aarch64-gnu-node@16 + key: npm-cache-ubuntu-latest-gnu-node@16 - name: Install dependencies run: yarn install --immutable --mode=skip-build - name: 'Build TypeScript'