Commit 4551b5d
committed
ci: dedup redundant tsc compilation in build/CI
The full source type graph was being recompiled ~8x per CI run. Root causes,
all confirmed against the files:
- Makefile: build-lib and build-web both declared 'clean' as a normal
prerequisite, so under 'make -j4' clean could run mid-write (rm -rf build
racing tsup/webpack output) and ran once per leaf target. Switch to a single
order-only prereq (| clean): make now runs clean exactly once and both
builders wait for it before starting. Verified via 'make -j4 -n build'.
- tsup.config.ts: clean:true re-wiped build/cjs even though the canonical
'yarn build' (= make clean build) already wipes the whole build/ tree first.
Set clean:false; standalone yarn build still cleans via make.
- test/typeCompat.test.ts: each run shells out to two full 'tsc' compiles of
the source type graph. CI runs 'yarn test' across a [20,22,24] Node matrix,
so this identical, Node-version-independent compile ran 3x. Gate the suite
behind SKIP_TSC_TYPE_COMPAT, which CI sets on every non-primary matrix node;
it runs once on Node 20 and always runs locally.
- ci.yml: the standalone 'typecheck' job (tsc --noEmit + tsc -p typings) was a
full second compile of work already done by 'make lint' in the lint job.
Removed it; lint is now the single owner of type-checking. Build step gated
to Node 20 (declaration emit is byte-identical across Node versions).
Net: full-graph tsc/dts compiles per CI run drop from ~8 to ~3 with no loss of
coverage. Verified: yarn build, yarn test (198 passed; 196+2 skipped with the
gate), yarn typecheck, yarn lint all green.1 parent 5611b11 commit 4551b5d
4 files changed
Lines changed: 40 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
47 | 56 | | |
| 57 | + | |
48 | 58 | | |
49 | 59 | | |
50 | 60 | | |
| |||
84 | 94 | | |
85 | 95 | | |
86 | 96 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | | - | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | | - | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
54 | 65 | | |
55 | 66 | | |
56 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
| |||
0 commit comments