From f3f9f7329396cd4f1407c5bab40edd5b3f827996 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 9 Jul 2026 11:14:40 +0000 Subject: [PATCH 1/2] ci: run crate tests with cargo-nextest Replace the `cargo test -p ev-cli -p ev-enclave` step in both `clippy_check_cli` jobs (lint-and-test-cli and release-cli-version-staging) with `cargo nextest run`, installing nextest via taiki-e/install-action. nextest runs each test in its own process, so the two enclave-build tests annotated with `#[serial_test::serial]` are no longer serialized by serial_test's in-process mutex. Add .config/nextest.toml with a `serial` test group (max-threads = 1) covering those tests to preserve the previous one-at-a-time behaviour. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01RQHtsSNmrd1N7QCVRhYXCv --- .config/nextest.toml | 19 +++++++++++++++++++ .github/workflows/lint-and-test-cli.yml | 4 +++- .../workflows/release-cli-version-staging.yml | 4 +++- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .config/nextest.toml diff --git a/.config/nextest.toml b/.config/nextest.toml new file mode 100644 index 00000000..441a07f3 --- /dev/null +++ b/.config/nextest.toml @@ -0,0 +1,19 @@ +# cargo-nextest configuration +# https://nexte.st/docs/configuration/ +# +# A handful of enclave-build tests are annotated with `#[serial_test::serial]` +# because they share process-wide state (they write `cert.pem`/`key.pem` into, +# and build from, the crate's working directory). `serial_test` enforces this +# with an in-process mutex, which works under `cargo test` because all tests run +# in a single process. +# +# nextest runs each test in its own process, so that in-process mutex no longer +# serializes anything. The `serial` test group below restores the guarantee by +# allowing at most one of these tests to run at a time across the whole run, +# mirroring the previous `cargo test` behaviour. +[test-groups] +serial = { max-threads = 1 } + +[[profile.default.overrides]] +filter = 'test(test_choose_output_dir) | test(test_reproducible_enclave_builds_with_pinned_version)' +test-group = 'serial' diff --git a/.github/workflows/lint-and-test-cli.yml b/.github/workflows/lint-and-test-cli.yml index 43a9e61e..697d5263 100644 --- a/.github/workflows/lint-and-test-cli.yml +++ b/.github/workflows/lint-and-test-cli.yml @@ -14,6 +14,8 @@ jobs: with: toolchain: stable components: rustfmt, clippy + - name: Install nextest + uses: taiki-e/install-action@nextest - name: Compile project run: cargo build - name: Prepare pcr-sign package for integration testing @@ -21,7 +23,7 @@ jobs: cd crates/pcr-sign sh ./scripts/generate-test-signature.sh - name: Test project - run: cargo test -p ev-cli -p ev-enclave + run: cargo nextest run -p ev-cli -p ev-enclave - name: Format project run: cargo fmt --check - name: Lint project diff --git a/.github/workflows/release-cli-version-staging.yml b/.github/workflows/release-cli-version-staging.yml index 2b07132f..2bfa73af 100644 --- a/.github/workflows/release-cli-version-staging.yml +++ b/.github/workflows/release-cli-version-staging.yml @@ -17,10 +17,12 @@ jobs: toolchain: stable override: true components: rustfmt, clippy + - name: Install nextest + uses: taiki-e/install-action@nextest - name: Compile project run: cargo build - name: Test project - run: cargo test -p ev-cli -p ev-enclave + run: cargo nextest run -p ev-cli -p ev-enclave - name: Format project run: cargo fmt --check - name: Lint project From d7b26a90dfb6dbf7821271769e56b141731b3417 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 9 Jul 2026 12:55:03 +0000 Subject: [PATCH 2/2] ci: run Rust compiler jobs on ev-runner-x-large Move the jobs that invoke the Rust compiler off ubuntu-latest onto the self-hosted ev-runner-x-large runner: - clippy_check_cli (lint-and-test-cli, release-cli-version-staging) - compile-ubuntu (build-and-publish) compile-macos stays on macos-latest since it builds the x86_64-apple-darwin target and needs a macOS host. Jobs that don't compile Rust (get-version, upload-artifacts-to-s3, release-cli-version) remain on ubuntu-latest. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01RQHtsSNmrd1N7QCVRhYXCv --- .github/workflows/build-and-publish.yml | 2 +- .github/workflows/lint-and-test-cli.yml | 2 +- .github/workflows/release-cli-version-staging.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 2e060902..4d1c1c8e 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -30,7 +30,7 @@ permissions: contents: read jobs: build-linux: - runs-on: ubuntu-latest + runs-on: ev-runner-x-large strategy: fail-fast: false matrix: diff --git a/.github/workflows/lint-and-test-cli.yml b/.github/workflows/lint-and-test-cli.yml index 697d5263..19a5cd38 100644 --- a/.github/workflows/lint-and-test-cli.yml +++ b/.github/workflows/lint-and-test-cli.yml @@ -4,7 +4,7 @@ name: Lint and Test crates jobs: clippy_check_cli: - runs-on: ubuntu-latest + runs-on: ev-runner-x-large steps: - uses: actions/checkout@v5 - uses: actions-hub/docker/cli@f5fdbfc3f9d2a9265ead8962c1314108a7b7ec5d diff --git a/.github/workflows/release-cli-version-staging.yml b/.github/workflows/release-cli-version-staging.yml index 2bfa73af..3e868340 100644 --- a/.github/workflows/release-cli-version-staging.yml +++ b/.github/workflows/release-cli-version-staging.yml @@ -6,7 +6,7 @@ on: jobs: clippy_check_cli: - runs-on: ubuntu-latest + runs-on: ev-runner-x-large steps: - uses: actions/checkout@v5 - uses: actions-hub/docker/cli@f5fdbfc3f9d2a9265ead8962c1314108a7b7ec5d