Skip to content

Commit 72d1ff1

Browse files
claudebranchseer
authored andcommitted
Revert --release tests; optimize insta/similar in dev profile instead
Full --release builds are 3-5x slower due to compilation overhead. Instead, follow oxc's approach: optimize only the snapshot testing dependencies (insta, similar) at opt-level=3 in dev profile. This speeds up snapshot diffing without penalizing compile times. https://claude.ai/code/session_01MM41gBUbWHBiX8Skve91rG
1 parent 872af4b commit 72d1ff1

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ jobs:
127127
# Must run after setup-node so correct native binaries are installed
128128
- run: pnpm install
129129

130-
- run: cargo test --release --target ${{ matrix.target }}
130+
- run: cargo test --target ${{ matrix.target }}
131131
if: ${{ matrix.os != 'ubuntu-latest' }}
132132

133-
- run: cargo-zigbuild test --release --target x86_64-unknown-linux-gnu.2.17
133+
- run: cargo-zigbuild test --target x86_64-unknown-linux-gnu.2.17
134134
if: ${{ matrix.os == 'ubuntu-latest' }}
135135

136136
test-musl:
@@ -175,7 +175,7 @@ jobs:
175175
corepack enable
176176
pnpm install
177177
178-
- run: cargo test --release
178+
- run: cargo test
179179

180180
fmt:
181181
name: Format and Check Deps

Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,13 @@ ignored = [
167167
# and we don't rely on it for debugging that much.
168168
debug = false
169169

170+
# Optimize snapshot testing dependencies in dev/test builds.
171+
# Snapshot diffing (insta + similar) is CPU-intensive; optimizing them
172+
# speeds up test runs without the compile-time cost of a full release build.
173+
[profile.dev.package]
174+
insta.opt-level = 3
175+
similar.opt-level = 3
176+
170177
[profile.release]
171178
# Configurations explicitly listed here for clarity.
172179
# Using the best options for performance.

0 commit comments

Comments
 (0)