| 1 |
name: CI |
| 2 |
|
| 3 |
on: |
| 4 |
workflow_dispatch: |
| 5 |
push: |
| 6 |
branches: [ master ] |
| 7 |
pull_request: |
| 8 |
branches: [ master ] |
| 9 |
|
| 10 |
env: |
| 11 |
CARGO_TERM_COLOR: always |
| 12 |
|
| 13 |
jobs: |
| 14 |
build: |
| 15 |
name: ${{ matrix.rust }} |
| 16 |
runs-on: ubuntu-latest |
| 17 |
strategy: |
| 18 |
fail-fast: false |
| 19 |
matrix: |
| 20 |
rust: |
| 21 |
- 1.63.0 |
| 22 |
- stable |
| 23 |
- beta |
| 24 |
- nightly |
| 25 |
steps: |
| 26 |
- uses: actions/checkout@v4 |
| 27 |
- uses: dtolnay/rust-toolchain@master |
| 28 |
with: |
| 29 |
toolchain: ${{ matrix.rust }} |
| 30 |
- name: cargo fmt --all -- --check |
| 31 |
run: | |
| 32 |
rustup component add rustfmt-preview |
| 33 |
cargo fmt --all -- --check |
| 34 |
if: matrix.rust == 'stable' |
| 35 |
- run: | |
| 36 |
cargo build --verbose |
| 37 |
- run: | |
| 38 |
cargo test --verbose |