Use aligned_vec crate to eliminate unsound code #46
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: Crate | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose | |
miri: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust nightly and miri | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: nightly | |
components: miri, rust-src | |
- name: Run miri | |
env: | |
RUSTFLAGS: -Zrandomize-layout | |
MIRIFLAGS: -Zmiri-symbolic-alignment-check | |
run: cargo miri test | |
code-coverage: | |
needs: [miri, build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- name: Install grcov | |
env: | |
GRCOV_LINK: https://github.com/mozilla/grcov/releases/download | |
GRCOV_VERSION: v0.8.7 | |
run: | | |
curl -L "$GRCOV_LINK/$GRCOV_VERSION/grcov-x86_64-unknown-linux-musl.tar.bz2" | | |
tar xj -C $HOME/.cargo/bin | |
- name: Install llvm-tools-preview | |
run: | | |
rustup component add llvm-tools-preview | |
- name: Run cargo clean | |
run: | | |
cargo clean | |
- name: Run tests | |
env: | |
CARGO_INCREMENTAL: 0 | |
LLVM_PROFILE_FILE: "{{ name }}-%p-%m.profraw" | |
RUSTFLAGS: > | |
-Cinstrument-coverage -Ccodegen-units=1 -Clink-dead-code | |
-Coverflow-checks=off | |
RUSTDOCFLAGS: > | |
-Cinstrument-coverage -Ccodegen-units=1 -Clink-dead-code | |
-Coverflow-checks=off | |
run: | | |
cargo test --verbose | |
- name: Get coverage data for codecov | |
run: | | |
grcov . --binary-path ./target/debug/ -s . -t lcov --branch \ | |
--ignore-not-existing --ignore "/*" --ignore "../*" -o lcov.info | |
- name: Codecov upload | |
uses: codecov/codecov-action@v3 | |
with: | |
files: lcov.info |