diff --git a/.github/actions/build_env/action.yaml b/.github/actions/build_env/action.yaml index 28f86aeae..54c7fc8e2 100644 --- a/.github/actions/build_env/action.yaml +++ b/.github/actions/build_env/action.yaml @@ -34,12 +34,6 @@ runs: shell: bash run: rustup component add rustfmt clippy - - name: also rust cache - uses: Swatinem/rust-cache@v2.7.0 - with: - shared-key: "libra" - cache-on-failure: "true" - # call own action for libra_cli # known issue with needing to hard code the @version # https://github.com/orgs/community/discussions/41927 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 10c46fb94..f6d110041 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -47,12 +47,13 @@ jobs: - name: setup env uses: ./.github/actions/build_env - - uses: Swatinem/rust-cache@v2.7.3 + - uses: Swatinem/rust-cache@v2 with: shared-key: "libra-framework" cache-all-crates: true + cache-on-failure: true - # fail fast if types doesnt compile, everything else will fail. + # fail fast if types doesn't compile, everything else will fail. - name: types working-directory: ./types run: cargo test --no-fail-fast @@ -67,10 +68,11 @@ jobs: - name: setup env uses: ./.github/actions/build_env - - uses: Swatinem/rust-cache@v2.7.3 + - uses: Swatinem/rust-cache@v2 with: shared-key: "libra-framework" cache-all-crates: true + cache-on-failure: true - name: wallet if: always() @@ -94,10 +96,11 @@ jobs: name: framework-build path: framework/ - - uses: Swatinem/rust-cache@v2.7.3 + - uses: Swatinem/rust-cache@v2 with: shared-key: "libra-framework" cache-all-crates: true + cache-on-failure: true # Check test suite meta tests - name: smoke-tests # NOTE: needs working DIEM_FORGE_NODE_BIN_PATH @@ -114,10 +117,11 @@ jobs: - name: setup env uses: ./.github/actions/build_env - - uses: Swatinem/rust-cache@v2.7.3 + - uses: Swatinem/rust-cache@v2 with: shared-key: "libra-framework" cache-all-crates: true + cache-on-failure: true - uses: actions/download-artifact@v4.1.2 with: @@ -140,10 +144,11 @@ jobs: - name: setup env uses: ./.github/actions/build_env - - uses: Swatinem/rust-cache@v2.7.3 + - uses: Swatinem/rust-cache@v2 with: shared-key: "libra-framework" cache-all-crates: true + cache-on-failure: true - uses: actions/download-artifact@v4.1.2 with: @@ -165,10 +170,11 @@ jobs: - name: setup env uses: ./.github/actions/build_env - - uses: Swatinem/rust-cache@v2.7.3 + - uses: Swatinem/rust-cache@v2 with: shared-key: "libra-framework" cache-all-crates: true + cache-on-failure: true - uses: actions/download-artifact@v4.1.2 with: @@ -204,10 +210,14 @@ jobs: - name: setup env uses: ./.github/actions/build_env - - uses: Swatinem/rust-cache@v2.7.3 + - uses: Swatinem/rust-cache@v2 with: shared-key: "libra-framework" cache-all-crates: true + cache-on-failure: true + + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.7 - uses: actions/download-artifact@v4.1.2 with: @@ -258,17 +268,20 @@ jobs: - uses: actions/checkout@v3 - name: setup env - # if: ${{runner.environment == 'self-hosted'}} uses: ./.github/actions/build_env + - uses: Swatinem/rust-cache@v2 + with: + shared-key: "libra-framework" + cache-all-crates: true + cache-on-failure: true + - uses: actions/download-artifact@v4.1.2 - # if: ${{runner.environment == 'self-hosted'}} with: name: framework-build path: framework/ - name: rescue if: always() - # if: ${{runner.environment == 'self-hosted'}} working-directory: ./tools/rescue run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast -- --test-threads=1 storage: @@ -277,16 +290,18 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: setup env uses: ./.github/actions/build_env - - uses: Swatinem/rust-cache@v2.7.3 + - uses: Swatinem/rust-cache@v2 with: shared-key: "libra-framework" cache-all-crates: true + cache-on-failure: true + - name: storage working-directory: ./tools/storage - # TODO: not testing the V6 file parsing run: cargo test --no-fail-fast twin-testsuite: @@ -295,13 +310,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: setup env uses: ./.github/actions/build_env - - uses: Swatinem/rust-cache@v2.7.3 + - uses: Swatinem/rust-cache@v2 with: shared-key: "libra-framework" cache-all-crates: true + cache-on-failure: true + - name: twin working-directory: ./testsuites/twin run: cargo test --no-fail-fast diff --git a/.github/workflows/cleanliness.yaml b/.github/workflows/cleanliness.yaml index a355d226e..7062dd639 100644 --- a/.github/workflows/cleanliness.yaml +++ b/.github/workflows/cleanliness.yaml @@ -25,10 +25,11 @@ jobs: - name: setup env uses: ./.github/actions/build_env - - uses: Swatinem/rust-cache@v2.7.3 + - uses: Swatinem/rust-cache@v2 with: shared-key: "libra-framework" cache-all-crates: true + cache-on-failure: true - name: format uses: actions-rs/cargo@v1