Skip to content

sha2

sha2 #7

Workflow file for this run

name: sha2
on:
pull_request:
paths:
- ".github/workflows/sha2.yml"
- "sha2/**"
- "Cargo.*"
push:
branches: master
defaults:
run:
working-directory: sha2
env:
RUSTFLAGS: "-Dwarnings"
CARGO_INCREMENTAL: 0
jobs:
# Builds for no_std platforms
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: risc0/risc0/.github/actions/rustup@main
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- run: cargo build --no-default-features --target ${{ matrix.target }}
# Linux tests
linux:
needs: set-msrv
strategy:
matrix:
include:
# 32-bit Linux/x86
- target: i686-unknown-linux-gnu
rust: ${{needs.set-msrv.outputs.msrv}}
deps: sudo apt update && sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
rust: stable
deps: sudo apt update && sudo apt install gcc-multilib
# 64-bit Linux/x86_64
- target: x86_64-unknown-linux-gnu
rust: ${{needs.set-msrv.outputs.msrv}}
- target: x86_64-unknown-linux-gnu
rust: stable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: risc0/risc0/.github/actions/rustup@main
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- run: ${{ matrix.deps }}
- run: cargo test --target ${{ matrix.target }} --no-default-features
- run: cargo test --target ${{ matrix.target }}
- run: cargo test --target ${{ matrix.target }} --features asm
- run: cargo test --target ${{ matrix.target }} --all-features
# macOS tests
macos:
needs: set-msrv
strategy:
matrix:
rust:
- ${{needs.set-msrv.outputs.msrv}}
- stable
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: risc0/risc0/.github/actions/rustup@main
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: x86_64-apple-darwin
override: true
- run: cargo test --no-default-features
- run: cargo test
- run: cargo test --features asm
# Windows tests
windows:
needs: set-msrv
strategy:
matrix:
include:
# 64-bit Windows (GNU)
# TODO(tarcieri): try re-enabling this when we bump MSRV
#- target: x86_64-pc-windows-gnu
# toolchain: 1.41.0 # MSRV
- target: x86_64-pc-windows-gnu
rust: stable
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: risc0/risc0/.github/actions/rustup@main
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- uses: msys2/setup-msys2@v2
- run: cargo test --target ${{ matrix.target }}
# TODO: remove on MSRV bump to 1.57 or higher
test-msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: risc0/risc0/.github/actions/rustup@main
with:
profile: minimal
toolchain: 1.41.0
override: true
- run: cargo test --no-default-features
- run: cargo test