Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sha1: add multiplatform tests #252

Merged
merged 1 commit into from
Apr 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
105 changes: 98 additions & 7 deletions .github/workflows/sha1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ env:
RUSTFLAGS: "-Dwarnings"

jobs:
# Builds for no_std platforms
build:
runs-on: ubuntu-latest
strategy:
Expand All @@ -37,21 +38,111 @@ jobs:
override: true
- run: cargo build --no-default-features --release --target ${{ matrix.target }}

test:
# Linux tests
linux:
strategy:
matrix:
include:
# 32-bit Linux/x86
# *** NOTE: Currently broken with `asm` feature enabled! See:
# https://github.com/RustCrypto/hashes/issues/251
#- target: i686-unknown-linux-gnu
# rust: 1.41.0 # 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: 1.41.0 # MSRV
- target: x86_64-unknown-linux-gnu
rust: stable

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- run: ${{ matrix.deps }}
- run: cargo test --target ${{ matrix.target }} --release --no-default-features
- run: cargo test --target ${{ matrix.target }} --release
- run: cargo test --target ${{ matrix.target }} --release --features asm
- run: cargo test --target ${{ matrix.target }} --release --all-features

# macOS tests
macos:
strategy:
matrix:
rust:
toolchain:
- 1.41.0 # MSRV
- stable

runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
toolchain: ${{ matrix.toolchain }}
target: x86_64-apple-darwin
override: true
- run: cargo test --release --no-default-features
- run: cargo test --release
- run: cargo test --release --features asm
- run: cargo test --release --all-features

# Windows tests
windows:
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
toolchain: stable

runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
override: true
- run: cargo test --no-default-features
- run: cargo test
- run: cargo test --features asm
- run: cargo test --all-features
- uses: msys2/setup-msys2@v2
- run: cargo test --target ${{ matrix.target }} --release

# Cross-compiled tests
# *** NOTE: Currently broken with `asm` feature enabled! See:
# https://github.com/RustCrypto/hashes/issues/251
#
# cross:
# strategy:
# matrix:
# include:
# # ARM64
# - target: aarch64-unknown-linux-gnu
# rust: 1.41.0 # MSRV
# - target: aarch64-unknown-linux-gnu
# rust: stable
#
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: ${{ matrix.rust }}
# target: ${{ matrix.target }}
# override: true
# - run: cargo install cross
# - run: cross test --target ${{ matrix.target }} --release
# - run: cross test --target ${{ matrix.target }} --release --features asm
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.