Build #97
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 | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
VALGRINDFLAGS: --show-reachable=no --show-possibly-lost=no --fair-sched=yes | |
RUSTFLAGS: -D warnings | |
RUST_BACKTRACE: 1 | |
jobs: | |
rust: | |
runs-on: ubuntu-latest | |
name: Build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup | |
run: | | |
sudo apt install -y libc6-dbg & | |
rustup update & | |
.github/workflows/install_valgrind & | |
.github/workflows/install_test_deps & | |
wait | |
- name: Check & Lint | |
run: | | |
cargo clippy --all-targets | |
cargo clippy -r --all-targets | |
- name: Test debug build | |
run: | | |
cd tests | |
cargo test --tests --all-targets | |
cargo valgrind test --tests --all-targets | |
- name: Test release build | |
run: | | |
cd tests | |
cargo test -r --tests --all-targets | |
cargo valgrind test -r --tests --all-targets | |
- name: Generate test coverage | |
run: | | |
cd tests | |
cargo llvm-cov --codecov --output-path codecov.json \ | |
--disable-default-ignore-filename-regex \ | |
--ignore-filename-regex \(.cargo/registry\|rustc\) | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: codecov.json | |
slug: davidyz0/xx-core | |