Skip to content

CI: add Intel macOS, fix Homebrew paths and ASAN preload - #82

Open
pnavais wants to merge 1 commit into
rrthomas:masterfrom
pnavais:ci/update-workflow
Open

pnavais wants to merge 1 commit into
rrthomas:masterfrom
pnavais:ci/update-workflow

Conversation

@pnavais

@pnavais pnavais commented Sep 30, 2026 •

Copy link
Copy Markdown

This updates .github/workflows/c-cpp.yml to cover Intel macOS and fixes a few problems in the existing macOS and Ubuntu setup.

Changes:

  • Intel macOS: add macos-15-intel to the matrix. macos-latest only runs on Apple silicon, so x86_64 macOS was never built.
  • fail-fast: false: a failure on one platform no longer cancels the others. Currently a macOS failure cancels both Windows jobs.
  • Python on macOS: install it with actions/setup-python and get setuptools and Cython from pip. brew install python@3.12 fails at the link step on Intel runners, because the image ships a python.org framework in /usr/local/bin.
  • Homebrew paths: derive LDFLAGS/CPPFLAGS from $(brew --prefix). The hard-coded /usr/local/opt does not exist on Apple silicon (/opt/homebrew).
  • ASAN preload on Ubuntu: find libasan.so with gcc -print-file-name. The hard-coded gcc 11 path no longer exists on ubuntu-latest, so the preload was silently ignored (ERROR: ld.so: object '/usr/lib/gcc/x86_64-linux-gnu/11/libasan.so' from LD_PRELOAD cannot be preloaded).
  • actions/checkout: bump v3 → v7 (v3 runs on the deprecated Node 20).

Depends on #81. On current master, both macOS jobs fail with Charset WINDOWS-874 already exists and is not CP874, which is the bug #81 fixes. So this PR's macOS checks will be red until #81 is merged.

Test runs in my fork:

- Add macos-15-intel to the matrix so x86_64 macOS is built alongside
  macos-latest (arm64), and set fail-fast: false so one failing
  platform does not cancel the others.
- Install Python with actions/setup-python on macOS: brew install
  python@3.12 fails to link on Intel runners, which ship a python.org
  framework in /usr/local/bin.  Get setuptools and Cython from pip.
- Derive LDFLAGS/CPPFLAGS from brew --prefix instead of hard-coding
  /usr/local, which does not exist on Apple silicon.
- Locate libasan.so with gcc -print-file-name instead of a gcc 11 path,
  which is missing on current ubuntu-latest so the preload was ignored.
- Bump actions/checkout to v7 (v3 runs on the deprecated Node 20).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant