Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
davidzeng0 committed Aug 6, 2024
1 parent e9ca6c0 commit a7d2faa
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 15 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

env:
VALGRINDFLAGS: --show-reachable=no --show-possibly-lost=no --fair-sched=yes
RUSTFLAGS: -D warnings
RUST_BACKTRACE: 1

jobs:
Expand All @@ -21,29 +22,32 @@ jobs:
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 update &
.github/workflows/install_valgrind &
.github/workflows/install_test_deps &
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
run: |
cargo clippy --all-targets
cargo clippy -r --all-targets
- name: Test debug build
run: cd tests && cargo test --tests && cargo valgrind test --tests
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 && cargo valgrind test -r --tests
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\)
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:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/install_test_deps
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
curl -L --proto '=https' --tlsv1.2 -sSf \
https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh \
| bash
cargo binstall -y cargo-valgrind cargo-llvm-cov
7 changes: 7 additions & 0 deletions .github/workflows/install_valgrind
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
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)

0 comments on commit a7d2faa

Please sign in to comment.