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 ?= -O2knob; CFLAGS pulls from it. Local default unchanged; CI overrides to -O0. - ci.yml: pass
OPT=-O0to themake testline 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 all4545
4646
- name: Run tests47-
run: make test47+
# OPT=-O0 cuts cc time per test (each .rb compiles its own48+
# generated C with $(CFLAGS) -Werror). Type-checking still49+
# happens; we just skip the optimizer.50+
run: make test OPT=-O04851
4952
windows-mingw:5053
name: windows-mingw@@ -88,4 +91,4 @@
8891
run: make -j$(nproc) LTO=0 all8992
9093
- name: Run tests91-
run: make test94+
run: make test OPT=-O0MakefilemodifiedView file
Loading diff…