ci: warm the build cache after the build, link Windows with rust-lld, start the slowest tests first

This commit is contained in:
aiongg committed 2026-11-18 14:49:57 +00:00
1 parent 50fd4baa93
commit 53936661ef
2 files changed
+39 -1

No files matched your search

+27
View File
@@ -54,3 +54,30 @@ test-group = 'gpu'
platform = 'cfg(unix)'
filter = 'package(craft-video) & kind(test)'
test-group = 'video-integration'
# Slowest tests first (priority runs higher values earlier), so the longest ones start at the
# beginning of the run instead of holding the tail. Every test that took over 30 s in the gate's
# run on next (run 44318177438, Linux); the first tier is the one over 60 s.
[[profile.ci.overrides]]
filter = '(package(craft-media) & test(=mxf::tests::hostile::hostile_input_never_panics)) | (package(craft-table) & test(/CellGrid.*::drives$/)) | (package(craft-proto) & test(=imap::gmail_labels_tests::a_mailbox_claimed_huge_cant_fill_memory_with_flags))'
priority = 20
[[profile.ci.overrides]]
filter = '''
(package(craft-design-lint) & test(=mapped_crates_have_no_findings))
| (package(craft-ui-widgets) & test(/SwatchTable.*::activation$/))
| (package(craft-table) & test(/CellGrid.*::activation$/))
| (package(craft-pkcs7) & test(=crypto::new_digital_ids_are_self_signed_and_survive_a_p12_round_trip))
| (package(craft-image-codecs) & test(=tiff_bands::a_blank_fax_page_wider_than_4096_px_passes_the_bomb_guard))
| (package(craft-image-codecs) & test(=codecs::png::streamed_tests::streamed_rows_match_the_whole_image_encoder))
| (package(craft-image-codecs) & test(=codecs::png::parallel_tests::the_parallel_encoder_gives_the_same_bytes_on_any_thread_count))
| (package(craft-image-codecs) & test(=limits::highly_compressible_jpeg_and_gif_still_decode))
| (package(craft-color-ui) & test(=integration::sampling::an_invalid_capture_ends_the_pick_with_a_status))
| (package(craft-docx) & test(=read::chart::tests::hostile_radar_charts_never_panic))
| (package(craft-drawingml) & test(=chart::chartex_tests::large_box_hierarchy_and_stacked_charts_take_linear_work))
| (package(craft-audio) & test(=integration::flac_decode::hostile_input_is_an_error_not_a_panic))
| (package(craft-docx) & test(=comment_save_cost::many_comments_save_without_quadratic_id_searches))
| (package(craft-ui-widgets) & test(/menu::popup::Menu.*::activation$/))
| (package(craft-scraft-format) & test(=b64::tests::size_cap_counts_the_partial_quartet))
'''
priority = 10
+12 -1
View File
@@ -25,7 +25,8 @@ concurrency:
jobs:
native:
name: Workspace
uses: storytold/craft-common-actions/.github/workflows/gate.yml@main
# craft-common-actions#270 (warm-command). Back to @main once it merges.
uses: storytold/craft-common-actions/.github/workflows/gate.yml@a24d4fc3de6488ecd028ea46aee0bf0f1834b07c
with:
# Pushes to next run Linux only.
os: ${{ github.ref == 'refs/heads/next' && '["ubuntu-latest"]' || '["ubuntu-latest","windows-latest","macos-latest"]' }}
@@ -44,9 +45,13 @@ jobs:
# No debuginfo on Windows: writing PDBs for every test binary is a large part of its link
# time. A panic still names its file and line; only backtrace frames lose theirs, and the
# Linux and macOS legs keep line tables.
# rust-lld links the test binaries faster than link.exe; /OPT:NOICF skips identical-code
# folding and /DEBUG:NONE writes no PDB, both of which only cost link time here.
windows-env: |
CRAFT_PRINT_REQUIRE_QUEUE=1
CARGO_PROFILE_DEV_DEBUG=0
CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER=rust-lld
CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_RUSTFLAGS=-Clink-arg=/OPT:NOICF -Clink-arg=/DEBUG:NONE
# The fuzz-style tests run a fraction of their cases here: every hostile-input hammer and
# sweep 1/8 (craft-testkit's CRAFT_HOSTILE_DIVISOR), every proptest without its own case
# count 64 cases instead of 256. nightly.yml runs them all in full.
@@ -69,6 +74,12 @@ jobs:
cargo fmt --check
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
# A push to main builds the gate's test binaries in their own leg and saves the cache right
# after, so a failing test no longer keeps the cache from being saved. The same two builds
# the gate's nextest runs do (all features; the two crates with default features).
warm-command: |
cargo test --workspace --no-run --all-features --locked
cargo test -p craft-image-codecs -p craft-text --no-run --locked
command: |
# The tests run once, with every feature, in parallel across test binaries; nextest skips
# doctests, so `cargo test --doc` runs them. The default-feature compile is the lint leg's