Skip to content

Commit 44d5b99

Browse files
authored
Add CI profile (#3737)
<!-- Reference any GitHub issues resolved by this PR --> Closes # ## Introduced changes <!-- A brief description of the changes --> - ## Checklist <!-- Make sure all of these are complete --> - [ ] Linked relevant issue - [ ] Updated relevant documentation - [ ] Added relevant tests - [ ] Performed self-review of the code - [ ] Added changes to `CHANGELOG.md`
1 parent 9e5444b commit 44d5b99

File tree

6 files changed

+33
-18
lines changed

6 files changed

+33
-18
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
2323
- uses: software-mansion/setup-scarb@v1
2424
- uses: software-mansion/setup-universal-sierra-compiler@v1
25-
- run: cargo test --release --lib -p forge
25+
- run: cargo test --profile ci --lib -p forge
2626

2727
build-test-forge-nextest-archive:
2828
runs-on: ubuntu-latest
@@ -37,7 +37,7 @@ jobs:
3737
with:
3838
3939
- name: Build and archive tests
40-
run: cargo nextest archive --release -p forge --features skip_plugin_checks --archive-file 'nextest-archive-${{ runner.os }}.tar.zst'
40+
run: cargo nextest archive --cargo-profile ci -p forge --features skip_plugin_checks --archive-file 'nextest-archive-${{ runner.os }}.tar.zst'
4141
- name: Upload archive to workflow
4242
uses: actions/upload-artifact@v4
4343
with:
@@ -157,8 +157,8 @@ jobs:
157157
- uses: software-mansion/setup-scarb@v1
158158
- uses: software-mansion/setup-universal-sierra-compiler@v1
159159

160-
- run: cargo test --release --package forge --features interact-with-state --test main integration::interact_with_state
161-
- run: cargo test --release --package forge --features interact-with-state --test main e2e::running::test_interact_with_state
160+
- run: cargo test --profile ci --package forge --features interact-with-state --test main integration::interact_with_state
161+
- run: cargo test --profile ci --package forge --features interact-with-state --test main e2e::running::test_interact_with_state
162162

163163
test-forge-runner:
164164
name: Test Forge Runner
@@ -167,7 +167,7 @@ jobs:
167167
- uses: actions/checkout@v5
168168
- uses: dtolnay/rust-toolchain@stable
169169
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
170-
- run: cargo test --release -p forge_runner
170+
- run: cargo test --profile ci -p forge_runner
171171

172172
test-cheatnet:
173173
name: Test Cheatnet
@@ -179,7 +179,7 @@ jobs:
179179
- uses: software-mansion/setup-scarb@v1
180180
- uses: software-mansion/setup-universal-sierra-compiler@v1
181181
- name: Run Cheatnet tests
182-
run: cargo test --release -p cheatnet
182+
run: cargo test --profile ci -p cheatnet
183183

184184
test-data-transformer:
185185
name: Test Data Transformer
@@ -189,7 +189,7 @@ jobs:
189189
- uses: dtolnay/rust-toolchain@stable
190190
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
191191
- name: Run Data Transformer tests
192-
run: cargo test --release -p data-transformer
192+
run: cargo test --profile ci -p data-transformer
193193

194194
test-forge-debugging:
195195
name: Test Forge Debugging
@@ -201,7 +201,7 @@ jobs:
201201
- uses: software-mansion/setup-scarb@v1
202202
- uses: software-mansion/setup-universal-sierra-compiler@58146c4184fa6ec5e8aaf02309ab85e35f782ed0 # v1.0.0
203203
- name: Run Forge Debugging tests
204-
run: cargo test --release -p forge --features debugging --test main e2e::debugging
204+
run: cargo test --profile ci -p forge --features debugging --test main e2e::debugging
205205

206206
test-forge-scarb-plugin:
207207
name: Test Forge Scarb Plugin
@@ -214,7 +214,7 @@ jobs:
214214
- uses: software-mansion/setup-universal-sierra-compiler@v1
215215
- name: Run Forge Scarb Plugin tests
216216
working-directory: crates/snforge-scarb-plugin
217-
run: cargo test --release
217+
run: cargo test --profile ci
218218

219219
test-forge-scarb-plugin-deprecated:
220220
name: Test Forge Scarb Plugin Deprecated
@@ -227,7 +227,7 @@ jobs:
227227
- uses: software-mansion/setup-universal-sierra-compiler@v1
228228
- name: Run Forge Scarb Plugin tests
229229
working-directory: crates/snforge-scarb-plugin-deprecated
230-
run: cargo test --release
230+
run: cargo test --profile ci
231231

232232
test-cast:
233233
name: Test Cast
@@ -242,7 +242,7 @@ jobs:
242242
- uses: software-mansion/setup-scarb@v1
243243
- uses: software-mansion/setup-universal-sierra-compiler@v1
244244
- name: Run tests
245-
run: cargo test --release -p sncast
245+
run: cargo test --profile ci -p sncast
246246

247247
test-conversions:
248248
name: Test Conversions
@@ -254,7 +254,7 @@ jobs:
254254
toolchain: stable
255255
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
256256
- name: Run tests
257-
run: cargo test --release -p conversions
257+
run: cargo test --profile ci -p conversions
258258

259259
test-shared:
260260
name: Test Shared
@@ -263,7 +263,7 @@ jobs:
263263
- uses: actions/checkout@v5
264264
- uses: dtolnay/rust-toolchain@stable
265265
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
266-
- run: cargo test --release -p shared
266+
- run: cargo test --profile ci -p shared
267267

268268
test-scarb-api:
269269
name: Test Scarb Api
@@ -275,7 +275,7 @@ jobs:
275275
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
276276
- uses: software-mansion/setup-scarb@v1
277277
- uses: software-mansion/setup-universal-sierra-compiler@v1
278-
- run: cargo test --release -p scarb-api
278+
- run: cargo test --profile ci -p scarb-api
279279

280280
scarbfmt:
281281
runs-on: ubuntu-latest

.github/workflows/scheduled.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ jobs:
4848
scarb-version: ${{ matrix.version }}
4949
- uses: software-mansion/setup-universal-sierra-compiler@v1
5050

51-
- run: cargo test --release --lib -p forge
52-
- run: cargo test --release -p forge integration --features assert_non_exact_gas
51+
- run: cargo test --profile ci --lib -p forge
52+
- run: cargo test --profile ci -p forge integration --features assert_non_exact_gas
5353

5454
test-forge-e2e:
5555
if: github.event.repository.fork == false
@@ -91,7 +91,7 @@ jobs:
9191
run: |
9292
curl -L https://raw.githubusercontent.com/software-mansion/cairo-coverage/main/scripts/install.sh | sh
9393
94-
- run: cargo test --release -p forge --features skip_plugin_checks e2e
94+
- run: cargo test --profile ci -p forge --features skip_plugin_checks e2e
9595

9696
test-cast:
9797
if: github.event.repository.fork == false
@@ -121,7 +121,7 @@ jobs:
121121
tool_versions: |
122122
starknet-devnet ${{ steps.get-devnet-version.outputs.version }}
123123
124-
- run: cargo test --release -p sncast
124+
- run: cargo test --profile ci -p sncast
125125

126126
get-version:
127127
name: Get current foundry version

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ members = [
2121

2222
exclude = ["crates/snforge-scarb-plugin", "crates/snforge-scarb-plugin-deprecated"]
2323

24+
[profile.ci]
25+
inherits = "release"
26+
debug-assertions = true
27+
2428
[workspace.package]
2529
version = "0.49.0"
2630
edition = "2024"

crates/snforge-scarb-plugin-deprecated/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ rust-version = "1.80.1"
88
[lib]
99
crate-type = ["rlib", "cdylib"]
1010

11+
[profile.ci]
12+
inherits = "release"
13+
debug-assertions = true
14+
1115
[dependencies]
1216
cairo-lang-macro = "=0.1.0"
1317
cairo-lang-parser = "=2.10.1"

crates/snforge-scarb-plugin/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ rust-version = "1.87.0"
88
[lib]
99
crate-type = ["rlib", "cdylib"]
1010

11+
[profile.ci]
12+
inherits = "release"
13+
debug-assertions = true
14+
1115
[dependencies]
1216
cairo-lang-macro = "0.2.1"
1317
cairo-lang-parser = "2.12.0"

rust-toolchain.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[toolchain]
2+
channel = "1.89"
3+
components = ["rustfmt", "clippy"]

0 commit comments

Comments
 (0)