1name: CI 2 3on: 4 pull_request: 5 push: 6 branches: 7 - master 8 9env: 10 RUSTFLAGS: -Dwarnings 11 12jobs: 13 build_and_test: 14 name: Build and test 15 runs-on: ${{ matrix.os }} 16 strategy: 17 matrix: 18 os: [ubuntu-latest, macOS-latest, windows-latest] 19 rust: [stable, 1.59.0] 20 21 steps: 22 - uses: actions/checkout@master 23 24 - name: Install ${{ matrix.rust }} 25 uses: actions-rs/toolchain@v1 26 with: 27 toolchain: ${{ matrix.rust }} 28 override: true 29 30 - name: check 31 uses: actions-rs/cargo@v1 32 with: 33 command: check 34 args: --all --bins --examples 35 36 - name: tests 37 uses: actions-rs/cargo@v1 38 with: 39 command: test 40 args: --all 41 42 clippy: 43 runs-on: ubuntu-latest 44 45 steps: 46 - uses: actions/checkout@v2 47 48 - uses: actions-rs/toolchain@v1 49 with: 50 profile: minimal 51 toolchain: nightly 52 override: true 53 components: clippy 54 55 - name: clippy 56 uses: actions-rs/cargo@v1 57 with: 58 command: clippy 59 args: --all-targets --all-features -- -D warnings 60 61 check_fmt_and_docs: 62 name: Checking fmt and docs 63 runs-on: ubuntu-latest 64 steps: 65 - uses: actions/checkout@master 66 - uses: actions-rs/toolchain@v1 67 with: 68 toolchain: nightly 69 components: rustfmt, clippy 70 override: true 71 72 - name: fmt 73 run: cargo fmt --all -- --check 74 75 - name: Docs 76 run: cargo doc 77 78 fuzz: 79 runs-on: ubuntu-latest 80 81 steps: 82 - uses: actions/checkout@v2 83 - uses: actions-rs/toolchain@v1 84 with: 85 profile: minimal 86 toolchain: nightly 87 override: true 88 89 - run: cargo install cargo-fuzz 90 - name: compile fuzz 91 run: | 92 cargo fuzz build fuzz_read 93