-
Notifications
You must be signed in to change notification settings - Fork 2
79 lines (65 loc) · 2.17 KB
/
Copy pathtests.yml
File metadata and controls
79 lines (65 loc) · 2.17 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: tests
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
name: build analyzer + pytest (LLVM ${{ matrix.llvm }})
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
llvm: ["21", "22", "23"]
env:
LLVM_MAJOR: ${{ matrix.llvm }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/setup-go@v5
with:
go-version: "1.22.2"
- name: Install LLVM ${{ matrix.llvm }}
run: |
wget -qO /tmp/llvm.sh https://apt.llvm.org/llvm.sh
chmod +x /tmp/llvm.sh
sudo /tmp/llvm.sh "$LLVM_MAJOR"
sudo apt-get install -y "llvm-$LLVM_MAJOR-dev" "clang-$LLVM_MAJOR"
- name: Install gllvm
run: go install github.com/SRI-CSL/gllvm/cmd/...@v1.3.1
- name: Install Rust nightly + rust-src
run: |
rustup toolchain install nightly --profile minimal --component rust-src
rustup default nightly
- name: Report toolchain versions
run: |
"llvm-config-$LLVM_MAJOR" --version
"clang-$LLVM_MAJOR" --version
gclang --version || true
rustc --version
python3 --version
- name: Build analyzer and run tests
run: make test LLVM_MAJOR="$LLVM_MAJOR"
- name: Run detected LLVM matrix
run: make matrix LLVM_MAJOR="$LLVM_MAJOR"
- name: Run full C and Rust CLI paths
if: matrix.llvm == '23'
run: |
REACHABILITY_ANALYZER="$PWD/analyzer/build/reachability-analyzer" \
.venv/bin/python -m pytest \
driver/tests/test_cli.py::test_run_c_direct \
driver/tests/test_cli.py::test_run_rust_end_to_end \
driver/tests/test_cli.py::test_run_mixed_end_to_end -q
- name: Run reproducible static checks
if: matrix.llvm == '23'
run: |
sudo apt-get install -y cppcheck clang-tools-23
make compdb static-analysis LLVM_MAJOR="$LLVM_MAJOR"