|
| 1 | +on: |
| 2 | + push: |
| 3 | + branches: [ staging, trying, master ] |
| 4 | + pull_request: |
| 5 | + |
| 6 | +name: CI |
| 7 | + |
| 8 | +env: |
| 9 | + RUSTFLAGS: '--deny warnings' |
| 10 | + |
| 11 | +jobs: |
| 12 | + ci-linux: |
| 13 | + name: CI |
| 14 | + runs-on: ubuntu-latest |
| 15 | + strategy: |
| 16 | + matrix: |
| 17 | + rust: [stable] |
| 18 | + FEATURES: ["", "--features=async-tokio", "--features=mio-evented"] |
| 19 | + TARGET: |
| 20 | + - aarch64-unknown-linux-gnu |
| 21 | + - arm-unknown-linux-gnueabi |
| 22 | + - armv7-unknown-linux-gnueabihf |
| 23 | + - i686-unknown-linux-gnu |
| 24 | + - i686-unknown-linux-musl |
| 25 | + - mips-unknown-linux-gnu |
| 26 | + - mips64-unknown-linux-gnuabi64 |
| 27 | + - mips64el-unknown-linux-gnuabi64 |
| 28 | + - mipsel-unknown-linux-gnu |
| 29 | + - powerpc-unknown-linux-gnu |
| 30 | + # - powerpc64-unknown-linux-gnu |
| 31 | + - powerpc64le-unknown-linux-gnu |
| 32 | + - s390x-unknown-linux-gnu |
| 33 | + - x86_64-unknown-linux-gnu |
| 34 | + - x86_64-unknown-linux-musl |
| 35 | + |
| 36 | + include: |
| 37 | + # MSRV |
| 38 | + - rust: 1.46.0 |
| 39 | + TARGET: x86_64-unknown-linux-gnu |
| 40 | + |
| 41 | + # Test nightly but don't fail |
| 42 | + - rust: nightly |
| 43 | + TARGET: x86_64-unknown-linux-gnu |
| 44 | + experimental: true |
| 45 | + |
| 46 | + steps: |
| 47 | + - uses: actions/checkout@v2 |
| 48 | + - uses: actions-rs/toolchain@v1 |
| 49 | + with: |
| 50 | + profile: minimal |
| 51 | + toolchain: ${{ matrix.rust }} |
| 52 | + target: ${{ matrix.TARGET }} |
| 53 | + override: true |
| 54 | + |
| 55 | + - name: Build |
| 56 | + uses: actions-rs/cargo@v1 |
| 57 | + with: |
| 58 | + command: build |
| 59 | + args: --target=${{ matrix.TARGET }} ${{ matrix.FEATURES }} |
| 60 | + |
| 61 | + - name: Test |
| 62 | + uses: actions-rs/cargo@v1 |
| 63 | + with: |
| 64 | + use-cross: true |
| 65 | + command: test |
| 66 | + args: --target=${{ matrix.TARGET }} ${{ matrix.FEATURES }} |
| 67 | + |
| 68 | + ci-macos: |
| 69 | + name: CI-macOS |
| 70 | + runs-on: macos-11 |
| 71 | + |
| 72 | + strategy: |
| 73 | + matrix: |
| 74 | + rust: [stable, 1.46.0] |
| 75 | + TARGET: [x86_64-apple-darwin] |
| 76 | + |
| 77 | + steps: |
| 78 | + - uses: actions/checkout@v2 |
| 79 | + |
| 80 | + - uses: actions-rs/toolchain@v1 |
| 81 | + with: |
| 82 | + profile: minimal |
| 83 | + toolchain: ${{ matrix.rust }} |
| 84 | + target: ${{ matrix.TARGET }} |
| 85 | + override: true |
| 86 | + |
| 87 | + - uses: actions-rs/cargo@v1 |
| 88 | + with: |
| 89 | + command: build |
| 90 | + args: --target=${{ matrix.TARGET }} |
| 91 | + |
| 92 | + checks: |
| 93 | + runs-on: ubuntu-latest |
| 94 | + |
| 95 | + steps: |
| 96 | + - uses: actions/checkout@v2 |
| 97 | + - uses: actions-rs/toolchain@v1 |
| 98 | + with: |
| 99 | + profile: minimal |
| 100 | + toolchain: stable |
| 101 | + components: rustfmt |
| 102 | + |
| 103 | + - name: Doc |
| 104 | + uses: actions-rs/cargo@v1 |
| 105 | + with: |
| 106 | + command: doc |
| 107 | + |
| 108 | + - name: Formatting |
| 109 | + uses: actions-rs/cargo@v1 |
| 110 | + with: |
| 111 | + command: fmt |
| 112 | + args: --all -- --check |
| 113 | + |
| 114 | + clippy: |
| 115 | + runs-on: ubuntu-latest |
| 116 | + env: |
| 117 | + RUSTFLAGS: '--allow warnings' |
| 118 | + steps: |
| 119 | + - uses: actions/checkout@v2 |
| 120 | + - uses: actions-rs/toolchain@v1 |
| 121 | + with: |
| 122 | + profile: minimal |
| 123 | + toolchain: 1.46.0 |
| 124 | + components: clippy |
| 125 | + |
| 126 | + - uses: actions-rs/clippy-check@v1 |
| 127 | + with: |
| 128 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 129 | + |
0 commit comments