Skip to content

Fix macOS CI by installing gcc for gfortran - #42

Merged
HmUmaxKhan merged 3 commits into
masterfrom
fix/macos-ci-gfortran
Aug 4, 2026
Merged

Fix macOS CI by installing gcc for gfortran#42
HmUmaxKhan merged 3 commits into
masterfrom
fix/macos-ci-gfortran

Conversation

@HmUmaxKhan

Copy link
Copy Markdown
Contributor

The macOS setup step only prepended $(brew --prefix gcc)/bin to PATH without installing the formula. brew --prefix exits 0 for any known formula whether or not it is installed, so the step passed while adding a non-existent directory, and meson then failed with "Unknown compiler(s)" when detecting Fortran.

Install gcc (which provides gfortran) and verify it, so a missing toolchain fails loudly at setup instead of inside meson.

Applied to build.yml, test.yml and release-pypi.yml -- the last of which would otherwise publish a release with no macOS wheels.

The macOS setup step only prepended $(brew --prefix gcc)/bin to PATH
without installing the formula. brew --prefix exits 0 for any known
formula whether or not it is installed, so the step passed while
adding a non-existent directory, and meson then failed with
"Unknown compiler(s)" when detecting Fortran.

Install gcc (which provides gfortran) and verify it, so a missing
toolchain fails loudly at setup instead of inside meson.

Applied to build.yml, test.yml and release-pypi.yml -- the last of
which would otherwise publish a release with no macOS wheels.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

HmUmaxKhan and others added 2 commits August 4, 2026 07:40
macos-latest has rolled to macOS 26, so Homebrew serves gcc bottles
whose libgfortran, libquadmath and libgcc_s carry minos 26.0.
delocate vendors those into the wheel and then rejects them against
MACOSX_DEPLOYMENT_TARGET=15.0, since the result would install on
macOS 15 and fail at import.

Pin the runner to macos-15 so the bottles match the wheel target.
The image and MACOSX_DEPLOYMENT_TARGET must now be kept in sync.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
test_banana_no_constraints called pso() with no seed while asserting
convergence to within atol=0.001. PSO is stochastic, so the assertion
fails on roughly 1.3% of runs (measured over 300 unseeded runs; worst
deviation 1.77e-02, 17x the tolerance). Across a 15-job matrix that is
about a 1-in-5 chance of a red run with nothing actually broken.

Pin seed=2, which converges to within 1.4e-06 -- a 707x margin under
the tolerance, so platform floating-point differences cannot cross it.
Seed the constrained variant likewise; every other test in the suite
already pins a seed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

@HmUmaxKhan
HmUmaxKhan merged commit f9cb6e4 into master Aug 4, 2026
23 checks passed
@HmUmaxKhan
HmUmaxKhan deleted the fix/macos-ci-gfortran branch August 4, 2026 03: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.

2 participants