Bug fix: separate arg from command #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: [ "master" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Restore Rust cache | |
uses: actions/cache/restore@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/debug/ | |
target/release/ | |
Cargo.lock | |
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml', 'src/**/*.rs', 'benches/**/*.rs', '.github/workflows/rust.yml') }} | |
- name: Install nightly Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Unit Tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
toolchain: nightly | |
- name: Build Benchmarks | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --benches | |
toolchain: nightly | |
- name: Save Rust cache | |
uses: actions/cache/save@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/debug/ | |
target/release/ | |
Cargo.lock | |
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml', 'src/**/*.rs', 'benches/**/*.rs', '.github/workflows/rust.yml') }} | |
- name: Run benchmarks | |
uses: actions-rs/cargo@v1 | |
with: | |
command: bench | |
toolchain: nightly | |
- name: Upload benchmark reports | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Optimization remarks | |
path: target/criterion/report | |
if-no-files-found: error |