Skip to content

Commit 6211e52

Browse files
committed
ci: optimizations
1 parent ecd5cea commit 6211e52

File tree

2 files changed

+24
-16
lines changed

2 files changed

+24
-16
lines changed

.config/nextest.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ failure-output = "immediate"
4040
# [profile.ci]
4141
# CI/CD optimized profile
4242
[profile.ci]
43-
retries = 2
43+
retries = { backoff = "fixed", count = 1, delay = "1s" }
4444
fail-fast = false
4545
status-level = "fail"
4646
success-output = "never"

.github/workflows/ci.yml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -160,18 +160,18 @@ jobs:
160160
with:
161161
toolchain: stable
162162

163-
- name: Install development tools via Mise
164-
uses: step-security/mise-action@2fa1b2b4fa1577588d8ac75f4dfa0f67c266d2a0 # v3.4.1
165-
with:
166-
install_args: protobuf
167-
cache: true
168-
169163
- name: Install mold linker
170164
run: |
171165
sudo apt-get update -qq
172166
sudo apt-get install -y -qq mold
173167
mold --version
174168
169+
- name: Install development tools via Mise
170+
uses: step-security/mise-action@2fa1b2b4fa1577588d8ac75f4dfa0f67c266d2a0 # v3.4.1
171+
with:
172+
install_args: protobuf cargo:cargo-nextest
173+
cache: true
174+
175175
- name: Install FoundationDB client library
176176
run: |
177177
wget -q https://github.com/apple/foundationdb/releases/download/7.3.69/foundationdb-clients_7.3.69-1_amd64.deb
@@ -189,13 +189,20 @@ jobs:
189189
- name: Build workspace (debug)
190190
run: cargo build --workspace
191191

192-
- name: Build tests (no run)
193-
run: cargo test --workspace --no-run
192+
- name: Build and archive tests for downstream jobs
193+
run: cargo nextest archive --workspace --archive-file nextest-archive.tar.zst
194+
195+
- name: Upload nextest archive
196+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
197+
with:
198+
name: nextest-archive
199+
path: nextest-archive.tar.zst
200+
retention-days: 1
194201

195202
- name: Print sccache stats
196203
run: sccache --show-stats
197204

198-
# Run tests (reuses build cache)
205+
# Run tests (uses pre-built archive from build job)
199206
test:
200207
name: Tests
201208
needs: build
@@ -237,16 +244,17 @@ jobs:
237244
wget -q https://github.com/apple/foundationdb/releases/download/7.3.69/foundationdb-clients_7.3.69-1_amd64.deb
238245
sudo dpkg -i foundationdb-clients_7.3.69-1_amd64.deb
239246
240-
- name: Restore build cache
241-
uses: step-security/rust-cache@f8fba7098297c8c53a7c9a30575ec2ad4ad85056 # v2.8.2
247+
- name: Download nextest archive
248+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
242249
with:
243-
shared-key: management-ubuntu-latest-x86_64-unknown-linux-gnu
244-
save-if: false # Don't save, only restore from build job
250+
name: nextest-archive
245251

246-
- name: Run tests with nextest
247-
run: cargo nextest run --workspace --profile ci --no-fail-fast
252+
- name: Run tests from archive
253+
run: cargo nextest run --archive-file nextest-archive.tar.zst --profile ci --no-fail-fast
248254

249255
- name: Run doc tests
256+
env:
257+
RUSTFLAGS: "" # Avoid parallel LLVM linking OOM
250258
run: cargo test --workspace --doc
251259

252260
- name: Publish test results

0 commit comments

Comments
 (0)