| 1 |
name: CI |
| 2 |
on: |
| 3 |
push: |
| 4 |
branches: |
| 5 |
- master |
| 6 |
pull_request: |
| 7 |
branches: |
| 8 |
- master |
| 9 |
|
| 10 |
env: |
| 11 |
RUST_BACKTRACE: short |
| 12 |
CARGO_INCREMENTAL: 0 |
| 13 |
CARGO_NET_RETRY: 10 |
| 14 |
RUSTUP_MAX_RETRIES: 10 |
| 15 |
RUSTFLAGS: -Dwarnings |
| 16 |
RUSTDOCFLAGS: -Dwarnings |
| 17 |
|
| 18 |
jobs: |
| 19 |
|
| 20 |
test: |
| 21 |
name: Tests - ${{ matrix.name }} |
| 22 |
runs-on: ${{ matrix.os }} |
| 23 |
strategy: |
| 24 |
fail-fast: false |
| 25 |
matrix: |
| 26 |
name: |
| 27 |
- linux |
| 28 |
- macos |
| 29 |
- win64 |
| 30 |
- win32 |
| 31 |
- beta |
| 32 |
- nightly |
| 33 |
include: |
| 34 |
- name: linux |
| 35 |
os: ubuntu-latest |
| 36 |
toolchain: stable |
| 37 |
- name: macos |
| 38 |
os: macos-latest |
| 39 |
toolchain: stable |
| 40 |
- name: win64 |
| 41 |
os: windows-latest |
| 42 |
toolchain: stable |
| 43 |
- name: win32 |
| 44 |
os: windows-latest |
| 45 |
toolchain: stable-i686-msvc |
| 46 |
- name: beta |
| 47 |
os: ubuntu-latest |
| 48 |
toolchain: beta |
| 49 |
- name: nightly |
| 50 |
os: ubuntu-latest |
| 51 |
toolchain: nightly |
| 52 |
steps: |
| 53 |
- uses: actions/checkout@v3 |
| 54 |
- uses: dtolnay/rust-toolchain@master |
| 55 |
with: |
| 56 |
toolchain: ${{ matrix.toolchain }} |
| 57 |
- run: cargo check --verbose |
| 58 |
- run: cargo test --verbose |
| 59 |
- run: cargo build --no-default-features |
| 60 |
MSRV: |
| 61 |
name: Check MSRV |
| 62 |
runs-on: ubuntu-latest |
| 63 |
steps: |
| 64 |
- uses: actions/checkout@v3 |
| 65 |
- uses: dtolnay/[email protected] |
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
- run: cargo build --verbose |
| 71 |
|
| 72 |
|
| 73 |
rustfmt: |
| 74 |
name: Check formatting |
| 75 |
runs-on: ubuntu-latest |
| 76 |
steps: |
| 77 |
- uses: actions/checkout@v3 |
| 78 |
- uses: dtolnay/rust-toolchain@stable |
| 79 |
with: |
| 80 |
components: rustfmt |
| 81 |
- run: cargo fmt --all -- --check |
| 82 |
|
| 83 |
|
| 84 |
doc: |
| 85 |
name: Check documentation |
| 86 |
runs-on: ubuntu-latest |
| 87 |
steps: |
| 88 |
- uses: actions/checkout@v3 |
| 89 |
- uses: dtolnay/rust-toolchain@stable |
| 90 |
- run: cargo doc --all-features |
| 91 |
|
| 92 |
miri: |
| 93 |
name: Miri |
| 94 |
runs-on: ubuntu-latest |
| 95 |
steps: |
| 96 |
- uses: actions/checkout@v3 |
| 97 |
- uses: dtolnay/rust-toolchain@nightly |
| 98 |
with: |
| 99 |
components: miri, rust-src |
| 100 |
- run: cargo miri test --all-features |