-
Notifications
You must be signed in to change notification settings - Fork 1
233 lines (204 loc) · 7.24 KB
/
developer-tools-ci.yml
File metadata and controls
233 lines (204 loc) · 7.24 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
name: Developer Tools CI
permissions:
contents: read
on:
pull_request:
paths:
- "tools/cli/**"
- "tools/tools/vscode-extension/**"
- "frontend/dashboard/**"
- "integrations/apps/fastapi-verifier/**"
- "integrations/apps/nextjs-verifier/**"
- "integrations/deploy/docker/docker-compose.local-testnet.yml"
- "integrations/deploy/docker/Dockerfile.fastapi-verifier"
- "integrations/deploy/docker/Dockerfile.nextjs-api"
- "integrations/deploy/docker/Dockerfile.dashboard-devtools"
- "integrations/deploy/docker/mock-rpc-server.py"
- "scripts/devtools-cli-smoke.sh"
- "sdk/typescript/**"
- ".github/workflows/developer-tools-ci.yml"
push:
branches: ["main", "master"]
paths:
- "tools/cli/**"
- "tools/tools/vscode-extension/**"
- "frontend/dashboard/**"
- "integrations/apps/fastapi-verifier/**"
- "integrations/apps/nextjs-verifier/**"
- "integrations/deploy/docker/docker-compose.local-testnet.yml"
- "integrations/deploy/docker/Dockerfile.fastapi-verifier"
- "integrations/deploy/docker/Dockerfile.nextjs-api"
- "integrations/deploy/docker/Dockerfile.dashboard-devtools"
- "integrations/deploy/docker/mock-rpc-server.py"
- "scripts/devtools-cli-smoke.sh"
- "sdk/typescript/**"
- ".github/workflows/developer-tools-ci.yml"
jobs:
changes:
name: Detect developer tools changes
runs-on: ubuntu-latest
outputs:
cli: ${{ steps.filter.outputs.cli }}
vscode_extension: ${{ steps.filter.outputs.vscode_extension }}
dashboard: ${{ steps.filter.outputs.dashboard }}
dashboard_package: ${{ steps.dashboard_package.outputs.exists }}
local_testnet: ${{ steps.filter.outputs.local_testnet }}
steps:
- uses: actions/checkout@v4
- name: Detect dashboard package manifest
id: dashboard_package
run: |
if [ -f frontend/dashboard/package.json ]; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
fi
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
cli:
- 'tools/cli/**'
- 'sdk/typescript/**'
vscode_extension:
- 'tools/tools/vscode-extension/**'
dashboard:
- 'frontend/dashboard/**'
local_testnet:
- 'integrations/apps/fastapi-verifier/**'
- 'integrations/apps/nextjs-verifier/**'
- 'integrations/deploy/docker/docker-compose.local-testnet.yml'
- 'integrations/deploy/docker/Dockerfile.fastapi-verifier'
- 'integrations/deploy/docker/Dockerfile.nextjs-api'
- 'integrations/deploy/docker/mock-rpc-server.py'
- 'scripts/devtools-cli-smoke.sh'
- 'tools/cli/aethel/**'
- 'tools/cli/seal-verifier/**'
- 'sdk/typescript/**'
cli-builds:
runs-on: ubuntu-latest
needs: changes
if: ${{ github.event_name == 'workflow_dispatch' || needs.changes.outputs.cli == 'true' }}
strategy:
fail-fast: false
matrix:
cli_dir:
- tools/cli/aethel
- tools/cli/seal-verifier
- tools/cli/model-registry
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v6
with:
node-version: 20
- name: "Build local TypeScript SDK for file deps"
if: ${{ matrix.cli_dir == 'tools/cli/aethel' || matrix.cli_dir == 'tools/cli/seal-verifier' }}
run: |
cd sdk/typescript
npm install
npm run build
- name: Install dependencies
run: |
cd ${{ matrix.cli_dir }}
npm install
- name: Build CLI
run: |
cd ${{ matrix.cli_dir }}
npm run build
vscode-extension:
runs-on: ubuntu-latest
needs: changes
if: ${{ github.event_name == 'workflow_dispatch' || needs.changes.outputs.vscode_extension == 'true' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v6
with:
node-version: 20
- name: "Build local TypeScript SDK for file dep"
run: |
cd sdk/typescript
npm install
npm run build
- name: Install extension dependencies
run: |
cd tools/tools/vscode-extension
npm install
- name: Run unit tests
run: |
cd tools/tools/vscode-extension
npm test
- name: Build extension bundle
run: |
cd tools/tools/vscode-extension
npm run build
dashboard-build:
runs-on: ubuntu-latest
needs: changes
if: ${{ (github.event_name == 'workflow_dispatch' || needs.changes.outputs.dashboard == 'true') && needs.changes.outputs.dashboard_package == 'true' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v6
with:
node-version: 20
- name: Install dashboard dependencies
run: |
cd frontend/dashboard
npm install
- name: Build dashboard
run: |
cd frontend/dashboard
npm run build
local-testnet-compose-validate:
runs-on: ubuntu-latest
needs: changes
if: ${{ github.event_name == 'workflow_dispatch' || needs.changes.outputs.local_testnet == 'true' }}
steps:
- uses: actions/checkout@v4
- name: Validate local testnet compose config
run: |
docker compose -f integrations/deploy/docker/docker-compose.local-testnet.yml config >/tmp/local-testnet-compose.yaml
test -s /tmp/local-testnet-compose.yaml
local-testnet-cli-smoke:
runs-on: ubuntu-latest
needs: changes
if: ${{ github.event_name == 'workflow_dispatch' || needs.changes.outputs.local_testnet == 'true' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v6
with:
node-version: 20
- name: "Build local TypeScript SDK for file deps"
run: |
cd sdk/typescript
npm install
npm run build
- name: Install and build aethel CLI
run: |
cd tools/cli/aethel
npm install
npm run build
- name: Install and build seal-verifier CLI
run: |
cd tools/cli/seal-verifier
npm install
npm run build
- name: Start mock local devtools stack
run: |
docker compose -f integrations/deploy/docker/docker-compose.local-testnet.yml --profile mock up -d --build
- name: Run CLI smoke checks
env:
AETHELRED_SMOKE_SKIP_DASHBOARD: "1"
run: |
./scripts/devtools-cli-smoke.sh
- name: Dump compose status
if: always()
run: |
docker compose -f integrations/deploy/docker/docker-compose.local-testnet.yml --profile mock ps
- name: Dump compose logs on failure
if: failure()
run: |
docker compose -f integrations/deploy/docker/docker-compose.local-testnet.yml --profile mock logs --no-color --tail=200
- name: Stop mock local devtools stack
if: always()
run: |
docker compose -f integrations/deploy/docker/docker-compose.local-testnet.yml --profile mock down -v