| 1 |
on: [pull_request] |
| 2 |
|
| 3 |
name: CI |
| 4 |
|
| 5 |
jobs: |
| 6 |
check: |
| 7 |
name: Check+Test default features |
| 8 |
runs-on: ubuntu-latest |
| 9 |
strategy: |
| 10 |
matrix: |
| 11 |
rust: |
| 12 |
- stable |
| 13 |
- beta |
| 14 |
- nightly |
| 15 |
- 1.61 |
| 16 |
steps: |
| 17 |
- name: Checkout sources |
| 18 |
uses: actions/checkout@v3 |
| 19 |
|
| 20 |
- name: Install toolchain |
| 21 |
uses: dtolnay/rust-toolchain@master |
| 22 |
with: |
| 23 |
toolchain: ${{ matrix.rust }} |
| 24 |
|
| 25 |
- name: Run cargo check |
| 26 |
run: cargo check |
| 27 |
|
| 28 |
- name: Run cargo test |
| 29 |
run: cargo test |
| 30 |
|
| 31 |
fmt: |
| 32 |
name: Rustfmt |
| 33 |
runs-on: ubuntu-latest |
| 34 |
steps: |
| 35 |
- name: Checkout sources |
| 36 |
uses: actions/checkout@v3 |
| 37 |
|
| 38 |
- name: Install toolchain |
| 39 |
uses: dtolnay/rust-toolchain@nightly |
| 40 |
with: |
| 41 |
components: rustfmt |
| 42 |
|
| 43 |
- name: Print rustfmt version |
| 44 |
run: cargo fmt -- --version |
| 45 |
|
| 46 |
- name: Run cargo fmt |
| 47 |
run: cargo fmt -- --check |
| 48 |
|
| 49 |
check_no_features: |
| 50 |
name: Check+Test no features |
| 51 |
runs-on: ubuntu-latest |
| 52 |
strategy: |
| 53 |
matrix: |
| 54 |
rust: |
| 55 |
- stable |
| 56 |
- beta |
| 57 |
- nightly |
| 58 |
- 1.61 |
| 59 |
steps: |
| 60 |
- name: Checkout sources |
| 61 |
uses: actions/checkout@v3 |
| 62 |
|
| 63 |
- name: Install toolchain |
| 64 |
uses: dtolnay/rust-toolchain@master |
| 65 |
with: |
| 66 |
toolchain: ${{ matrix.rust }} |
| 67 |
|
| 68 |
- name: Run cargo check |
| 69 |
run: cargo check --no-default-features |
| 70 |
|
| 71 |
- name: Run cargo test |
| 72 |
run: cargo test --no-default-features |
| 73 |
|
| 74 |
check_arm64_neon: |
| 75 |
name: Check and test Linux arm 64bit with neon |
| 76 |
runs-on: ubuntu-latest |
| 77 |
strategy: |
| 78 |
matrix: |
| 79 |
rust: |
| 80 |
- stable |
| 81 |
- beta |
| 82 |
- nightly |
| 83 |
- 1.61 |
| 84 |
steps: |
| 85 |
- name: Checkout sources |
| 86 |
uses: actions/checkout@v3 |
| 87 |
|
| 88 |
- name: Install toolchain |
| 89 |
uses: dtolnay/rust-toolchain@master |
| 90 |
with: |
| 91 |
toolchain: ${{ matrix.rust }} |
| 92 |
targets: aarch64-unknown-linux-gnu |
| 93 |
|
| 94 |
- name: Install cross |
| 95 |
run: cargo install cross --version 0.2.5 --locked |
| 96 |
|
| 97 |
- name: Run cargo check |
| 98 |
run: cross check --features neon --target aarch64-unknown-linux-gnu |
| 99 |
|
| 100 |
- name: Run cargo test for arm |
| 101 |
run: cross test --release --features neon --target aarch64-unknown-linux-gnu |
| 102 |
|
| 103 |
check_x86: |
| 104 |
name: Check and test Linux x86 32bit |
| 105 |
runs-on: ubuntu-latest |
| 106 |
steps: |
| 107 |
- name: Checkout sources |
| 108 |
uses: actions/checkout@v3 |
| 109 |
|
| 110 |
- name: Install stable toolchain |
| 111 |
uses: dtolnay/rust-toolchain@stable |
| 112 |
with: |
| 113 |
targets: i586-unknown-linux-gnu |
| 114 |
|
| 115 |
- name: Install cross |
| 116 |
run: cargo install cross --version 0.2.5 --locked |
| 117 |
|
| 118 |
- name: Run cargo check |
| 119 |
run: cross check --target i586-unknown-linux-gnu |
| 120 |
|
| 121 |
- name: Run cargo test for i586 |
| 122 |
run: cross test --target i586-unknown-linux-gnu |
| 123 |
|
| 124 |
check_wasm32: |
| 125 |
name: Check and test WebAssembly with SIMD |
| 126 |
runs-on: ubuntu-latest |
| 127 |
strategy: |
| 128 |
matrix: |
| 129 |
rust: |
| 130 |
- stable |
| 131 |
- beta |
| 132 |
- nightly |
| 133 |
- 1.61 |
| 134 |
steps: |
| 135 |
- name: Checkout sources |
| 136 |
uses: actions/checkout@v3 |
| 137 |
- name: Install toolchain |
| 138 |
uses: dtolnay/rust-toolchain@master |
| 139 |
with: |
| 140 |
toolchain: ${{ matrix.rust }} |
| 141 |
targets: wasm32-unknown-unknown |
| 142 |
- name: Install wasm-pack |
| 143 |
uses: jetli/[email protected] |
| 144 |
with: |
| 145 |
version: "latest" |
| 146 |
- name: Run test suites with wasm-pack |
| 147 |
run: wasm-pack test --node -- --features wasm_simd |