1
0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-09-16 19:41:44 +02:00
BLAKE3/.github/workflows/ci.yml

56 lines
1.8 KiB
YAML
Raw Normal View History

2019-12-10 03:20:04 +01:00
name: tests
on: [push]
jobs:
2019-12-10 03:25:24 +01:00
cargo_tests:
name: ${{ matrix.rust_version }} ${{ matrix.os }}
2019-12-10 03:20:04 +01:00
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust_version: [stable, beta, nightly]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust_version }}
override: true
# Default tests.
- run: cargo test
# No-default-features tests.
- run: cargo test --no-default-features
# More features tests. Note that "c_avx512" participates in dynamic feature
# detection, so it'll be built, but it probably won't run.
- run: cargo test --features=c_avx512,rayon
# Test benchmarks. Nightly only.
- run: cargo test --benches
if: matrix.rust_version == 'nightly'
# Test vectors.
- name: test vectors
run: cargo test
working-directory: ./test_vectors
2019-12-10 03:20:04 +01:00
2019-12-10 03:25:24 +01:00
cross_tests:
name: cross ${{ matrix.arch }}
2019-12-10 03:20:04 +01:00
runs-on: ubuntu-latest
strategy:
matrix:
arch: [armv7-unknown-linux-gnueabihf, aarch64-unknown-linux-gnu, mips-unknown-linux-gnu]
2019-12-10 03:20:04 +01:00
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: cargo install cross
# Test the portable implementation on everything.
- run: cross test --target ${{ matrix.arch }}
# Test the NEON implementation on ARM targets.
- run: cross test --target ${{ matrix.arch }} --features=c_neon
if: startsWith(${{ matrix.arch }}, 'armv7-') || startsWith($${ matrix.arch }}, 'aarch64-')
# Test vectors. Note that this uses a hacky script due to path dependency limitations.
- run: ./test_vectors/cross_test.sh --target ${{ matrix.arch }}