-
Notifications
You must be signed in to change notification settings - Fork 0
205 lines (179 loc) · 6.63 KB
/
Copy pathci.yml
File metadata and controls
205 lines (179 loc) · 6.63 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
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
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 pinned SNode.C
uses: actions/checkout@v5
with:
repository: SNodeC/snode.c
ref: 212bd4f8a16637405ab850a52adb9da8555dca3d
path: _deps/snodec
- name: Check out paired AISuite Codex
uses: actions/checkout@v5
with:
repository: SNodeC/AISuite
ref: 53b3d03014a7cdea68fd47a05cb100b9a1094c80
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 paired 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
- 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 pinned AISuite frontend SDK
uses: actions/checkout@v5
with:
repository: SNodeC/AISuite
ref: 53b3d03014a7cdea68fd47a05cb100b9a1094c80
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: Verify the paired SDK revision
working-directory: CodexUI/codexui
run: |
test "$(git -C ../../AISuite-extraction/AISuite-final rev-parse HEAD)" = \
"$(cat web/AISUITE_REVISION)"
- name: Test the frontend SDK
working-directory: AISuite-extraction/AISuite-final/packages/codex-frontend
run: |
npm ci
npm test
npm pack --dry-run
- name: Test and qualify CodexWebUI
working-directory: CodexUI/codexui
run: |
npm ci --prefix web
npm run release --prefix web
- name: Stage and verify the CodexWebUI install
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