diff --git a/.github/workflows/evm.yml b/.github/workflows/evm.yml index 0c2659c..aa7a71d 100644 --- a/.github/workflows/evm.yml +++ b/.github/workflows/evm.yml @@ -29,6 +29,10 @@ env: WASM_BUILD_CLEAN_TARGET: 1 # stripping symbols and optimizing for binary size RUSTFLAGS: -C strip=symbols -C opt-level=s + # Enable sscache + RUSTC_WRAPPER: "sccache" + SCCACHE_GHA_ENABLED: "true" + SCCACHE_CACHE_SIZE: "50GB" jobs: evm-clippy-fmt-test: @@ -52,6 +56,9 @@ jobs: - name: git checkout uses: actions/checkout@v4 + - name: Run sccache + uses: mozilla-actions/sccache-action@v0.0.4 + - name: Install Protoc uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9 # v2.0.0 with: @@ -59,27 +66,37 @@ jobs: - name: install rust toolchain uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + components: clippy, rustfmt - name: Install toml-sort run: cargo install --git https://github.com/4meta5/toml_sort + - name: Add file permissions for toml-sort run: chmod +x ./scripts/toml-sort.sh + - name: Add file permissions for check-toml-sorted run: chmod +x ./scripts/check-toml-sorted.sh + - name: Check Cargo.toml files are formatted using toml_sort run: ./scripts/check-toml-sorted.sh - name: Check format run: cargo fmt --all -- --check + - name: "Install nextest" + uses: taiki-e/install-action@v2 + with: + tool: cargo-nextest + - name: Run tests - run: cargo test --release + run: cargo nextest run --release - name: Check benchmarking compilation run: cargo check --release --features runtime-benchmarks - name: Run tests with async backing - run: cargo test --release --features="async-backing" + run: cargo nextest run --release --features="async-backing" - name: Check clippy run: cargo clippy --release --locked --all-targets -- -D warnings @@ -89,6 +106,7 @@ jobs: env: RUSTDOCFLAGS: "-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links" + # FIXME: Calculate coverage and define how to upload all template coverage reports - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 env: diff --git a/.github/workflows/generic.yml b/.github/workflows/generic.yml index 93b4db2..5d84d09 100644 --- a/.github/workflows/generic.yml +++ b/.github/workflows/generic.yml @@ -29,6 +29,10 @@ env: WASM_BUILD_CLEAN_TARGET: 1 # stripping symbols and optimizing for binary size RUSTFLAGS: -C strip=symbols -C opt-level=s + # Enable sscache + RUSTC_WRAPPER: "sccache" + SCCACHE_GHA_ENABLED: "true" + SCCACHE_CACHE_SIZE: "50GB" jobs: clippy-fmt-test: @@ -52,6 +56,9 @@ jobs: - name: git checkout uses: actions/checkout@v4 + - name: Run sccache + uses: mozilla-actions/sccache-action@v0.0.4 + - name: Install Protoc uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9 # v2.0.0 with: @@ -59,27 +66,37 @@ jobs: - name: install rust toolchain uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + components: clippy, rustfmt - name: Install toml-sort run: cargo install --git https://github.com/4meta5/toml_sort + - name: Add file permissions for toml-sort run: chmod +x ./scripts/toml-sort.sh + - name: Add file permissions for check-toml-sorted run: chmod +x ./scripts/check-toml-sorted.sh + - name: Check Cargo.toml files are formatted using toml_sort run: ./scripts/check-toml-sorted.sh + - name: "Install nextest" + uses: taiki-e/install-action@v2 + with: + tool: cargo-nextest + - name: Check format run: cargo fmt --all -- --check - name: Run tests - run: cargo test --release + run: cargo nextest run --release - name: Check benchmarking compilation run: cargo check --release --features runtime-benchmarks - name: Run tests with async backing - run: cargo test --release --features="async-backing" + run: cargo nextest run --release --features="async-backing" - name: Check clippy run: cargo clippy --release --locked --all-targets -- -D warnings @@ -89,6 +106,7 @@ jobs: env: RUSTDOCFLAGS: "-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links" + # FIXME: Calculate coverage and define how to upload all template coverage reports - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 env: