Build #71
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 | |
RUST_BACKTRACE: 1 | |
jobs: | |
rust: | |
runs-on: ubuntu-latest | |
name: Build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup | |
run: | | |
curl -L --proto '=https' --tlsv1.2 -sSf -O https://sourceware.org/pub/valgrind/valgrind-3.23.0.tar.bz2 | |
tar -xf valgrind-3.23.0.tar.bz2 | |
rm valgrind-3.23.0.tar.bz2 | |
cd valgrind-3.23.0 | |
./configure | |
sudo make install -j $(nproc) & | |
sudo apt install -y libc6-dbg & | |
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash & | |
rustup default nightly && rustup component add clippy & | |
wait | |
cargo binstall -y cargo-valgrind cargo-llvm-cov | |
- name: Check & Lint | |
run: RUSTFLAGS="-D warnings" cargo clippy --all-targets && cargo clippy -r --all-targets | |
- name: Test debug build | |
run: cd tests && cargo test --tests && cargo valgrind test --tests | |
- name: Test release build | |
run: cd tests && cargo test -r --tests && cargo valgrind test -r --tests | |
- name: Generate test coverage | |
run: cd tests && cargo llvm-cov --all-features --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: davidzeng0/xx-core |