|
| 1 | +name: Build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ master ] |
| 6 | + pull_request: |
| 7 | + branches: [ master ] |
| 8 | + |
| 9 | +env: |
| 10 | + CARGO_TERM_COLOR: always |
| 11 | + |
| 12 | +jobs: |
| 13 | + default: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v2 |
| 17 | + - name: Install rust stable |
| 18 | + uses: actions-rs/toolchain@v1 |
| 19 | + with: |
| 20 | + toolchain: stable |
| 21 | + override: true |
| 22 | + - name: Default build |
| 23 | + uses: actions-rs/cargo@v1 |
| 24 | + with: |
| 25 | + command: check |
| 26 | + args: --workspace |
| 27 | + features: |
| 28 | + runs-on: ubuntu-latest |
| 29 | + strategy: |
| 30 | + fail-fast: false |
| 31 | + matrix: |
| 32 | + feature: |
| 33 | + - serde |
| 34 | + - cli |
| 35 | + steps: |
| 36 | + - uses: actions/checkout@v2 |
| 37 | + - name: Install rust stable |
| 38 | + uses: actions-rs/toolchain@v1 |
| 39 | + with: |
| 40 | + toolchain: stable |
| 41 | + override: true |
| 42 | + - name: Feature ${{ matrix.feature }} |
| 43 | + uses: actions-rs/cargo@v1 |
| 44 | + with: |
| 45 | + command: check |
| 46 | + args: --no-default-features --features=${{ matrix.feature }} |
| 47 | + - name: Defaults + ${{ matrix.feature }} |
| 48 | + uses: actions-rs/cargo@v1 |
| 49 | + with: |
| 50 | + command: check |
| 51 | + args: --features=${{ matrix.feature }} |
| 52 | + platforms: |
| 53 | + runs-on: ${{ matrix.os }} |
| 54 | + strategy: |
| 55 | + fail-fast: false |
| 56 | + matrix: |
| 57 | + os: [ ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, windows-2019, windows-2022 ] |
| 58 | + steps: |
| 59 | + - uses: actions/checkout@v2 |
| 60 | + - name: Install rust stable |
| 61 | + uses: actions-rs/toolchain@v1 |
| 62 | + with: |
| 63 | + toolchain: stable |
| 64 | + override: true |
| 65 | + - name: Build with all features |
| 66 | + uses: actions-rs/cargo@v1 |
| 67 | + with: |
| 68 | + command: check |
| 69 | + args: --workspace --all-targets --all-features |
| 70 | + toolchains: |
| 71 | + runs-on: ubuntu-latest |
| 72 | + strategy: |
| 73 | + fail-fast: false |
| 74 | + matrix: |
| 75 | + toolchain: [ nightly, beta, stable, 1.60.0 ] |
| 76 | + steps: |
| 77 | + - uses: actions/checkout@v2 |
| 78 | + - name: Install rust ${{ matrix.toolchain }} |
| 79 | + uses: actions-rs/toolchain@v1 |
| 80 | + with: |
| 81 | + toolchain: ${{ matrix.toolchain }} |
| 82 | + override: true |
| 83 | + - name: All features |
| 84 | + uses: actions-rs/cargo@v1 |
| 85 | + with: |
| 86 | + command: check |
| 87 | + args: --workspace --all-targets --all-features |
0 commit comments