From 12151f51251d6b8dfd4df94467475465c8cfb810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=96R=C3=96K=20Attila?= Date: Fri, 16 Feb 2024 15:57:43 +0100 Subject: [PATCH] ci: Add a dedicated Cargo profile, test with that --- .github/workflows/test_rust.yml | 4 ++-- Cargo.toml | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_rust.yml b/.github/workflows/test_rust.yml index 95a13b39836d..03730d9bf14c 100644 --- a/.github/workflows/test_rust.yml +++ b/.github/workflows/test_rust.yml @@ -76,13 +76,13 @@ jobs: if: runner.os != 'macOS' # TODO: Disallow retries in general once we can allow only after SIGABRT. # See: https://github.com/nextest-rs/nextest/issues/1172 - run: cargo nextest run --workspace --locked --no-fail-fast --retries 2 -j 4 --features imgtests,lzma,jpegxr + run: cargo nextest run --cargo-profile ci --workspace --locked --no-fail-fast --retries 2 -j 4 --features imgtests,lzma,jpegxr env: XDG_RUNTIME_DIR: '' # dummy value, just to silence warnings about it missing - name: Run tests without image tests if: runner.os == 'macOS' - run: cargo nextest run --workspace --locked --no-fail-fast -j 4 --features lzma,jpegxr + run: cargo nextest run --cargo-profile ci --workspace --locked --no-fail-fast -j 4 --features lzma,jpegxr env: XDG_RUNTIME_DIR: '' # dummy value, just to silence warnings about it missing diff --git a/Cargo.toml b/Cargo.toml index c40e2dd4b569..484503e446b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -97,3 +97,10 @@ inherits = "release" [profile.web-wasm-extensions] inherits = "release" + +[profile.ci] +inherits = "release" +opt-level = 2 +debug-assertions = true +overflow-checks = true +incremental = true