-
Notifications
You must be signed in to change notification settings - Fork 16
245 lines (207 loc) · 6.67 KB
/
Copy pathci.yml
File metadata and controls
245 lines (207 loc) · 6.67 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
self-tests:
name: self-tests (${{ matrix.name }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu
os: ubuntu-latest
- name: Windows
os: windows-latest
env:
PYTHONUTF8: '1'
steps:
- name: Enable Git symlinks on Windows
if: runner.os == 'Windows'
shell: pwsh
run: git config --global core.symlinks true
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Read pinned Rust toolchain
id: rust-toolchain
shell: bash
run: |
python - <<'PY'
import os, tomllib
with open("rust-toolchain.toml", "rb") as file:
toolchain = tomllib.load(file)["toolchain"]
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as output:
output.write(f"channel={toolchain['channel']}\n")
output.write(f"components={','.join(toolchain.get('components', []))}\n")
PY
- name: Set up pinned Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ steps.rust-toolchain.outputs.channel }}
components: ${{ steps.rust-toolchain.outputs.components }}
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '25'
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2
- name: Build backend and tools
run: python build.py ci
- name: Run compiler unit tests
id: compiler_unit_tests
continue-on-error: true
run: cargo test
- name: Run self-tests (debug)
id: self_tests_debug
continue-on-error: true
run: python Tester.py
- name: Run self-tests (release)
id: self_tests_release
continue-on-error: true
run: python Tester.py --release
- name: Require 100% self-test pass rate
if: >-
always() &&
(
steps.compiler_unit_tests.outcome != 'success' ||
steps.self_tests_debug.outcome != 'success' ||
steps.self_tests_release.outcome != 'success'
)
run: python -c "raise SystemExit('debug and release self-tests must both pass completely')"
coretests:
name: coretests (Ubuntu)
runs-on: ubuntu-latest
timeout-minutes: 360
env:
PYTHONUTF8: '1'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Read pinned Rust toolchain
id: rust-toolchain
shell: bash
run: |
python - <<'PY'
import os, tomllib
with open("rust-toolchain.toml", "rb") as file:
toolchain = tomllib.load(file)["toolchain"]
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as output:
output.write(f"channel={toolchain['channel']}\n")
output.write(f"components={','.join(toolchain.get('components', []))}\n")
PY
- name: Set up pinned Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ steps.rust-toolchain.outputs.channel }}
components: ${{ steps.rust-toolchain.outputs.components }}
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '25'
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2
- name: Build backend and tools
run: python build.py ci
- name: Run coretests (debug)
id: coretests_debug
continue-on-error: true
run: python Coretests.py --timeout 20 --build-timeout 1200
- name: Run coretests (release)
id: coretests_release
continue-on-error: true
run: python Coretests.py --release --timeout 20 --build-timeout 1200
- name: Upload coretests reports
if: always()
uses: actions/upload-artifact@v4
with:
name: coretests
path: |
target/coretests/reports/
target/coretests/logs/
if-no-files-found: error
- name: Require 100% coretests pass rate
if: >-
always() &&
(
steps.coretests_debug.outcome != 'success' ||
steps.coretests_release.outcome != 'success'
)
run: python -c "raise SystemExit('debug and release coretests must both pass completely')"
alloctests:
name: alloctests (Ubuntu)
runs-on: ubuntu-latest
timeout-minutes: 360
env:
PYTHONUTF8: '1'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Read pinned Rust toolchain
id: rust-toolchain
shell: bash
run: |
python - <<'PY'
import os, tomllib
with open("rust-toolchain.toml", "rb") as file:
toolchain = tomllib.load(file)["toolchain"]
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as output:
output.write(f"channel={toolchain['channel']}\n")
output.write(f"components={','.join(toolchain.get('components', []))}\n")
PY
- name: Set up pinned Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ steps.rust-toolchain.outputs.channel }}
components: ${{ steps.rust-toolchain.outputs.components }}
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '25'
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2
- name: Build backend and tools
run: python build.py ci
- name: Run alloctests (debug)
id: alloctests_debug
continue-on-error: true
run: python Alloctests.py --timeout 120 --build-timeout 1200
- name: Run alloctests (release)
id: alloctests_release
continue-on-error: true
run: python Alloctests.py --release --timeout 120 --build-timeout 1200
- name: Upload alloctests reports
if: always()
uses: actions/upload-artifact@v4
with:
name: alloctests
path: |
target/alloctests/reports/
target/alloctests/logs/
if-no-files-found: error
- name: Require 100% alloctests pass rate
if: >-
always() &&
(
steps.alloctests_debug.outcome != 'success' ||
steps.alloctests_release.outcome != 'success'
)
run: python -c "raise SystemExit('debug and release alloctests must both pass completely')"