-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (52 loc) · 1.48 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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