macOS UTM support #123
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 and test | |
on: [push, pull_request] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build_x86-64: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
flags: [--all-features, --no-default-features] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install rust 1.70.0 | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.70.0 | |
override: true | |
- name: Build | |
run: cargo build --workspace ${{ matrix.flags }} --verbose | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install rust 1.70.0 | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.70.0 | |
override: true | |
- name: Run all tests | |
run: cargo test --workspace --all-features --verbose | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.70.0 | |
override: true | |
components: rustfmt, clippy | |
- run: rustup component add clippy | |
- name: Check formatting | |
run: cargo fmt -- --check | |
- uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-targets --all-features --workspace -- -D clippy::all | |
build-coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Rust nightly | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
override: true | |
- run: cargo install grcov | |
- name: Run tests with coverage | |
run: | | |
export CARGO_INCREMENTAL=0 | |
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort" | |
export RUSTDOCFLAGS="-Cpanic=abort" | |
cargo build --workspace --exclude memflow-derive | |
cargo test --workspace --exclude memflow-derive | |
grcov ./target/debug/ -s . -t lcov --llvm --branch --ignore-not-existing -o ./target/debug/coverage | |
bash <(curl -s https://codecov.io/bash) -f ./target/debug/coverage -t ${{ secrets.CODECOV_TOKEN }}; |