diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea7364e..b7a186c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,19 +15,25 @@ env: jobs: test: - name: Test + name: Test +${{ matrix.rust }} ${{ matrix.target.triple }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: target: - - aarch64-unknown-linux-gnu - - i686-unknown-linux-gnu - - x86_64-unknown-linux-gnu - - wasm32-wasip1 + - triple: aarch64-unknown-linux-gnu + feature: +neon + - triple: i686-unknown-linux-gnu + feature: +avx2 + - triple: x86_64-unknown-linux-gnu + feature: +avx2 + - triple: wasm32-wasip1 + feature: +simd128 rust: [nightly, stable, 1.64] exclude: - - target: wasm32-wasip1 + - target: + triple: wasm32-wasip1 + feature: +simd128 rust: 1.64 timeout-minutes: 30 steps: @@ -35,15 +41,18 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - target: ${{ matrix.target }} + target: ${{ matrix.target.triple }} - uses: taiki-e/setup-cross-toolchain-action@v1 with: - target: ${{ matrix.target }} + target: ${{ matrix.target.triple }} - name: Enable type layout randomization run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV if: matrix.rust == 'nightly' + - name: Enable target feature + run: echo RUSTFLAGS=${RUSTFLAGS}\ -Ctarget-feature=${{ matrix.target.feature }} >> $GITHUB_ENV + - uses: Swatinem/rust-cache@v2 - run: cargo build diff --git a/src/arch/wasm32.rs b/src/arch/wasm32.rs index b3107c8..71f941f 100644 --- a/src/arch/wasm32.rs +++ b/src/arch/wasm32.rs @@ -20,6 +20,7 @@ pub(crate) fn check(input: &[u8]) -> bool { #[target_feature(enable = "simd128")] unsafe fn check_simd128(input: &[u8]) -> bool { + panic!("test"); generic::check_unaligned_chunks(input, |chunk: v128| { let ge0 = u8x16_ge(chunk, u8x16_splat(b'0')); let le9 = u8x16_le(chunk, u8x16_splat(b'9'));