Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rust-cache for github actions #36

Merged
merged 5 commits into from
Jun 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions .github/workflows/test-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ jobs:
build:
name: "Test and Lint"
runs-on: ubuntu-latest
env:
NIGHTLY: nightly-2023-06-04 # Fix version to prevent cache misses with nightly changes
steps:
- name: Free up space on runner
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

- name: Rust Setup
uses: actions-rs/toolchain@v1
with:
Expand All @@ -23,13 +28,6 @@ jobs:
override: true
components: rustfmt, clippy

- name: Install Nightly
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.NIGHTLY }}
target: wasm32-unknown-unknown

- name: Install protoc
run: |
sudo apt-get install -y protobuf-compiler
Expand All @@ -44,15 +42,21 @@ jobs:
command: fmt
args: --all --check

- name: Rust Cache
uses: Swatinem/rust-cache@v2.5.0
with:
cache-on-failure: true
cache-all-crates: true

- name: Check Build
run: |
SKIP_WASM_BUILD=1 cargo check --release
cargo check --release

- name: Run tests
run: cargo test --locked --verbose --all

- name: Clean compilation artifacts
run: cargo clean
- name: Check try-runtime build
run: cargo check --release --features=try-runtime

- name: Ensure benchmarking compiles
run: >
Expand Down