Update macos ci #274
Workflow file for this run
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: Build & Test | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-13 | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run tests all features | |
run: cargo test --verbose --no-default-features --all-features | |
# Release | |
- name: Build Release | |
run: cargo build --release --verbose | |
- name: Run tests all features | |
run: cargo test --release --verbose --all-features | |
# Debug | |
- name: Build Debug | |
run: cargo build --verbose | |
- name: Run tests all features | |
run: cargo test --verbose --all-features | |
# RC Provider | |
- name: Build Debug RC provider all features | |
working-directory: rust_crypto_provider | |
run: cargo build --verbose --all-features | |
# Apple Silicon | |
- if: matrix.os == 'macos-11' | |
run: | | |
brew install pkg-config | |
sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/* | |
sudo xcode-select -s /Applications/Xcode_12.4.app | |
rustup target install aarch64-apple-darwin | |
rustup target install aarch64-apple-ios | |
- name: Build | |
run: cargo build --verbose | |
- name: Apple Silicon Build | |
if: matrix.os == 'macos-11' | |
run: | | |
cargo build --target aarch64-apple-darwin --tests --verbose | |
cargo build --release --target aarch64-apple-darwin --tests --verbose | |
# ARM64 iOS | |
- name: iOS aarch64 | |
if: matrix.os == 'macos-11' | |
run: | | |
cargo build --target aarch64-apple-ios --tests --verbose | |
cargo build --release --target aarch64-apple-ios --tests --verbose | |
cross-build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
# 32-bit Linux | |
- target: i686-unknown-linux-gnu | |
rust: stable | |
deps: sudo apt update && sudo apt install gcc-multilib | |
# wasm | |
- target: wasm32-unknown-unknown | |
rust: stable | |
# ARM64 Android | |
- target: aarch64-linux-android | |
rust: stable | |
# ARM64 iOS | |
- target: aarch64-apple-ios | |
rust: stable | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
target: ${{ matrix.target }} | |
profile: minimal | |
override: true | |
- run: ${{ matrix.deps }} | |
- run: cargo build --target ${{ matrix.target }} | |
- run: cargo build --target ${{ matrix.target }} --release | |
fuzz: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-11 | |
- ubuntu-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install latest nightly | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
default: true | |
- uses: actions-rs/[email protected] | |
with: | |
crate: cargo-fuzz | |
version: latest | |
- name: Fuzz Base w/ RustCrypto | |
run: cargo fuzz run base -- -runs=10000 | |
no-std-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# we use a target that lacks a pre-compiled libstd to check if any dependency is using libstd | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: thumbv7em-none-eabihf | |
default: true | |
- name: build crates in no-std mode | |
run: cargo check --target thumbv7em-none-eabihf | |
working-directory: no-std-support-check |