ascon v0.4.0 (#58) #162
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: keccak | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/keccak.yml" | |
- "keccak/**" | |
- "Cargo.*" | |
push: | |
branches: master | |
defaults: | |
run: | |
working-directory: keccak | |
env: | |
RUSTFLAGS: "-Dwarnings" | |
CARGO_INCREMENTAL: 0 | |
jobs: | |
set-msrv: | |
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master | |
with: | |
msrv: 1.41.0 | |
build: | |
needs: set-msrv | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- ${{needs.set-msrv.outputs.msrv}} | |
- stable | |
target: | |
- thumbv7em-none-eabi | |
- wasm32-unknown-unknown | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: RustCrypto/actions/cargo-cache@master | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
targets: ${{ matrix.target }} | |
- run: cargo build --no-default-features --target ${{ matrix.target }} | |
minimal-versions: | |
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master | |
with: | |
working-directory: ${{ github.workflow }} | |
test: | |
needs: set-msrv | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- ${{needs.set-msrv.outputs.msrv}} | |
- stable | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: RustCrypto/actions/cargo-cache@master | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- run: cargo check --no-default-features | |
- run: cargo check | |
- run: cargo check --features no_unroll | |
- run: cargo test --no-default-features | |
- run: cargo test | |
- run: cargo test --features no_unroll | |
test-simd: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: RustCrypto/actions/cargo-cache@master | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
- run: cargo check --features simd | |
- run: cargo test --features simd | |
# Cross-compiled tests | |
cross: | |
needs: set-msrv | |
strategy: | |
matrix: | |
rust: | |
- ${{needs.set-msrv.outputs.msrv}} | |
- stable | |
target: | |
- i686-unknown-linux-gnu | |
- x86_64-unknown-linux-gnu | |
- aarch64-unknown-linux-gnu | |
- mips-unknown-linux-gnu | |
features: | |
- no_unroll | |
- 'NO_FEATURE' | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
# Cross mounts only current package, i.e. by default it ignores workspace's Cargo.toml | |
working-directory: . | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/cross-tests | |
with: | |
rust: ${{ matrix.rust }} | |
package: ${{ github.workflow }} | |
target: ${{ matrix.target }} | |
features: ${{ matrix.features }} | |
aarch64-sha3: | |
needs: set-msrv | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
# Cross mounts only current package, i.e. by default it ignores workspace's Cargo.toml | |
working-directory: . | |
strategy: | |
matrix: | |
rust: | |
- ${{needs.set-msrv.outputs.msrv}} | |
- stable | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: RustCrypto/actions/cargo-cache@master | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
targets: aarch64-unknown-linux-gnu | |
- name: Install pre-compiled cross | |
run: | | |
# We need a recent version for RUSTFLAGS to work. | |
wget -O /tmp/binaries.tar.gz https://github.com/cross-rs/cross/releases/download/v0.2.4/cross-x86_64-unknown-linux-gnu.tar.gz | |
tar -C /tmp -xzf /tmp/binaries.tar.gz | |
mv /tmp/cross ~/.cargo/bin | |
shell: bash | |
- name: cross test | |
run: | | |
cd keccak | |
# Cross doesn't enable `sha3` by default, but QEMU supports it. | |
export RUSTFLAGS="-C target-feature=+sha3" | |
cross test --target aarch64-unknown-linux-gnu --no-default-features |