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