diff --git a/.github/workflows/test-and-lint.yml b/.github/workflows/test-and-lint.yml index ec1bbfe..db37363 100644 --- a/.github/workflows/test-and-lint.yml +++ b/.github/workflows/test-and-lint.yml @@ -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: @@ -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 @@ -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: >