-
Notifications
You must be signed in to change notification settings - Fork 0
263 lines (230 loc) · 9.14 KB
/
Copy pathci.yml
File metadata and controls
263 lines (230 loc) · 9.14 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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
name: CI
on:
push:
branches: [master]
pull_request:
permissions:
contents: read
concurrency:
group: codexui-ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CMAKE_BUILD_PARALLEL_LEVEL: 8
# Accepted elapsed-time overruns are reported; correctness/work-count gates remain mandatory.
CODEXUI_TIMING_POLICY: report
jobs:
gcc-15-debug:
runs-on: ubuntu-24.04
container:
image: gcc:15.3.0-trixie
options: --cap-add=NET_ADMIN --sysctl net.ipv6.conf.all.disable_ipv6=0
timeout-minutes: 45
steps:
- name: Check out exact CodexUI head
uses: actions/checkout@v5
with:
fetch-depth: 0
ref: >-
${{ github.event_name == 'pull_request' &&
github.event.pull_request.head.sha || github.sha }}
- name: Check out SNode.C head
uses: actions/checkout@v5
with:
repository: SNodeC/snode.c
ref: master
path: _deps/snodec
- name: Check out AISuite master
uses: actions/checkout@v5
with:
repository: SNodeC/AISuite
ref: master
path: _deps/aisuite
- name: Install build dependencies
run: |
apt-get update
apt-get install -y \
cmake \
iproute2 \
libbluetooth-dev \
libgit2-dev \
libmagic-dev \
libssl-dev \
ninja-build \
nlohmann-json3-dev \
pkg-config \
qt6-base-dev
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global --add safe.directory "$GITHUB_WORKSPACE/_deps/snodec"
git config --global --add safe.directory "$GITHUB_WORKSPACE/_deps/aisuite"
getent group snodec >/dev/null || groupadd --system snodec
- name: Enable IPv6 transport coverage
run: |
ip link add codexui-ci-v6 type dummy
ip link set codexui-ci-v6 up
ip -6 address add fd00::1/128 dev codexui-ci-v6
ip -6 address show dev codexui-ci-v6
getent ahostsv6 ::1
- name: Verify CodexUI source revision
shell: bash
env:
CODEXUI_EXPECTED_HEAD: >-
${{ github.event_name == 'pull_request' &&
github.event.pull_request.head.sha || github.sha }}
run: |
set -euo pipefail
test "$(git rev-parse HEAD)" = "$CODEXUI_EXPECTED_HEAD"
- name: Build and install SNode.C
run: |
cmake -S _deps/snodec -B _build/snodec -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/_stage/snodec" \
-DSNODEC_BUILD_TESTS=OFF \
-DSNODEC_BUILD_APPS=OFF
cmake --build _build/snodec --target all
cmake --install _build/snodec
- name: Build, test, and install AISuite Codex
run: |
cmake -S _deps/aisuite -B _build/aisuite -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/_stage/aisuite" \
-DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/_stage/snodec" \
-DAISUITE_BUILD_CODEX_TESTS=ON \
-DAISUITE_BUILD_APPS=ON
cmake --build _build/aisuite --target all --parallel 2
install -d -m 0770 -g snodec \
/etc/snode.c \
/var/log/snode.c \
/var/run/snode.c
LD_LIBRARY_PATH="$GITHUB_WORKSPACE/_stage/snodec/lib" \
ctest --test-dir _build/aisuite --output-on-failure
cmake --install _build/aisuite
- name: Configure CodexUI
run: |
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/_stage/aisuite;$GITHUB_WORKSPACE/_stage/snodec" \
-DCODEXUI_INSTALL_WEB=OFF
- name: Build CodexUI
run: cmake --build build --target all
- name: Test CodexUI
run: |
LD_LIBRARY_PATH="$GITHUB_WORKSPACE/_stage/aisuite/lib:$GITHUB_WORKSPACE/_stage/snodec/lib" \
ctest --test-dir build --output-on-failure --verbose
- name: Check changed lines
shell: bash
env:
CODEXUI_BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: |
set -euo pipefail
if [[ "${{ github.event_name }}" == "pull_request" ]]
then
git diff --check "$CODEXUI_BASE_SHA...HEAD"
else
git diff --check HEAD^ HEAD
fi
web:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Check out exact CodexUI head
uses: actions/checkout@v5
with:
fetch-depth: 0
ref: >-
${{ github.event_name == 'pull_request' &&
github.event.pull_request.head.sha || github.sha }}
path: CodexUI/codexui
- name: Check out AISuite master frontend SDK
uses: actions/checkout@v5
with:
repository: SNodeC/AISuite
ref: master
path: AISuite-extraction/AISuite-final
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: |
AISuite-extraction/AISuite-final/packages/codex-frontend/package-lock.json
CodexUI/codexui/web/package-lock.json
- name: Test the frontend SDK
working-directory: AISuite-extraction/AISuite-final/packages/codex-frontend
run: |
npm ci
npm test
npm pack --dry-run
- name: Verify CodexWebUI on Node.js 22
working-directory: CodexUI/codexui
run: |
npm ci --prefix web
npm test --prefix web
- name: Select the qualified performance runtime
uses: actions/setup-node@v4
with:
node-version: 24.20.0
- name: Select the qualified browser runtime
shell: bash
run: |
set -euo pipefail
curl --fail --location --retry 3 \
https://storage.googleapis.com/chrome-for-testing-public/152.0.7977.82/linux64/chrome-linux64.zip \
--output "$RUNNER_TEMP/codexui-chrome.zip"
echo "0704631fb3e4f741092e08f55272f90abc3e307f991f05f332924364415b02e0 $RUNNER_TEMP/codexui-chrome.zip" | sha256sum --check
unzip -q "$RUNNER_TEMP/codexui-chrome.zip" -d "$RUNNER_TEMP/codexui-browser"
echo "CHROME_BIN=$RUNNER_TEMP/codexui-browser/chrome-linux64/chrome" >> "$GITHUB_ENV"
"$RUNNER_TEMP/codexui-browser/chrome-linux64/chrome" --version
- name: Test CodexWebUI on the qualification runtime
working-directory: CodexUI/codexui
run: |
npm ci --prefix web
npm test --prefix web
- name: Profile the presentation model
id: web-model-profile
if: ${{ !cancelled() }}
working-directory: CodexUI/codexui
run: npm run profile --prefix web
- name: Build and verify the production browser artifact
id: web-artifact
if: ${{ !cancelled() }}
working-directory: CodexUI/codexui
run: |
npm run build:app --prefix web
npm run verify:artifact --prefix web
- name: Qualify the production browser application
id: web-browser
if: ${{ !cancelled() && steps.web-artifact.outcome == 'success' }}
working-directory: CodexUI/codexui
run: npm run qualify:browser --prefix web
- name: Capture failed web timing diagnostics
if: ${{ !cancelled() && (steps.web-model-profile.outcome == 'failure' || steps.web-browser.outcome == 'failure') }}
working-directory: CodexUI/codexui
run: |
lscpu
free -m
mkdir -p _build/web-profiles
# Profiled retries are diagnostic only; the mandatory gates above remain failed.
node --cpu-prof --cpu-prof-interval=100 --cpu-prof-dir=_build/web-profiles web/tools/profile-presentation.mjs || true
CODEXUI_BROWSER_CPU_PROFILE=_build/web-profiles/browser.cpuprofile node web/tools/qualify-browser.mjs || true
- name: Upload failed web timing diagnostics
if: ${{ !cancelled() && (steps.web-model-profile.outcome == 'failure' || steps.web-browser.outcome == 'failure') }}
uses: actions/upload-artifact@v4
with:
name: web-timing-diagnostics
path: CodexUI/codexui/_build/web-profiles
- name: Stage and verify the CodexWebUI install
if: ${{ !cancelled() && steps.web-artifact.outcome == 'success' }}
working-directory: CodexUI/codexui
run: |
cmake -S web -B _build/web-package \
-DCMAKE_INSTALL_PREFIX="$PWD/_stage/web"
cmake --build _build/web-package --target codexui-web-artifact
cmake --install _build/web-package --component CodexWebUI
test -s _stage/web/share/codexui/web/index.html
test -n "$(find _stage/web/share/codexui/web/assets -type f -print -quit)"
- name: Upload CodexWebUI production artifact
uses: actions/upload-artifact@v4
with:
name: codexui-web
path: CodexUI/codexui/_stage/web/share/codexui/web
if-no-files-found: error