-
-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (46 loc) · 1.36 KB
/
rust-base.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
57
58
59
60
61
name: Build, Test & Check Formatting
on:
push:
branch: master
pull_request:
branch: master
env:
CARGO_TERM_COLOR: always
VALGRIND_VERSION: 3.22.0
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone valgrind
run: git clone https://sourceware.org/git/valgrind.git --depth=1 --branch=VALGRIND_3_22_0
- name: Cache valgrind
id: cache-valgrind
uses: actions/cache@v4
with:
path: ~/valgrind
key: ${{ runner.os }}-valgrind-${{ hashFiles('valgrind/**/*') }}
- name: Configure valgrind
if: steps.cache-valgrind.outputs.cache-hit != 'true'
working-directory: ./valgrind
run: |
./autogen.sh
./configure
- name: Build valgrind
working-directory: ./valgrind
run: make
- name: Install valgrind
working-directory: ./valgrind
run: sudo make install
- name: Cleanup
run: rm --recursive --force valgrind
- uses: actions/checkout@v4
- name: Build without default features
run: cargo build --no-default-features
- name: Build with all features
run: cargo build --all-features
- name: Run tests without default features
run: cargo test --no-default-features
- name: Run tests with all features
run: cargo test --all-features
- name: Check formatting
run: cargo fmt -- --check