diff --git a/.config/nextest.toml b/.config/nextest.toml index 128a76cf9..fd2a37223 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -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 diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index ce5136b11..e99cae401 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -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