Skip to content

Commit

Permalink
add ci profile and use it in GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbepop committed Nov 5, 2024
1 parent 1f8ff6d commit 994f061
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
--lib
--no-default-features
--target x86_64-unknown-none
--profile ci
--verbose
- name: Build (no_std + hash-collections)
run: >-
Expand All @@ -45,6 +46,7 @@ jobs:
--no-default-features
--features hash-collections
--target x86_64-unknown-none
--profile ci
--verbose
- name: Build (no_std + wasm32)
run: >-
Expand All @@ -55,6 +57,7 @@ jobs:
--lib
--no-default-features
--target wasm32-unknown-unknown
--profile ci
--verbose
- name: Build (CMake)
run: |
Expand All @@ -79,11 +82,17 @@ jobs:
- name: Build Tests
env:
RUSTFLAGS: "-C debug-assertions -Zsanitizer=address"
run: cargo build --tests --workspace --locked -Zbuild-std --target x86_64-unknown-linux-gnu --verbose
run: cargo build --tests --workspace --locked -Zbuild-std --target x86_64-unknown-linux-gnu --verbose --profile ci
- name: Test
env:
RUSTFLAGS: "-C debug-assertions -Zsanitizer=address"
run: cargo test --workspace --locked --tests -Zbuild-std --target x86_64-unknown-linux-gnu
run: >-
cargo test --workspace
--locked
--tests
-Zbuild-std
--target x86_64-unknown-linux-gnu
--profile ci
min-version:
name: Check mininum supported Rust version
Expand All @@ -95,6 +104,7 @@ jobs:
- run: >-
cargo check
--workspace
--profile ci
--exclude wasmi_fuzz
--exclude fuzz
Expand All @@ -114,19 +124,19 @@ jobs:
- name: Build (default features)
env:
RUSTFLAGS: "-C debug-assertions"
run: cargo build --tests --workspace --locked --verbose
run: cargo build --tests --workspace --locked --profile ci --verbose
- name: Test (default features)
env:
RUSTFLAGS: "-C debug-assertions"
run: cargo test --workspace --locked
run: cargo test --workspace --profile ci --locked
- name: Build (all features)
env:
RUSTFLAGS: "-C debug-assertions"
run: cargo build --tests --workspace --locked --all-features --verbose
run: cargo build --tests --workspace --locked --profile ci --all-features --verbose
- name: Test (all features)
env:
RUSTFLAGS: "-C debug-assertions"
run: cargo test --workspace --locked --all-features
run: cargo test --workspace --locked --profile ci --all-features

fmt:
name: Formatting
Expand Down
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,11 @@ wasmi_wast = { version = "0.39.0", path = "crates/wast" }
[profile.bench]
lto = "fat"
codegen-units = 1

[profile.ci]
inherits = "dev"
debug-assertions = true
overflow-checks = true
debug = "limited"
lto = "thin"
opt-level = "s"

0 comments on commit 994f061

Please sign in to comment.