From e1e91d2f99fd358e9ea14b3f310e10aab2d3d6c1 Mon Sep 17 00:00:00 2001 From: dubbelosix Date: Tue, 10 Oct 2023 16:17:15 +0530 Subject: [PATCH 1/4] separate out nextest and test --- .github/workflows/rust.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 78f544e61..12c32562c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -118,8 +118,8 @@ jobs: # intentionally no target specifier; see https://github.com/jonhoo/rust-ci-conf/pull/4 - name: cargo hack run: make check-features - test: - name: test + nextest: + name: nextest runs-on: buildjet-16vcpu-ubuntu-2204 timeout-minutes: 60 steps: @@ -127,11 +127,11 @@ jobs: - uses: rui314/setup-mold@v1 - name: Install Rust run: rustup show - # `cargo-nextest` is much faster than standard `cargo test`. - name: Install cargo-risc0 # Risc0 v0.17 and higher require a cargo extension to build the guest code run: cargo install cargo-risczero - name: Install risc0-zkvm toolchain # Use the risc0 cargo extension to install the risc0 std library for the current toolchain run: cargo risczero install + # `cargo-nextest` is much faster than standard `cargo test`. - uses: taiki-e/install-action@nextest - uses: Swatinem/rust-cache@v2 with: @@ -139,6 +139,24 @@ jobs: shared-key: cargo-build save-if: ${{ github.ref == 'refs/heads/nightly' }} - run: cargo nextest run --workspace --all-features + test: + name: test + runs-on: buildjet-16vcpu-ubuntu-2204 + timeout-minutes: 60 + steps: + - uses: actions/checkout@v3 + - uses: rui314/setup-mold@v1 + - name: Install Rust + run: rustup show + - name: Install cargo-risc0 # Risc0 v0.17 and higher require a cargo extension to build the guest code + run: cargo install cargo-risczero + - name: Install risc0-zkvm toolchain # Use the risc0 cargo extension to install the risc0 std library for the current toolchain + run: cargo risczero install + - uses: Swatinem/rust-cache@v2 + with: + cache-provider: "buildjet" + shared-key: cargo-build + save-if: ${{ github.ref == 'refs/heads/nightly' }} # `cargo-nextest` does not support doctests (yet?), so we have to run them # separately. # TODO: https://github.com/nextest-rs/nextest/issues/16 From db3501ce57fb0c085b3176f574ebeec2a56007e2 Mon Sep 17 00:00:00 2001 From: dubbelosix Date: Tue, 10 Oct 2023 16:38:36 +0530 Subject: [PATCH 2/4] testing after removing the cache since steps are in separate jobs now --- .github/workflows/rust.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 12c32562c..07f198a19 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -133,11 +133,6 @@ jobs: run: cargo risczero install # `cargo-nextest` is much faster than standard `cargo test`. - uses: taiki-e/install-action@nextest - - uses: Swatinem/rust-cache@v2 - with: - cache-provider: "buildjet" - shared-key: cargo-build - save-if: ${{ github.ref == 'refs/heads/nightly' }} - run: cargo nextest run --workspace --all-features test: name: test @@ -152,11 +147,6 @@ jobs: run: cargo install cargo-risczero - name: Install risc0-zkvm toolchain # Use the risc0 cargo extension to install the risc0 std library for the current toolchain run: cargo risczero install - - uses: Swatinem/rust-cache@v2 - with: - cache-provider: "buildjet" - shared-key: cargo-build - save-if: ${{ github.ref == 'refs/heads/nightly' }} # `cargo-nextest` does not support doctests (yet?), so we have to run them # separately. # TODO: https://github.com/nextest-rs/nextest/issues/16 From b5a1caff0e798bf08d3ddc6625243ac0c2ce85ba Mon Sep 17 00:00:00 2001 From: dubbelosix Date: Tue, 10 Oct 2023 16:40:04 +0530 Subject: [PATCH 3/4] remove just the shared-key from the CI config --- .github/workflows/rust.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 07f198a19..d71bb5016 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -133,6 +133,10 @@ jobs: run: cargo risczero install # `cargo-nextest` is much faster than standard `cargo test`. - uses: taiki-e/install-action@nextest + - uses: Swatinem/rust-cache@v2 + with: + cache-provider: "buildjet" + save-if: ${{ github.ref == 'refs/heads/nightly' }} - run: cargo nextest run --workspace --all-features test: name: test @@ -147,6 +151,10 @@ jobs: run: cargo install cargo-risczero - name: Install risc0-zkvm toolchain # Use the risc0 cargo extension to install the risc0 std library for the current toolchain run: cargo risczero install + - uses: Swatinem/rust-cache@v2 + with: + cache-provider: "buildjet" + save-if: ${{ github.ref == 'refs/heads/nightly' }} # `cargo-nextest` does not support doctests (yet?), so we have to run them # separately. # TODO: https://github.com/nextest-rs/nextest/issues/16 From 6f09f5b9b2e0732d54e87c96b1c3f8467eafbacc Mon Sep 17 00:00:00 2001 From: dubbelosix Date: Tue, 10 Oct 2023 17:00:56 +0530 Subject: [PATCH 4/4] switch cores for test back to 4 vcpu --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d71bb5016..d1eee5923 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -120,7 +120,7 @@ jobs: run: make check-features nextest: name: nextest - runs-on: buildjet-16vcpu-ubuntu-2204 + runs-on: buildjet-4vcpu-ubuntu-2204 timeout-minutes: 60 steps: - uses: actions/checkout@v3 @@ -140,7 +140,7 @@ jobs: - run: cargo nextest run --workspace --all-features test: name: test - runs-on: buildjet-16vcpu-ubuntu-2204 + runs-on: buildjet-4vcpu-ubuntu-2204 timeout-minutes: 60 steps: - uses: actions/checkout@v3