Skip to content

Commit

Permalink
Merge pull request #3 from wasmi-labs/rf-add-run-benches-job
Browse files Browse the repository at this point in the history
Add `run-benches` CI job
  • Loading branch information
Robbepop authored May 14, 2024
2 parents 4fb6693 + 8523fda commit fd3c6d2
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,48 @@ jobs:
- name: Build (default features)
run: cargo build --workspace

bench-compile:
name: Run Compile Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
- uses: dtolnay/rust-toolchain@stable
- name: Set up Cargo cache
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/target/
key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-${{ github.job }}-
- name: Run Compilation Benches (--profile ci)
run: cargo bench compile/ --profile ci

bench-execute:
name: Run Execution Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
- uses: dtolnay/rust-toolchain@stable
- name: Set up Cargo cache
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/target/
key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-${{ github.job }}-
- name: Run Execution Benches (--profile ci)
run: cargo bench execute/ --profile ci

fmt:
name: Formatting
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@ opt-level = 3
lto = "fat"
codegen-units = 1
panic = "abort"

[profile.ci]
inherits = "release"
opt-level = 3
lto = "thin"
codegen-units = 2

0 comments on commit fd3c6d2

Please sign in to comment.