-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (30 loc) · 1.17 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
name: Rust
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose --examples
- name: Run tests
run: cargo test --verbose
- name: Set up environment
run: |
sudo apt update
sudo apt install -y libev-dev valgrind
- name: Run Tests with Valgrind
run: |
touch results
valgrind --leak-check=full --track-origins=yes -q ./target/debug/examples/dijkstras_shortest_path >> results
valgrind --leak-check=full --track-origins=yes -q ./target/debug/examples/serde_example >> results
valgrind --leak-check=full --track-origins=yes -q ./target/debug/examples/edmonds_karps_maximum_flow >> results
valgrind --leak-check=full --track-origins=yes -q ./target/debug/examples/prim_minimum_spanning_tree >> results
# valgrind --leak-check=full --track-origins=yes -q ./target/debug/examples/kojarasus_strongly_connected_components >> results
[ -s ./results ] && (cat ./results && exit -1) || echo "No leaks detected"