Merge pull request #96 from cryspen/jonas/update-stack-measurement #19
This file contains hidden or 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: SHA3 - Build & Test | |
on: | |
merge_group: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main", "*"] | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
if: ${{ github.event_name != 'merge_group' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# These are all arm64, of course, but at least we can test on | |
# some ARM architectures with different stack size defaults | |
# etc | |
os: | |
- ubuntu-24.04-arm | |
- macos-latest | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
working-directory: libcrux/libcrux-sha3 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: 🛠️ Setup Rust Nightly | |
run: rustup toolchain install nightly | |
# Build ... | |
- name: 🔨 Build | |
run: | | |
rustc --print=cfg | |
cargo build --verbose | |
- name: 🔨 Build Release | |
run: cargo build --verbose --release | |
- name: 🏃🏻 Asan MacOS | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: RUSTDOCFLAGS=-Zsanitizer=address RUSTFLAGS=-Zsanitizer=address cargo +nightly test --release --target aarch64-apple-darwin | |
# Test ... | |
- name: 🏃🏻♀️ Test | |
run: | | |
cargo clean | |
cargo test --verbose | |
- name: 🏃🏻♀️ Test with -F check-secret-independence | |
run: | | |
cargo clean | |
cargo test --verbose -F check-secret-independence | |
- name: 🏃🏻♀️ Test Release | |
run: | | |
cargo clean | |
cargo test --verbose --release | |
sha3-build-test-status: | |
if: ${{ always() }} | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Successful | |
if: ${{ !(contains(needs.*.result, 'failure')) }} | |
run: exit 0 | |
- name: Failing | |
if: ${{ (contains(needs.*.result, 'failure')) }} | |
run: exit 1 |