|
| 1 | +name: tests |
| 2 | +on: |
| 3 | + schedule: |
| 4 | + # build at least once per week |
| 5 | + - cron: "0 0 * * 0" |
| 6 | + pull_request: |
| 7 | + push: |
| 8 | + paths-ignore: |
| 9 | + - "README.md" |
| 10 | + - "CHANGELOG.md" |
| 11 | +jobs: |
| 12 | + # TODO: enable after running cargo fmt again |
| 13 | + # check: |
| 14 | + # name: Check formatting |
| 15 | + # runs-on: ubuntu-latest |
| 16 | + # steps: |
| 17 | + # - uses: actions/checkout@v2 |
| 18 | + # - uses: actions-rs/toolchain@v1 |
| 19 | + # with: |
| 20 | + # toolchain: stable |
| 21 | + # override: true |
| 22 | + # components: rustfmt |
| 23 | + # profile: minimal |
| 24 | + # - name: Check formatting |
| 25 | + # uses: actions-rs/cargo@v1 |
| 26 | + # with: |
| 27 | + # command: fmt |
| 28 | + # args: --all -- --check |
| 29 | + test: |
| 30 | + name: Test |
| 31 | + runs-on: ${{ matrix.os }} |
| 32 | + env: |
| 33 | + RUST_BACKTRACE: 1 |
| 34 | + strategy: |
| 35 | + matrix: |
| 36 | + os: [windows-latest, ubuntu-latest, macos-latest] |
| 37 | + toolchain: [stable, nightly] |
| 38 | + features: |
| 39 | + - "" |
| 40 | + - "serde,mint" |
| 41 | + steps: |
| 42 | + - uses: actions/checkout@v2 |
| 43 | + - name: Install latest rust |
| 44 | + uses: actions-rs/toolchain@v1 |
| 45 | + id: rust |
| 46 | + with: |
| 47 | + toolchain: ${{ matrix.toolchain }} |
| 48 | + override: true |
| 49 | + profile: minimal |
| 50 | + - name: Build |
| 51 | + uses: actions-rs/cargo@v1 |
| 52 | + with: |
| 53 | + command: build |
| 54 | + args: --lib --features "${{ matrix.features }}" |
| 55 | + - name: Test |
| 56 | + uses: actions-rs/cargo@v1 |
| 57 | + with: |
| 58 | + command: test |
| 59 | + args: --features "${{ matrix.features }}" |
| 60 | + benchmark: |
| 61 | + name: Benchmark |
| 62 | + runs-on: ${{ matrix.os }} |
| 63 | + env: |
| 64 | + RUST_BACKTRACE: 1 |
| 65 | + strategy: |
| 66 | + matrix: |
| 67 | + os: [ubuntu-latest] |
| 68 | + toolchain: [nightly] |
| 69 | + features: |
| 70 | + # The benchmark always needs the 'rand' feature |
| 71 | + - "rand,serde,mint" |
| 72 | + steps: |
| 73 | + - uses: actions/checkout@v2 |
| 74 | + - name: Install latest rust |
| 75 | + uses: actions-rs/toolchain@v1 |
| 76 | + id: rust |
| 77 | + with: |
| 78 | + toolchain: ${{ matrix.toolchain }} |
| 79 | + override: true |
| 80 | + profile: minimal |
| 81 | + - name: Benchmark |
| 82 | + uses: actions-rs/cargo@v1 |
| 83 | + with: |
| 84 | + command: bench |
| 85 | + args: --features "${{ matrix.features }}" |
| 86 | + |
0 commit comments