Commit 5a321da2

5a321da268b9Merged

Yukihiro "Matz" Matsumoto <[email protected]> · 6 months ago · 2 files · ~2 modified

Description

ci: -O0 for test compilation, big chunk off Windows cc time

make test compiles each of the ~260 generated test programs with $(CFLAGS) -Werror. CFLAGS hardcoded -O2; on Windows that's the single largest contributor to total CI time (5m36s of a 9m run). The optimizer's output isn't load-bearing for tests — they run for milliseconds, then exit — so dropping to -O0 keeps the type-checking side of -Werror while skipping the optimization pass.

  • Makefile: split out an OPT ?= -O2 knob; CFLAGS pulls from it. Local default unchanged; CI overrides to -O0.
  • ci.yml: pass OPT=-O0 to the make test line on every job.

Co-Authored-By: Claude Opus 4.7 (1M context) [email protected]

Details

Commit
5a321da268b9
Parent
03243f94098b

.github/workflows/ci.ymlmodifiedView file

@@ -44,7 +44,10 @@
4444 run: make -j$(getconf _NPROCESSORS_ONLN) LTO=0 all
4545
4646 - name: Run tests
47- run: make test
47+ # OPT=-O0 cuts cc time per test (each .rb compiles its own
48+ # generated C with $(CFLAGS) -Werror). Type-checking still
49+ # happens; we just skip the optimizer.
50+ run: make test OPT=-O0
4851
4952 windows-mingw:
5053 name: windows-mingw
@@ -88,4 +91,4 @@
8891 run: make -j$(nproc) LTO=0 all
8992
9093 - name: Run tests
91- run: make test
94+ run: make test OPT=-O0