Skip to content

Commit

Permalink
Reuse CI cache for MacOS too
Browse files Browse the repository at this point in the history
This will hopefully make CI cache actually be reused by MacOS, which
before that was always restarting from scratch and thus ended up being
the last one to complete.
  • Loading branch information
Ekleog-NEAR committed Nov 7, 2023
1 parent 3ff4e11 commit f690968
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43
with:
prefix-key: "0" # change this to invalidate CI cache
shared-key: "cargo_nextest"
shared-key: "cargo_nextest-linux"
save-if: "false" # use the cache from nextest, but don’t double-save
- run: cargo build --locked --profile quick-release -p neard --bin neard
- uses: actions/upload-artifact@v3
Expand All @@ -35,12 +35,15 @@ jobs:
matrix:
include:
- name: Linux
cache_id: linux
os: ubuntu-22.04-16core
flags: ""
- name: Linux Nightly
cache_id: linux
os: ubuntu-22.04-16core
flags: "--features nightly,test_features"
- name: MacOS
cache_id: macos
os: macos-latest-xlarge
# FIXME: some of these tests don't work very well on MacOS at the moment. Should fix
# them at earliest convenience :)
Expand All @@ -61,6 +64,7 @@ jobs:
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43
with:
prefix-key: "0" # change this to invalidate CI cache
shared-key: "cargo_nextest-${{ matrix.cache_id }}"
- run: cargo nextest run --locked --workspace -p '*' --cargo-profile quick-release --profile ci ${{ matrix.flags }}
env:
RUST_BACKTRACE: short
Expand Down Expand Up @@ -135,7 +139,7 @@ jobs:
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43
with:
prefix-key: "0" # change this to invalidate CI cache
shared-key: "cargo_nextest"
shared-key: "cargo_nextest-linux"
save-if: "false" # use the cache from nextest, but don’t double-save
- run: pip3 install --user -r pytest/requirements.txt
# This is the only job that uses `--features nightly` so we build this in-line instead of a
Expand Down Expand Up @@ -212,7 +216,7 @@ jobs:
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43
with:
prefix-key: "0" # change this to invalidate CI cache
shared-key: "cargo_nextest"
shared-key: "cargo_nextest-linux"
save-if: "false" # use the cache from nextest, but don’t double-save
- run: ./chain/jsonrpc/build_errors_schema.sh
- run: git diff --quiet ./chain/jsonrpc/res/rpc_errors_schema.json || exit 1

0 comments on commit f690968

Please sign in to comment.