Skip to content

Add matrix build

Add matrix build #48

Workflow file for this run

name: Validate
on: pull_request
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
setup:
- name: windows-aarch64
system: windows-latest
target: aarch64-unknown-linux-gnu
toolchain: stable-x86_64-pc-windows-msvc
# os: [
# ubuntu-latest,
# windows-latest,
# macos-latest
# ]
# target: [
# aarch64-unknown-linux-gnu,
# armv7-unknown-linux-gnueabi,
# x86_64-unknown-linux-gnu,
# i686-unknown-linux-gnu
# ]
runs-on: ${{ matrix.setup.system }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
run: |
rustup default ${{ matrix.setup.toolchain }}
- name: Test the library
uses: houseabsolute/actions-rust-cross@v0
with:
target: ${{ matrix.setup.target }}
command: test
coverage:
env:
RUSTFLAGS: "-C instrument-coverage"
LLVM_PROFILE_FILE: "ms1553b-%p-%m.profraw"
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
run: rustup update --no-self-update stable
- name: Install grcov
run: |
rustup component add llvm-tools-preview &&
cargo install grcov
- name: Build the library
run: cargo test --no-run
- name: Test the library
run: cargo test
- name: Generate code coverage
run: grcov . -s . -b target/debug -t cobertura --branch --ignore-not-existing --keep-only 'src/**/*' -o .
- name: Make coverage report
uses: 5monkeys/cobertura-action@v13
with:
path: ./cobertura.xml
report_name: Coverage
skip_covered: false
only_changed_files: false
fail_below_threshold: true
minimum_coverage: 95