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
- name: Fetch libprism sources run: make deps - name: Build (parse + regexp + bootstrap) run: make -j$(getconf _NPROCESSORS_ONLN) all # CI builds spinel_codegen for testing only — `-O3 -flto` adds # link time on every job (especially Windows) without buying us # anything CI cares about. LTO=0 keeps the local-dev default. - name: Build (parse + regexp + codegen) run: make -j$(getconf _NPROCESSORS_ONLN) LTO=0 all - name: Run tests run: make test with: msystem: MINGW64 update: false # Reuse the pacman package set across runs — saves ~1m of # download/install on every job. cache: true install: >- base-devel mingw-w64-x86_64-toolchain ruby --version make --version | head -1 - name: Resolve MSYS2 gem dir id: gemdir run: echo "path=$(ruby -e 'puts Gem.dir')" >> "$GITHUB_OUTPUT" - name: Cache prism gem id: cache-prism uses: actions/cache@v4 with: path: ${{ steps.gemdir.outputs.path }} key: prism-mingw64-1.9.0 - name: Install prism gem (codegen bootstrap step 2 needs it) if: steps.cache-prism.outputs.cache-hit != 'true' run: gem install prism -v 1.9.0 - name: Fetch libprism sources run: make deps - name: Build (parse + regexp + bootstrap) run: make -j$(nproc) all - name: Build (parse + regexp + codegen) run: make -j$(nproc) LTO=0 all - name: Run tests run: make test