-
Notifications
You must be signed in to change notification settings - Fork 1
126 lines (110 loc) · 3.88 KB
/
Copy pathci.yml
File metadata and controls
126 lines (110 loc) · 3.88 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
name: CI
on:
push:
branches: [main]
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
# build each watchface (regenerates the manifest, compiles the TS pkjs, runs pebble build).
# one job per face so a failing face does not block the others' artifacts
pebble:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
face: [lcars-stardate, radar-array, ide-vscode, gridlock, sidereel, ridgeline, shoreline, treeline]
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/setup-pebble
# build.sh <face> regenerates the manifest, compiles watchfaces/<face>/src/pkjs + lib/ts
# into targets/<face>/emit/, then runs `pebble build`. node (setup-node) and pebble (uv,
# on GITHUB_PATH) are both available here.
# tee'd because the SDK's memory report is printed during the link and is the only place
# the heap figure exists. shell: bash for pipefail, or a failed build would pass as long as
# tee succeeded
- name: Build Watchface
shell: bash
run: bash build.sh ${{ matrix.face }} | tee build-${{ matrix.face }}.log
# one row per target, collected by the memory job below. GITHUB_STEP_SUMMARY is per job, so
# a table written here would be one of seven scattered across the matrix
- name: Collect Memory Usage
if: always()
run: bash tools/ci/report-memory.sh build-${{ matrix.face }}.log ${{ matrix.face }} mem-${{ matrix.face }}.tsv
- uses: actions/upload-artifact@v7
if: always()
with:
name: mem-${{ matrix.face }}
path: mem-${{ matrix.face }}.tsv
if-no-files-found: warn
# a face usually builds one sandbox (targets/<face>/), but gridlock builds two
# (targets/gridlock-face/ and targets/gridlock-app/). the <face>* glob catches both
# while still matching the single sandbox for every other face
- uses: actions/upload-artifact@v7
with:
name: pbw-${{ matrix.face }}
path: |
targets/${{ matrix.face }}*/build/*.pbw
if-no-files-found: error
# every face's memory in one table, which is the only shape that answers "which one is closest
# to the edge". always() so a single face failing to build still reports the rest
memory:
runs-on: ubuntu-latest
needs: pebble
if: always()
steps:
- uses: actions/checkout@v7
- uses: actions/download-artifact@v7
with:
pattern: mem-*
path: mem
merge-multiple: true
- name: Memory Summary
run: bash tools/ci/render-memory.sh mem
vitest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm test
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run lint
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run typecheck
# host C unit tests over the lib/c/core maths. no SDK or node needed: gcc and make ship on the
# runner
c-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
# shell: bash for pipefail. the default shell is `bash -e` without it, which would report
# tee's exit code and let a failing suite pass
- name: Run C Tests
shell: bash
run: make -C lib/c/spec | tee c-tests.log
# always() so a failing suite still reports its numbers
- name: C Test Summary
if: always()
run: bash tools/ci/report-c-tests.sh c-tests.log