name: Build concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true on: push: branches: - 'master' - '!ci_test_*' tags-ignore: - '*' pull_request: branches: - 'master' jobs: build: name: Build runs-on: ubuntu-latest strategy: fail-fast: false matrix: rust: [ "1.85.0", stable ] steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: toolchain: ${{ matrix.rust }} - run: rustup target add aarch64-unknown-linux-gnu x86_64-unknown-linux-gnu i686-unknown-linux-gnu powerpc-unknown-linux-gnu wasm32-unknown-unknown - run: RUSTFLAGS="-C target-feature=+neon" cargo build --target aarch64-unknown-linux-gnu - run: RUSTFLAGS="-C target-feature=+neon" cargo build --target aarch64-unknown-linux-gnu --no-default-features - run: RUSTFLAGS="-C target-feature=+avx2" cargo build --target i686-unknown-linux-gnu - run: cargo build --target powerpc-unknown-linux-gnu - run: RUSTFLAGS="-C target-feature=+avx2" cargo build --target x86_64-unknown-linux-gnu - run: RUSTFLAGS="-C target-feature=+avx2" cargo build --target x86_64-unknown-linux-gnu --no-default-features --features avx - run: RUSTFLAGS="-C target-feature=+avx2" cargo build --target x86_64-unknown-linux-gnu --no-default-features --features sse - run: RUSTFLAGS="-C target-feature=+avx2" cargo +nightly build --target x86_64-unknown-linux-gnu --no-default-features --features avx,avx512 - run: RUSTFLAGS="-C target-feature=+simd128" cargo build --target wasm32-unknown-unknown - run: cargo build --target x86_64-unknown-linux-gnu --no-default-features --features avx_shaper_paths - run: cargo build --target x86_64-unknown-linux-gnu --no-default-features --features avx_shaper_optimized_paths - run: cargo build --target x86_64-unknown-linux-gnu --no-default-features --features avx_shaper_fixed_point_paths - run: cargo build --target x86_64-unknown-linux-gnu --no-default-features --features avx_luts - run: cargo build --target x86_64-unknown-linux-gnu --no-default-features --features avx_shaper_fixed_point_paths,in_place - run: cargo build --target x86_64-unknown-linux-gnu --no-default-features --features sse_shaper_paths - run: cargo build --target x86_64-unknown-linux-gnu --no-default-features --features sse_shaper_optimized_paths - run: cargo build --target x86_64-unknown-linux-gnu --no-default-features --features sse_shaper_fixed_point_paths - run: cargo build --target x86_64-unknown-linux-gnu --no-default-features --features sse_luts - run: cargo build --target x86_64-unknown-linux-gnu --no-default-features --features sse_shaper_fixed_point_paths,in_place - run: cargo build --target aarch64-unknown-linux-gnu --no-default-features --features neon_shaper_paths - run: cargo build --target aarch64-unknown-linux-gnu --no-default-features --features neon_shaper_optimized_paths - run: cargo build --target aarch64-unknown-linux-gnu --no-default-features --features neon_shaper_fixed_point_paths - run: cargo build --target aarch64-unknown-linux-gnu --no-default-features --features neon_luts - run: cargo build --target aarch64-unknown-linux-gnu --no-default-features --features neon_shaper_fixed_point_paths,in_place - run: cargo build --target x86_64-unknown-linux-gnu --no-default-features --features in_place - run: cargo build --target aarch64-unknown-linux-gnu --no-default-features --features in_place - run: cargo build --target aarch64-unknown-linux-gnu --no-default-features --features any_to_any tests_arm: name: Tests runs-on: macos-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - run: cargo test --no-default-features - run: cargo test --features neon_shaper_paths - run: cargo test --features neon_shaper_optimized_paths - run: cargo test --features neon_shaper_fixed_point_paths - run: cargo test --features neon_luts - run: cargo test --features neon_shaper_fixed_point_paths,in_place tests_x86: name: Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - run: cargo test --no-default-features - run: cargo test --features avx_shaper_paths - run: cargo test --features avx_shaper_optimized_paths - run: cargo test --features avx_shaper_fixed_point_paths - run: cargo test --features avx_luts - run: cargo test --features avx_shaper_fixed_point_paths,in_place - run: cargo test --features sse_shaper_paths - run: cargo test --features sse_shaper_optimized_paths - run: cargo test --features sse_shaper_fixed_point_paths - run: cargo test --features sse_luts - run: cargo test --features sse_shaper_fixed_point_paths,in_place - run: cargo test --features extended_range clippy_x86: name: Clippy x86 Stable runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - run: cargo clippy --no-default-features -- -D warnings - run: cargo clippy --features avx_shaper_paths -- -D warnings - run: cargo clippy --features avx_shaper_optimized_paths -- -D warnings - run: cargo clippy --features avx_shaper_fixed_point_paths -- -D warnings - run: cargo clippy --features avx_luts -- -D warnings - run: cargo clippy --features avx_shaper_fixed_point_paths,in_place -- -D warnings - run: cargo clippy --features sse_shaper_paths -- -D warnings - run: cargo clippy --features sse_shaper_optimized_paths -- -D warnings - run: cargo clippy --features sse_shaper_fixed_point_paths -- -D warnings - run: cargo clippy --features sse_luts -- -D warnings - run: cargo clippy --features sse_shaper_fixed_point_paths,in_place -- -D warnings - run: cargo clippy --features any_to_any -- -D warnings - run: cargo clippy --features extended_range -- -D warnings clippy_x86_nightly: name: Clippy x86 Nightly runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@nightly - run: rustup component add clippy - run: cargo clippy --no-default-features -- -D warnings - run: cargo clippy --features avx_shaper_paths -- -D warnings - run: cargo clippy --features avx_shaper_optimized_paths -- -D warnings - run: cargo clippy --features avx_shaper_fixed_point_paths -- -D warnings - run: cargo clippy --features avx_luts -- -D warnings - run: cargo clippy --features avx_shaper_fixed_point_paths,in_place -- -D warnings - run: cargo clippy --features sse_shaper_paths -- -D warnings - run: cargo clippy --features sse_shaper_optimized_paths -- -D warnings - run: cargo clippy --features sse_shaper_fixed_point_paths -- -D warnings - run: cargo clippy --features sse_luts -- -D warnings - run: cargo clippy --features sse_shaper_fixed_point_paths,in_place -- -D warnings clippy_arm: name: Clippy ARM runs-on: macos-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - run: cargo clippy --no-default-features -- -D warnings - run: cargo clippy --features neon_shaper_paths -- -D warnings - run: cargo clippy --features neon_shaper_optimized_paths -- -D warnings - run: cargo clippy --features neon_shaper_fixed_point_paths -- -D warnings - run: cargo clippy --features neon_luts -- -D warnings - run: cargo clippy --features neon_shaper_fixed_point_paths,in_place -- -D warnings - run: cargo clippy --features any_to_any -- -D warnings - run: cargo clippy --features extended_range -- -D warnings fuzz_arm: name: Fuzzing ARM runs-on: macos-latest strategy: matrix: feature: [ neon ] steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@nightly - run: cargo install cargo-fuzz - run: cargo fuzz run unsafe --no-default-features --features ${{ matrix.feature }} -- -max_total_time=16 - run: cargo fuzz run lut --no-default-features --features ${{ matrix.feature }} -- -max_total_time=16 fuzz_x86_64: name: Fuzzing x86_64 runs-on: ubuntu-latest strategy: matrix: feature: [ sse, avx ] steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@nightly - run: cargo install cargo-fuzz - run: cargo fuzz run unsafe --no-default-features --features ${{ matrix.feature }} -- -max_total_time=16 - run: cargo fuzz run lut --no-default-features --features ${{ matrix.feature }} -- -max_total_time=16 fuzz_reader: name: Fuzzing Reader runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@nightly - run: cargo install cargo-fuzz - run: cargo fuzz run safe_read --no-default-features -- -max_total_time=20 -max_len=512000 - run: cargo fuzz run safe_read_create --no-default-features -- -max_total_time=20 -max_len=512000