Skip to content

fix(analyze): bound fixed-point loops and const-path recursion #1120

fix(analyze): bound fixed-point loops and const-path recursion

fix(analyze): bound fixed-point loops and const-path recursion #1120

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
posix:
name: ${{ matrix.os }} / ${{ matrix.cc }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
cc: gcc
- os: ubuntu-latest
cc: clang
- os: macos-latest
cc: clang
env:
# `sccache <cc>` wrapper. sccache forwards through to the
# underlying compiler when its cache misses, so this stays
# transparent. `SCCACHE_GHA_ENABLED=true` tells sccache to
# use the GitHub Actions cache as its storage backend (set
# up by the sccache-action step below). PR #230 split the
# test/bench rules into separate compile and link steps so
# the compile step is in sccache's cacheable pattern.
CC: sccache ${{ matrix.cc }}
SCCACHE_GHA_ENABLED: "true"
steps:
- uses: actions/checkout@v6
- name: Set up sccache
uses: mozilla-actions/sccache-action@v0.0.10
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4"
- name: Expose GNU coreutils on PATH (macOS)
if: runner.os == 'macOS'
run: echo "/opt/homebrew/opt/coreutils/libexec/gnubin" >> "$GITHUB_PATH"
- name: Fetch libprism sources
run: make deps
# 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
# OPT=-O0 cuts cc time per test (each .rb compiles its own
# generated C with $(CFLAGS) -Werror). Type-checking still
# happens; we just skip the optimizer.
# -j$(...) overlaps the per-test cc invocations.
run: make -j$(getconf _NPROCESSORS_ONLN) test OPT=-O0
# End-to-end optcarrot integration test. Linux only — no
# value in repeating it across compilers / on macOS, since
# the codegen output is the same and the runtime cost
# (~10s) is the same too. Catches regressions in the
# `pack-for-spinel.rb` flow + Lan_Master.nes checksum 59662
# contract that the standalone `make test` doesn't cover.
- name: Run optcarrot integration test
if: matrix.os == 'ubuntu-latest' && matrix.cc == 'gcc'
run: make optcarrot
- name: sccache stats
if: always()
run: sccache --show-stats
windows-mingw:
name: windows-mingw
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
env:
CC: sccache gcc
SCCACHE_GHA_ENABLED: "true"
steps:
- uses: actions/checkout@v6
- name: Set up MSYS2 (MINGW64)
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: false
# Reuse the pacman package set across runs — saves ~1m of
# download/install on every job.
cache: true
path-type: inherit
install: >-
base-devel
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-ruby
make
diffutils
curl
tar
# Install the sccache binary on the Windows-side PATH; MSYS2
# inherits Windows PATH (path-type: inherit, above) so the
# `sccache` command resolves from the bash shell that make
# invokes.
- name: Set up sccache
uses: mozilla-actions/sccache-action@v0.0.10
- name: Show toolchain
run: |
uname -a
gcc --version
ruby --version
make --version | head -1
sccache --version
- name: Fetch libprism sources
run: make deps
- name: Build (parse + regexp + codegen)
run: make -j$(nproc) LTO=0 all
- name: Run tests
run: make -j$(nproc) test OPT=-O0
- name: sccache stats
if: always()
run: sccache --show-stats