-
Notifications
You must be signed in to change notification settings - Fork 118
160 lines (139 loc) · 4.4 KB
/
Copy pathci_linux.yml
File metadata and controls
160 lines (139 loc) · 4.4 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# .github/workflows/ci_linux.yml
name: CI – Linux
on:
pull_request:
branches: [main, develop]
workflow_dispatch: {}
jobs:
build_and_test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
# 1️⃣ Checkout the repository
- name: Checkout repository
uses: actions/checkout@v6
# 2️⃣ Free up disk space (LLVM toolchain ~4 GB extracted; runners ship ~14 GB free)
- name: Free disk space
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: false
swap-storage: false
# 3️⃣ Install Bazelisk (recommended Bazel launcher)
- name: Setup Bazelisk
uses: ./.github/actions/setup-bazelisk
# 4️⃣ (Optional) Install Doxygen for documentation generation
- name: Install Doxygen
run: sudo apt-get update && sudo apt-get install -y doxygen
# 5️⃣ Prefetch external repos (emsdk via //..., LLVM); retry network flakes only
- name: Prefetch external repos
run: |
max=3
for i in $(seq 1 "$max"); do
if bazel fetch //...; then
exit 0
fi
if [ "$i" -lt "$max" ]; then
echo "Fetch failed (attempt $i/$max). Retrying in 20s..."
sleep 20
fi
done
exit 1
# 6️⃣ Build all targets
- name: Build all targets
run: bazel build --verbose_failures //...
# 7️⃣ Run all tests (including Python)
- name: Run all tests
run: bazel test --verbose_failures //...
# 8️⃣ Upload test logs
- name: Upload test logs - Linux
if: always()
uses: actions/upload-artifact@v6
with:
name: bazel-test-logs-linux
path: bazel-testlogs/
if-no-files-found: ignore
retention-days: 30
asan:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Free disk space
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: false
swap-storage: false
- name: Setup Bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Prefetch external repos
run: |
max=3
for i in $(seq 1 "$max"); do
if bazel fetch --config=asan //library/tests/...; then
exit 0
fi
if [ "$i" -lt "$max" ]; then
echo "Fetch failed (attempt $i/$max). Retrying in 20s..."
sleep 20
fi
done
exit 1
- name: Run tests (AddressSanitizer)
run: bazel test --config=asan --verbose_failures --test_output=errors //library/tests/...
- name: Upload ASAN test logs
if: always()
uses: actions/upload-artifact@v6
with:
name: bazel-test-logs-linux-asan
path: bazel-testlogs/
if-no-files-found: ignore
retention-days: 30
tsan:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Free disk space
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: false
swap-storage: false
- name: Setup Bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Prefetch external repos
run: |
max=3
for i in $(seq 1 "$max"); do
if bazel fetch --config=tsan //library/tests/system/...; then
exit 0
fi
if [ "$i" -lt "$max" ]; then
echo "Fetch failed (attempt $i/$max). Retrying in 20s..."
sleep 20
fi
done
exit 1
- name: Run system tests (ThreadSanitizer)
run: bazel test --config=tsan --verbose_failures --test_output=errors //library/tests/system/...
- name: Upload TSAN test logs
if: always()
uses: actions/upload-artifact@v6
with:
name: bazel-test-logs-linux-tsan
path: bazel-testlogs/
if-no-files-found: ignore
retention-days: 30