From ce2d6b641a2dfe760e25643556b94f1ba81fcb60 Mon Sep 17 00:00:00 2001 From: "Mitchell R. Vollger" Date: Thu, 13 Aug 2026 15:06:41 -0700 Subject: [PATCH] ci: cache cargo artifacts, parallelize jobs and tests - Swatinem/rust-cache in the compiling jobs: every run previously cold-compiled the full dependency tree (including rust-htslib's C build) three times. - Drop 'needs: Formatting' so Testing no longer queues behind a 10-second job. - Drop --test-threads=1: it dates to the original 2022 CI template, predating the tempfile-based regression harness; current tests are parallel-safe (unique tempfiles, read-only fixtures). - Replace archived actions-rs/toolchain with dtolnay/rust-toolchain and bump checkout to v4. Co-Authored-By: Claude Fable 5 --- .github/workflows/CI.yml | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ff2aee33..28eddc52 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,13 +11,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install stable toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - override: true components: rustfmt - name: Check format @@ -27,33 +25,33 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install stable toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - override: true components: clippy + - name: Cache cargo artifacts + uses: Swatinem/rust-cache@v2 + - name: Lint with clippy run: cargo clippy -p fibertools-rs Testing: - needs: Formatting runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + uses: dtolnay/rust-toolchain@stable + + - name: Cache cargo artifacts + uses: Swatinem/rust-cache@v2 - name: Run test - run: cargo test -p fibertools-rs -- --test-threads=1 + run: cargo test -p fibertools-rs - name: Run molecular-annotation tests run: cargo test -p molecular-annotation --features htslib