Skip to content

Commit 93104da

Browse files
Capture and upload cargo --timings for ci builds (#5643)
# Description of Changes To inform our build caching strategy. Captures and uploads `--timings` for smoketest builds and lints. This is part of the work to break up #5612 into smaller reviewable chunks. # API and ABI breaking changes None # Expected complexity level and risk 1 # Testing N/A
1 parent 5aceaad commit 93104da

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,14 @@ jobs:
240240
}
241241
cargo ci smoketests -- --test-threads=1
242242
243+
- name: Upload Cargo timing reports
244+
if: always()
245+
uses: actions/upload-artifact@v4
246+
with:
247+
name: cargo-timings-smoketests-${{ matrix.name }}
248+
path: ${{ github.workspace }}/target/cargo-timings/
249+
retention-days: 30
250+
243251
# this is a no-op version of the above check with a trivially-passing body.
244252
# we can't just let the check be entirely skipped because each matrix target is a required check,
245253
# and skipping this check means that the matrix isn't "populated" so the required checks wouldn't be met.
@@ -504,6 +512,14 @@ jobs:
504512
- name: Run ci lint
505513
run: cargo ci lint
506514

515+
- name: Upload public lint Cargo timing reports
516+
if: always()
517+
uses: actions/upload-artifact@v4
518+
with:
519+
name: cargo-timings-public-lints
520+
path: ${{ github.workspace }}/target/cargo-timings/
521+
retention-days: 30
522+
507523
wasm_bindings:
508524
needs: [merge_queue_noop]
509525
if: ${{ needs.merge_queue_noop.outputs.skip != 'true' }}

tools/ci/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,7 @@ fn main() -> Result<()> {
612612
cmd!(
613613
"cargo",
614614
"clippy",
615+
"--timings",
615616
"--all",
616617
"--tests",
617618
"--benches",
@@ -623,6 +624,7 @@ fn main() -> Result<()> {
623624
cmd!(
624625
"cargo",
625626
"clippy",
627+
"--timings",
626628
"--no-default-features",
627629
"--features=browser",
628630
"-pspacetimedb-sdk",

tools/ci/src/smoketest.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ fn build_binaries() -> Result<()> {
7676
let mut cmd = Command::new("cargo");
7777
cmd.args([
7878
"build",
79+
"--timings",
7980
"--release",
8081
"-p",
8182
"spacetimedb-cli",
@@ -120,6 +121,7 @@ fn build_precompiled_modules() -> Result<()> {
120121
let status = Command::new("cargo")
121122
.args([
122123
"build",
124+
"--timings",
123125
"--workspace",
124126
"--release",
125127
"--target",

0 commit comments

Comments
 (0)