test macos #78
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: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
ci: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
rust: | |
- stable | |
- beta | |
- nightly | |
- 1.77.0 # MSRV | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- run: cargo build | |
- run: cargo bench | |
# test filter parameter for cargo bench | |
- run: "[ $(cargo bench | wc -l) -gt $(cargo bench 15 | wc -l) ]" | |
lint: | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- nightly | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
components: rustfmt, clippy | |
- run: cargo fmt --all -- --check | |
- run: cargo clippy --all -- -D warnings | |
semver: | |
name: semver | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check semver | |
uses: obi1kenobi/cargo-semver-checks-action@v2 | |
with: | |
rust-toolchain: ${{ env.rust_stable }} | |
release-type: minor |