Skip to content

Commit 0472356

Browse files
authored
Use cargo --timings to create a report about compile time for the largest CI jobs (#9906)
This uses cargo --timings to create an HTML report attached to the workflow showing all the different items in the job and how long they take to compile. For now this is only used on the build_and_test matrix.
1 parent 72e4ae5 commit 0472356

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
toolchain: ${{ matrix.rust_version }}
113113
key: x-v3
114114
- name: Run tests
115-
run: cargo test --verbose --all-features --workspace ${{ matrix.extra_args }} ${{ matrix.maybe_exclude_bevy }} --exclude slint-node --exclude pyslint --exclude test-driver-node --exclude slint-node --exclude test-driver-nodejs --exclude test-driver-cpp --exclude mcu-board-support --exclude mcu-embassy --exclude printerdemo_mcu --exclude uefi-demo --exclude slint-cpp --exclude slint-python -- --skip=_qt::t
115+
run: cargo test --verbose --all-features --workspace --timings ${{ matrix.extra_args }} ${{ matrix.maybe_exclude_bevy }} --exclude slint-node --exclude pyslint --exclude test-driver-node --exclude slint-node --exclude test-driver-nodejs --exclude test-driver-cpp --exclude mcu-board-support --exclude mcu-embassy --exclude printerdemo_mcu --exclude uefi-demo --exclude slint-cpp --exclude slint-python -- --skip=_qt::t
116116
env:
117117
SLINT_CREATE_SCREENSHOTS: 1
118118
shell: bash
@@ -124,6 +124,13 @@ jobs:
124124
SLINT_LIVE_PREVIEW: 1
125125
run: cargo test --verbose --features=build-time,slint/live-preview -p test-driver-rust -- --skip=_qt::t
126126
shell: bash
127+
- name: Upload build timing report
128+
if: always()
129+
uses: actions/upload-artifact@v4
130+
with:
131+
name: cargo-timings-${{ matrix.os }}-${{ matrix.rust_version }}
132+
path: target/cargo-timings/cargo-timing.html
133+
if-no-files-found: ignore
127134
- name: Archive screenshots after failed tests
128135
if: ${{ failure() }}
129136
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)