Skip to content

Commit

Permalink
nextest sharding
Browse files Browse the repository at this point in the history
  • Loading branch information
timbrinded committed Feb 13, 2025
1 parent 5d64d10 commit 7177751
Showing 1 changed file with 32 additions and 4 deletions.
36 changes: 32 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,7 @@ jobs:
body-path: runtime_size_report.md
edit-mode: replace

rust-test:
# This project is too large and exhausts the capacity of GH runners
rust-test-prepare:
runs-on: bare-metal
needs: ["set-tags", "build"]
env:
Expand All @@ -379,6 +378,8 @@ jobs:
RUSTC_WRAPPER: "sccache"
CARGO_INCREMENTAL: "0"
SCCACHE_CACHE_SIZE: "100GB"
SCCACHE_GHA_ENABLED: "true"
CARGO_TERM_COLOR: always
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -401,10 +402,37 @@ jobs:
uses: arduino/setup-protoc@v3
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Unit tests
run: cargo nextest run
- name: Build and archive tests
run: cargo nextest archive --release --archive-file nextest-archive.tar.zst
- name: Run sccache stat for check pre test
run: ${SCCACHE_PATH} --show-stats
- name: Upload archive to workflow
uses: actions/upload-artifact@v4
with:
name: nextest-archive
path: nextest-archive.tar.zst

rust-test-execute:
runs-on: ubuntu-latest
needs: ["rust-test-prepare"]
name: Run all tests (/w partitioning)
strategy:
fail-fast: false
matrix:
partition: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v4
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Download prepared test
uses: actions/download-artifact@v4
with:
name: nextest-archive
- name: Run Tests for All Projects!
run: |
~/.cargo/bin/cargo-nextest nextest run \
--archive-file nextest-archive.tar.zst \
--partition count:${{ matrix.partition }}/4
check-api-augment:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 7177751

Please sign in to comment.