| 1 |
on: |
| 2 |
push: |
| 3 |
branches: [ master, indexmap-1.x ] |
| 4 |
pull_request: |
| 5 |
branches: [ master, indexmap-1.x ] |
| 6 |
|
| 7 |
name: Continuous integration |
| 8 |
|
| 9 |
env: |
| 10 |
CARGO_TERM_COLOR: always |
| 11 |
CARGO_INCREMENTAL: 0 |
| 12 |
|
| 13 |
jobs: |
| 14 |
tests: |
| 15 |
runs-on: ubuntu-latest |
| 16 |
strategy: |
| 17 |
matrix: |
| 18 |
include: |
| 19 |
- rust: 1.56.0 # MSRV |
| 20 |
features: |
| 21 |
- rust: stable |
| 22 |
features: arbitrary |
| 23 |
- rust: stable |
| 24 |
features: quickcheck |
| 25 |
- rust: stable |
| 26 |
features: rayon |
| 27 |
- rust: stable |
| 28 |
features: rustc-rayon |
| 29 |
- rust: stable |
| 30 |
features: serde |
| 31 |
- rust: stable |
| 32 |
features: std |
| 33 |
- rust: beta |
| 34 |
features: |
| 35 |
- rust: nightly |
| 36 |
bench: test build benchmarks |
| 37 |
- rust: nightly |
| 38 |
features: test_low_transition_point |
| 39 |
|
| 40 |
steps: |
| 41 |
- uses: actions/checkout@v2 |
| 42 |
- uses: actions-rs/toolchain@v1 |
| 43 |
with: |
| 44 |
profile: minimal |
| 45 |
toolchain: ${{ matrix.rust }} |
| 46 |
override: true |
| 47 |
- name: Tests |
| 48 |
run: | |
| 49 |
cargo build --verbose --features "${{ matrix.features }}" |
| 50 |
cargo doc --verbose --features "${{ matrix.features }}" |
| 51 |
cargo test --verbose --features "${{ matrix.features }}" |
| 52 |
cargo test --release --verbose --features "${{ matrix.features }}" |
| 53 |
- name: Tests (serde) |
| 54 |
if: matrix.features == 'serde' |
| 55 |
run: | |
| 56 |
cargo test --verbose -p test-serde |
| 57 |
- name: Test run benchmarks |
| 58 |
if: matrix.bench != '' |
| 59 |
run: cargo test -v --benches |
| 60 |
|
| 61 |
nostd_build: |
| 62 |
runs-on: ubuntu-latest |
| 63 |
strategy: |
| 64 |
matrix: |
| 65 |
include: |
| 66 |
- rust: 1.56.0 |
| 67 |
target: thumbv6m-none-eabi |
| 68 |
- rust: stable |
| 69 |
target: thumbv6m-none-eabi |
| 70 |
|
| 71 |
steps: |
| 72 |
- uses: actions/checkout@v2 |
| 73 |
- uses: actions-rs/toolchain@v1 |
| 74 |
with: |
| 75 |
profile: minimal |
| 76 |
toolchain: ${{ matrix.rust }} |
| 77 |
override: true |
| 78 |
target: ${{ matrix.target }} |
| 79 |
- name: Tests |
| 80 |
run: | |
| 81 |
cargo build -vv --target=${{ matrix.target }} |
| 82 |
cargo build -v -p test-nostd --target=${{ matrix.target }} |
| 83 |
|
| 84 |
clippy: |
| 85 |
runs-on: ubuntu-latest |
| 86 |
strategy: |
| 87 |
matrix: |
| 88 |
rust: |
| 89 |
- beta |
| 90 |
steps: |
| 91 |
- uses: actions/checkout@v2 |
| 92 |
- uses: actions-rs/toolchain@v1 |
| 93 |
with: |
| 94 |
profile: minimal |
| 95 |
toolchain: ${{ matrix.rust }} |
| 96 |
override: true |
| 97 |
components: clippy |
| 98 |
- run: cargo clippy |
| 99 |
|
| 100 |
miri: |
| 101 |
runs-on: ubuntu-latest |
| 102 |
strategy: |
| 103 |
matrix: |
| 104 |
rust: |
| 105 |
- nightly |
| 106 |
steps: |
| 107 |
- uses: actions/checkout@v2 |
| 108 |
- uses: actions-rs/toolchain@v1 |
| 109 |
with: |
| 110 |
profile: minimal |
| 111 |
toolchain: ${{ matrix.rust }} |
| 112 |
override: true |
| 113 |
components: miri |
| 114 |
- run: cargo miri test |