12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- on:
- push:
- branches:
- - main
- paths:
- - '**.rs'
- - '**/Cargo.toml'
- - '.github/workflows/tests.yml'
- workflow_dispatch:
- pull_request:
- paths:
- - '**.rs'
- - '**/Cargo.toml'
- - '.github/workflows/tests.yml'
- env:
- RUSTFLAGS: -Dwarnings
- RUST_BACKTRACE: 1
- msrv: 1.57.0
- name: Tests
- jobs:
- tests:
- name: Tests
- runs-on: ubuntu-latest
- strategy:
- matrix:
- rust:
- - stable
- - nightly
- - 1.57.0
- steps:
- - uses: actions/checkout@v2
- - name: Install toolchain
- uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: ${{ matrix.rust }}
- override: true
- components: rustfmt
- - name: Run cargo test (with static APIs)
- if: ${{ matrix.rust != env.msrv }}
- uses: actions-rs/cargo@v1
- with:
- command: test
- args: --features static
- - name: Run cargo test (no static APIs)
- if: ${{ matrix.rust == env.msrv }}
- uses: actions-rs/cargo@v1
- with:
- command: test
- benches:
- name: Compile benchmarks
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Install stable toolchain
- uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: stable
- override: true
- components: rustfmt
- - name: Run cargo check
- uses: actions-rs/cargo@v1
- with:
- command: check
- args: -p bench --benches
|