mirror of
https://github.com/logos-blockchain/sponges.git
synced 2026-07-30 18:43:13 +00:00
119 lines
2.9 KiB
YAML
119 lines
2.9 KiB
YAML
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@v2
|
|
- uses: RustCrypto/actions/cargo-cache@master
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: ${{ matrix.rust }}
|
|
target: ${{ matrix.target }}
|
|
override: true
|
|
- 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@v2
|
|
- uses: RustCrypto/actions/cargo-cache@master
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: ${{ matrix.rust }}
|
|
override: true
|
|
- 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@v2
|
|
- uses: RustCrypto/actions/cargo-cache@master
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: nightly
|
|
override: true
|
|
- 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@v2
|
|
- uses: ./.github/actions/cross-tests
|
|
with:
|
|
rust: ${{ matrix.rust }}
|
|
package: ${{ github.workflow }}
|
|
target: ${{ matrix.target }}
|
|
features: ${{ matrix.features }}
|