| 1 |
name: Rust |
| 2 |
|
| 3 |
on: |
| 4 |
push: {} |
| 5 |
pull_request: {} |
| 6 |
|
| 7 |
jobs: |
| 8 |
build_test: |
| 9 |
runs-on: ${{ matrix.rust.os }} |
| 10 |
strategy: |
| 11 |
matrix: |
| 12 |
rust: |
| 13 |
|
| 14 |
- { target: i686-pc-windows-msvc, toolchain: "1.61", os: windows-latest } |
| 15 |
- { target: i686-pc-windows-msvc, toolchain: stable, os: windows-latest } |
| 16 |
- { target: i686-pc-windows-msvc, toolchain: beta, os: windows-latest } |
| 17 |
- { target: i686-pc-windows-msvc, toolchain: nightly, os: windows-latest } |
| 18 |
|
| 19 |
- { target: x86_64-unknown-linux-gnu, toolchain: "1.61", os: ubuntu-latest } |
| 20 |
- { target: x86_64-unknown-linux-gnu, toolchain: stable, os: ubuntu-latest } |
| 21 |
- { target: x86_64-unknown-linux-gnu, toolchain: beta, os: ubuntu-latest } |
| 22 |
- { target: x86_64-unknown-linux-gnu, toolchain: nightly, os: ubuntu-latest } |
| 23 |
|
| 24 |
- { target: aarch64-apple-darwin, toolchain: "1.61", os: macos-latest } |
| 25 |
- { target: aarch64-apple-darwin, toolchain: stable, os: macos-latest } |
| 26 |
- { target: aarch64-apple-darwin, toolchain: beta, os: macos-latest } |
| 27 |
- { target: aarch64-apple-darwin, toolchain: nightly, os: macos-latest } |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
steps: |
| 34 |
- uses: actions/checkout@v4 |
| 35 |
- uses: dtolnay/rust-toolchain@master |
| 36 |
with: |
| 37 |
toolchain: ${{ matrix.rust.toolchain }} |
| 38 |
target: ${{ matrix.rust.target }} |
| 39 |
|
| 40 |
- name: Install wasmtime |
| 41 |
if: matrix.rust.target == 'wasm32-wasi' || matrix.rust.target == 'wasm32-wasip1' |
| 42 |
run: | |
| 43 |
curl https://wasmtime.dev/install.sh -sSf | bash -s -- --version ${{ matrix.rust.wasmtime }} |
| 44 |
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH |
| 45 |
|
| 46 |
- name: Build the crate |
| 47 |
run: cargo build --target ${{ matrix.rust.target }} |
| 48 |
|
| 49 |
- name: Test with default CPU features + No Default Cargo Features |
| 50 |
env: |
| 51 |
CARGO_TARGET_WASM32_WASI_RUNNER: wasmtime run --wasm-features all --dir . |
| 52 |
run: cargo test --target ${{ matrix.rust.target }} --no-default-features |
| 53 |
- name: Test with default CPU features + All Cargo Features |
| 54 |
env: |
| 55 |
CARGO_TARGET_WASM32_WASI_RUNNER: wasmtime run --wasm-features all --dir . |
| 56 |
run: cargo test --target ${{ matrix.rust.target }} --all-features |
| 57 |
|
| 58 |
- name: Build the crate with SSE4.1 (the "native" of CI will be above this) |
| 59 |
if: matrix.rust.os == 'ubuntu-latest' && matrix.rust.target == 'x86_64-unknown-linux-gnu' |
| 60 |
run: RUSTFLAGS="-Ctarget-feature=+sse4.1" cargo build --target ${{ matrix.rust.target }} |
| 61 |
|
| 62 |
- name: switch over to native cpu features |
| 63 |
run: mv .cargo-ci .cargo |
| 64 |
|
| 65 |
- name: Test with 'native' CPU features + No Default Cargo Features |
| 66 |
run: cargo test --target ${{ matrix.rust.target }} --no-default-features |
| 67 |
|
| 68 |
- name: Test with 'native' CPU features + All Cargo Features |
| 69 |
run: cargo test --target ${{ matrix.rust.target }} --all-features |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|