-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (69 loc) · 2.25 KB
/
Copy pathlinux_smoke-tests.yml
File metadata and controls
76 lines (69 loc) · 2.25 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
name: 🐧 Linux Smoke Tests
on:
workflow_call:
workflow_dispatch:
push:
branches-ignore:
- main
- 'gh-readonly-queue/**'
merge_group:
jobs:
linux_tests_summary:
name: Linux Tests Summary
runs-on: ubuntu-latest
env:
LLVM_BIN: /usr/lib/llvm-18/bin
LLVM_DIR: /usr/lib/llvm-18/cmake
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check if code files changed
id: changes
uses: dorny/paths-filter@v3
with:
filters: |
code:
- 'lib/**'
- 'include/**'
- 'tools/**'
- 'CMakeLists.txt'
- 'cmake/**'
- name: Install dependencies
if: steps.changes.outputs.code == 'true'
run: |
sudo apt install -y llvm-18 llvm-18-dev clang-18 libfl-dev llvm-18-tools
sudo apt install -y ccache flex bison
echo '/usr/lib/ccache' >> "$GITHUB_PATH"
echo "$LLVM_BIN" >> "$GITHUB_PATH"
pip install lit
- name: Cache ccache
if: steps.changes.outputs.code == 'true'
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ runner.os }}-clang18-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
restore-keys: ccache-${{ runner.os }}-clang18-
- name: Configure and test
if: steps.changes.outputs.code == 'true'
env:
ASAN_OPTIONS: detect_leaks=0
run: |
export LLVM_VERSION=$(ls /usr/lib/llvm-18 | head -n 1)
export LLVM_DIR="/usr/lib/llvm-18/cmake"
export PATH="/usr/lib/llvm-18/bin:$PATH"
export BISON_EXECUTABLE=$(which bison)
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DLLVM_DIR=$LLVM_DIR \
-DBISON_EXECUTABLE=$BISON_EXECUTABLE \
-DLLVM_ENABLE_ASSERTIONS=1
./coverage.sh
- name: Test results
run: |
if [[ "${{ steps.changes.outputs.code }}" == "false" ]]; then
echo "✅ No code changes detected, skipping Linux tests"
else
echo "✅ All Linux tests passed"
fi