|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: '0 0 * * 6' |
| 6 | + push: |
| 7 | + branches: |
| 8 | + - '*' |
| 9 | + pull_request: |
| 10 | + |
| 11 | +jobs: |
| 12 | + rustfmt: |
| 13 | + strategy: |
| 14 | + fail-fast: false |
| 15 | + matrix: |
| 16 | + toolchain: |
| 17 | + - 1.42.0-x86_64-unknown-linux-gnu |
| 18 | + - stable-x86_64-unknown-linux-gnu |
| 19 | + |
| 20 | + name: Rustfmt (${{ matrix.toolchain }}) |
| 21 | + runs-on: ubuntu-18.04 |
| 22 | + |
| 23 | + steps: |
| 24 | + - name: Checkout |
| 25 | + uses: actions/checkout@v2 |
| 26 | + |
| 27 | + - name: 'Setup `${{ matrix.toolchain }}`' |
| 28 | + uses: actions-rs/toolchain@v1 |
| 29 | + with: |
| 30 | + toolchain: ${{ matrix.toolchain }} |
| 31 | + override: true |
| 32 | + profile: minimal |
| 33 | + components: rustfmt |
| 34 | + |
| 35 | + - name: cargo-fmt |
| 36 | + uses: actions-rs/cargo@v1 |
| 37 | + with: |
| 38 | + command: fmt |
| 39 | + args: --all -- --check |
| 40 | + |
| 41 | + build: |
| 42 | + strategy: |
| 43 | + fail-fast: false |
| 44 | + matrix: |
| 45 | + toolchain: |
| 46 | + - 1.42.0-x86_64-pc-windows-msvc |
| 47 | + - 1.42.0-x86_64-apple-darwin |
| 48 | + - 1.42.0-x86_64-unknown-linux-gnu |
| 49 | + - stable-x86_64-pc-windows-msvc |
| 50 | + - stable-x86_64-apple-darwin |
| 51 | + - stable-x86_64-unknown-linux-gnu |
| 52 | + include: |
| 53 | + - { toolchain: 1.42.0-x86_64-pc-windows-msvc , os: windows-2019 } |
| 54 | + - { toolchain: 1.42.0-x86_64-apple-darwin , os: macos-10.15 } |
| 55 | + - { toolchain: 1.42.0-x86_64-unknown-linux-gnu, os: ubuntu-18.04 } |
| 56 | + - { toolchain: stable-x86_64-pc-windows-msvc , os: windows-2019 } |
| 57 | + - { toolchain: stable-x86_64-apple-darwin , os: macos-10.15 } |
| 58 | + - { toolchain: stable-x86_64-unknown-linux-gnu, os: ubuntu-18.04 } |
| 59 | + |
| 60 | + name: Build (${{ matrix.toolchain }}) |
| 61 | + runs-on: ${{ matrix.os }} |
| 62 | + |
| 63 | + steps: |
| 64 | + - name: Disable `core.autocrlf` |
| 65 | + run: git config --global core.autocrlf false |
| 66 | + if: matrix.os == 'windows-2019' |
| 67 | + |
| 68 | + - name: Checkout |
| 69 | + uses: actions/checkout@v2 |
| 70 | + |
| 71 | + - name: 'Setup `${{ matrix.toolchain }}`' |
| 72 | + uses: actions-rs/toolchain@v1 |
| 73 | + with: |
| 74 | + toolchain: ${{ matrix.toolchain }} |
| 75 | + override: true |
| 76 | + profile: minimal |
| 77 | + components: clippy |
| 78 | + |
| 79 | + - name: cargo-clippy |
| 80 | + uses: actions-rs/cargo@v1 |
| 81 | + with: |
| 82 | + command: clippy |
| 83 | + args: --workspace --all-targets -- -D warnings |
| 84 | + |
| 85 | + - name: cargo-build |
| 86 | + uses: actions-rs/cargo@v1 |
| 87 | + with: |
| 88 | + command: build |
| 89 | + args: --workspace --all-targets |
| 90 | + |
| 91 | + - name: cargo-test |
| 92 | + uses: actions-rs/cargo@v1 |
| 93 | + with: |
| 94 | + command: test |
| 95 | + args: --workspace --no-fail-fast |
| 96 | + env: |
| 97 | + RUST_BACKTRACE: full |
0 commit comments