Commit 940d840b

940d840b79deMerged

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

Description

ci: speed up Windows + posix runs

Three changes that shave significant time off the 10-minute Windows CI run:

A. msys2/setup-msys2 gets cache: true so the pacman package set carries over between runs (save ~1m on the install step).

B. make all runs with LTO=0 everywhere. The local-dev default of -O3 -flto=auto is for shipping a fast spinel_codegen; CI only uses the binary to run the test suite, so the link-time tax (worst on Windows) buys nothing here.

C. Cache the MSYS2 Gem.dir and skip gem install prism -v 1.9.0 on cache hits. Posix's gem install is fast enough to leave alone.

Estimated wins: Windows ~10m → ~7m; posix ~3-4m → ~2-3m.

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

Details

Commit
940d840b79de
Parent
24e6a84a7b96

.github/workflows/ci.ymlmodifiedView file

@@ -40,8 +40,11 @@
4040 - name: Fetch libprism sources
4141 run: make deps
4242
43- - name: Build (parse + regexp + bootstrap)
44- run: make -j$(getconf _NPROCESSORS_ONLN) all
43+ # CI builds spinel_codegen for testing only — `-O3 -flto` adds
44+ # link time on every job (especially Windows) without buying us
45+ # anything CI cares about. LTO=0 keeps the local-dev default.
46+ - name: Build (parse + regexp + codegen)
47+ run: make -j$(getconf _NPROCESSORS_ONLN) LTO=0 all
4548
4649 - name: Run tests
4750 run: make test
@@ -62,6 +65,9 @@
6265 with:
6366 msystem: MINGW64
6467 update: false
68+ # Reuse the pacman package set across runs — saves ~1m of
69+ # download/install on every job.
70+ cache: true
6571 install: >-
6672 base-devel
6773 mingw-w64-x86_64-toolchain
@@ -78,14 +84,26 @@
7884 ruby --version
7985 make --version | head -1
8086
87+ - name: Resolve MSYS2 gem dir
88+ id: gemdir
89+ run: echo "path=$(ruby -e 'puts Gem.dir')" >> "$GITHUB_OUTPUT"
90+
91+ - name: Cache prism gem
92+ id: cache-prism
93+ uses: actions/cache@v4
94+ with:
95+ path: ${{ steps.gemdir.outputs.path }}
96+ key: prism-mingw64-1.9.0
97+
8198 - name: Install prism gem (codegen bootstrap step 2 needs it)
99+ if: steps.cache-prism.outputs.cache-hit != 'true'
82100 run: gem install prism -v 1.9.0
83101
84102 - name: Fetch libprism sources
85103 run: make deps
86104
87- - name: Build (parse + regexp + bootstrap)
88- run: make -j$(nproc) all
105+ - name: Build (parse + regexp + codegen)
106+ run: make -j$(nproc) LTO=0 all
89107
90108 - name: Run tests
91109 run: make test