Repository navigation
ci(release): build Apple silicon on macOS 26, for macOS 14 and later - #2231
Conversation
GitHub retires the macOS 14 runner image on November 2, 2026. The CLI release (dist-workspace.toml) and the Python wheel move to macos-26-xlarge, and CI's Python job moves to macos-26 so it tests on the image releases build on. The Apple silicon builds now target macOS 14 rather than rustc's default of 11. MACOSX_DEPLOYMENT_TARGET in .cargo/config.toml reaches rustc and the C/C++ build scripts; the wheel jobs set it as well, since maturin tags the wheel from its own environment. The docs state the macOS 14 floor, and the platform list drops Intel macOS, which no release has shipped.
aaj3f
left a comment
There was a problem hiding this comment.
@bplatz this is a nice, tight fix, and at a design level no pushback from me: the runner moves where dist actually reads it, and [env] is the one place the deployment target reaches both rustc and the C/C++ builds under dist's RUSTFLAGS (details inline). On the floor itself: I'm on board with macOS 14. Every Apple silicon Mac can run it, 11 through 13 no longer get security updates, and nothing we ship was ever tested below 14 (the wheel tests ran on the macOS 14 image until now), so this mostly makes the docs say what we can actually stand behind. If you want it, the installers could say so too rather than hand an older Mac something that won't start: the pip sentence inline below, plus a depends_on macos: :sonoma in the formulae publish-homebrew-formula writes, so brew upgrade on macOS 13 refuses with a message and leaves the working version in place. Totally your call on that second half.
A small class note, not for this PR: this is the third build setting that lives in one config file but has to be restated per workflow, because the tool doing the build reads its own source instead, and the copies are kept in sync by comments. The others are the getrandom_backend cfg a job-level RUSTFLAGS masks (01bb3563a, c2b38ef96) and the release runners copied from dist-workspace.toml into python-release.yml (b70f3f44c); now MACOSX_DEPLOYMENT_TARGET, which maturin shadows. maturin's own config key would take this one to two copies (inline below). Beyond that, I think comments are the right altitude for config this small.
Since the macOS 14 image is already gone, I think this is good to merge as soon as it's ready: a tag cut before it lands has nowhere to build the Apple silicon artifacts.
Full review below:
✅ Approve with nits.
This one's carefully built for how small it is, @bplatz. Each runner label moves where its workflow really reads it (dist's plan on this head already picks macos-26-xlarge), the floor goes through the one cargo mechanism that survives dist's RUSTFLAGS, and the wheel jobs set the variable maturin would otherwise fill in with 11.0 itself. Nothing here blocks. The notes inline are the compatibility sentence about pip, which quietly installs 4.2.5 on an older macOS rather than finding nothing; a cheap check that fails a release if the floor ever stops reaching the build, since the CLI half won't run until the next tag; maturin's own key as the wheel's single source; and the installer headings.
Adherence to repo commitments:
- Patterns/abstractions: ✔ uses the places dist and maturin read (
[dist.github-custom-runners], cargo[env]), with no hand edit to the dist-generatedrelease.yml; maturin'smacos-deployment-targetkey would be the narrower home for the wheel's copy (optional). - Performance (speed first, memory second): ✔ no runtime code change, and the CPU baseline is unchanged.
MACOSX_DEPLOYMENT_TARGETisn't in rustc's dep-info, so Rust build caches keep their keys, and it isn't rustflags; no performance-degradation risk. - Deployment targets: ✔ n/a for runtime hosts: build config only. rustc and
ccignore the variable for non-Apple targets (wasm32, wasm-smoke and Linux jobs green on this head), and an embedder buildingfluree-db-apias a dependency never reads this repo's.cargo/config.toml, so the floor applies only to builds run from this checkout. The release side is covered for the wheel (dispatch run on this head) but not yet for the CLI (plan-only on a PR). - Testing:
⚠️ the wheel is built and tested onmacos-26-xlargeon this head; nothing asserts the floor (minos/ wheel tag), and the CLI's macOS build first runs at the next tag (optional inline). - Conventions: ✔ self-describing title and a thorough multi-line body; docs and the compatibility note updated in the same PR (one sentence needs fixing, inline).
Verified locally at branch HEAD: the head's wheel artifact (macosx_14_0_arm64, .so minos 14.0, no weak imports); v4.2.5's CLI (minos 11.0) and PyPI's wheels (all macosx_11_0_arm64, no sdist); the head's dist plan (macos-26-xlarge, plan-only); a scratch crate built the way dist builds ([env] → 14.0 on binary and cc object, [target] rustflags → 11.0); a pip resolution simulation for macOS 13; clean merges with #2219, #2214 and #2232.
Approving so you can merge when ready (and sooner is better here), but maybe worth folding in the pip sentence and the floor check first.
| # scripts of C and C++ dependencies read it (rustc's own default is 11.0). | ||
| # maturin tags a wheel from its own environment, not this table, so the wheel | ||
| # jobs in python-release.yml and ci.yml set the same value. | ||
| MACOSX_DEPLOYMENT_TARGET = "14.0" |
There was a problem hiding this comment.
Praise. I like that this goes through [env] rather than a [target.aarch64-apple-darwin] rustflags entry. dist always sets RUSTFLAGS on its cargo build, as an empty string when nothing else asks for flags (cargo-dist/src/build/cargo.rs:73 and :220 at v0.31.0), and a set RUSTFLAGS masks config rustflags entirely, the same thing the wasm note below this works around.
I had Claude check both routes on a throwaway crate built the way dist builds (RUSTFLAGS="" cargo build --release --target aarch64-apple-darwin, with a cc build script). The [env] route gives minos 14.0 on the binary and on the cc-built object, while the rustflags route quietly gives minos 11.0. So this is the one place the value can live and still reach the release build.
|
|
||
| #### macOS builds need macOS 14 or later | ||
|
|
||
| The CLI binary and the Python wheel for Apple silicon are built for macOS 14 (Sonoma) and later; earlier releases ran on macOS 11. On an older macOS the CLI does not start, and `pip install fluree` finds no wheel to install. |
There was a problem hiding this comment.
Optional (but I'd fix the pip sentence before merge). The last sentence doesn't quite match what pip does on an older macOS. pip doesn't stop at the newest version: it skips any release with no wheel for the platform and installs the newest one that has one. Every fluree on PyPI so far is macosx_11_0_arm64 (4.2.4, 4.2.5, 5.0.0a1, and no sdist), so on macOS 13 pip install fluree will quietly install 4.2.5. Only a pinned pip install fluree==<new version> reports that nothing matches.
Claude simulated this with two stand-in wheels (an 11_0 one at 4.2.5 and a 14_0 one at 4.3.0) and pip download --platform macosx_13_0_arm64: it picked 4.2.5, and the pinned request failed with "No matching distribution found". Something like:
| The CLI binary and the Python wheel for Apple silicon are built for macOS 14 (Sonoma) and later; earlier releases ran on macOS 11. On an older macOS the CLI does not start, and `pip install fluree` finds no wheel to install. | |
| The CLI binary and the Python wheel for Apple silicon are built for macOS 14 (Sonoma) and later; earlier releases ran on macOS 11. On an older macOS the CLI does not start, and `pip install fluree` installs the last release built for macOS 11 instead; asking for a later version by number finds no wheel. |
Related, and more of a question than a suggestion: Homebrew is the same story from the other side. The formula carries no OS requirement (v4.2.5's fluree.rb gates only on OS.mac? and Hardware::CPU.arm?), so brew upgrade on macOS 13 will install a binary that won't start. A depends_on macos: :sonoma would make brew refuse with a clear message and leave the working version in place. As far as I can tell dist doesn't generate that line, but publish-homebrew-formula in release.yml already rewrites each formula with awk for the beta, so it would be one more line there, for both fluree.rb and fluree-beta.rb. I haven't checked where brew style wants it relative to the if OS.mac? blocks.
This is minor and non-blocking, but if you agree it's right, I'd rather see it folded in now than lost in the backlog.
There was a problem hiding this comment.
Addressed in bd80c0b. The Homebrew line is inside on_macos do … end: at the top level a macOS requirement makes Homebrew treat the formula as macOS-only (Formula#supports_linux?) and refuse it on Linux.
| timeout-minutes: 150 | ||
| env: | ||
| # .cargo/config.toml's value; maturin reads it to tag the macOS wheel. | ||
| MACOSX_DEPLOYMENT_TARGET: "14.0" |
There was a problem hiding this comment.
Optional. This is more of a suggestion than a must. maturin can carry this value itself: [tool.maturin.target."aarch64-apple-darwin"] macos-deployment-target = "14.0" in fluree-db-python/pyproject.toml (supported since maturin 0.15; we require >=1.9). maturin uses it for the wheel tag and exports it to cargo when its environment has no MACOSX_DEPLOYMENT_TARGET (src/compile.rs:965-997 in maturin 1.16). So it would cover every maturin build (this job, the CI job, a local maturin build, pip install ./fluree-db-python), and the two workflow env blocks could go, which takes the copies of 14.0 from three to two.
One small thing about the comments too, if I'm reading maturin right. Without this variable the wheel isn't mis-tagged: it's quietly built and tagged for 11.0, because maturin sets MACOSX_DEPLOYMENT_TARGET=11.0 (rustc's default) on its own cargo command, and a process variable wins over cargo's [env] table. So a missed copy lowers the floor silently rather than breaking anything, which may be the better argument for one source.
Minor and non-blocking, but if you agree, I'd rather see it in this PR than lost in the backlog.
| # The default 3-core/7GB runner took ~3h for v4.2.0, whose only macOS target | ||
| # was this one; on xlarge it takes 30-55 min. The image matches the wheel job | ||
| # in python-release.yml and the python job in ci.yml. | ||
| aarch64-apple-darwin = "macos-26-xlarge" |
There was a problem hiding this comment.
Optional. (Real location: .github/workflows/release.yml, build-local-artifacts.) Nothing checks the floor once it's set, and the CLI half hasn't run yet. This PR's Release run was plan-only (pr_run_mode: plan, so build-local-artifacts was skipped), which means the first dist build on macos-26-xlarge with this config will be the next tag. The wheel half did run: the workflow_dispatch of python-release.yml on this head built fluree-4.2.5-cp310-abi3-macosx_14_0_arm64.whl, and its .so reads minos 14.0, sdk 26.5. So I'm not worried about the mechanism. What I'd want is something that fails the release if the value ever stops reaching the build: a variable some future job exports, a dependency that brings its own deployment target, or a dist upgrade that changes how it calls cargo.
Two small steps would do it. In release.yml's build-local-artifacts, after "Build artifacts":
- name: The macOS binary targets macOS 14
if: runner.os == 'macOS'
run: vtool -show-build target/aarch64-apple-darwin/dist/fluree | grep -q 'minos 14.0'and in python-release.yml, after "Build the wheel":
- name: The macOS wheel targets macOS 14
if: runner.os == 'macOS'
shell: bash
run: |
whl=$(ls dist/*.whl); [[ $whl == *-macosx_14_0_arm64.whl ]]
unzip -q -o "$whl" 'fluree/*.so' -d "$RUNNER_TEMP/whl"
vtool -show-build "$RUNNER_TEMP"/whl/fluree/*.so | grep -q 'minos 14.0'Both run before anything publishes (host and publish need those jobs). To go a step further, a job on macos-15, the oldest image GitHub still has, that installs the built wheel and runs the pytest suite would be the only thing that runs a shipped artifact on an OS older than the one it was built on.
Minor and non-blocking, but if you agree it's worth it, I'd rather see it folded in now than lost in the backlog.
Commenting here because .github/workflows/release.yml is not in this diff.
There was a problem hiding this comment.
Addressed in bd80c0b. The wheel check also runs in ci.yml's python job, so every PR exercises it; I left out the macos-15 job.
| chmod +x fluree-db-cli-x86_64-unknown-linux-gnu/fluree | ||
|
|
||
| # macOS (Apple Silicon) | ||
| # macOS 14 or later (Apple Silicon) |
There was a problem hiding this comment.
Optional (nit). Not a big deal, but the floor only shows up beside the direct-download curl, and most people will come in through the shell installer or Homebrew, whose headings still just say "macOS / Linux": quickstart-server.md:7 and :13, docs/memory/getting-started/install.md:5 and :12, docs/unstructured/getting-started/install.md:6 and :9, and the top-level README.md:32-35. A "(macOS 14 or later)" on each of those, or one line under the Installation heading, would keep someone on macOS 13 from finding out at first launch.
Minor, but if you agree, I'd rather see it in this PR than lost in the backlog.
…s older macOS The wheel's deployment target moves into pyproject.toml as maturin's own `macos-deployment-target`, replacing the MACOSX_DEPLOYMENT_TARGET env in python-release.yml and ci.yml. maturin sets rustc's default, 11.0, on its cargo command when nothing tells it otherwise, and that wins over cargo's [env] table, so a missed workflow copy built and tagged an 11.0 wheel with no error. The key reaches every maturin build: the release and CI jobs, a local `maturin build`, `pip install ./fluree-db-python`. Each macOS build now fails unless what it produced targets macOS 14: the CLI binary in release.yml's build-local-artifacts (before host and publish), and the wheel's tag and extension in python-release.yml and in ci.yml's python job, which runs on every PR. The check reads `minos` with vtool; it fails on v4.2.5's binary (minos 11.0). The Homebrew formulae, stable and beta, gain `depends_on macos: :sonoma` inside `on_macos`, so `brew upgrade` on an older macOS refuses with a message and keeps the working version. At the top level the requirement would make Homebrew treat the formula as macOS-only and refuse it on Linux (Formula#supports_linux?). The rewrite fails the job if dist's formula has no `license` line to anchor on. brew style reports nothing new on v4.2.5's formula rewritten this way. compatibility.md now says what pip does on an older macOS: it installs the last release built for macOS 11, and only a pinned later version finds no wheel. The installer instructions name the macOS 14 floor, without changing any heading's anchor.
Brings #2247, #2232, #2246, #2248, #2245, #2230, #2205, #2231, #2255, #2219, #2209, #2207, #2190, #2216, #2186, #2215, #2213, #2184, #2210, #2206, #2198, #2187, #2183, #2200, #2193, #2199, #2196 and #2145 into next. Resolutions: - Novelty: main's fact-state trim (a cutoff plus a bounded sweep) and the dictionary's coverage watermark sit on next's graph slots and per-graph OrdMaps. A commit's reification links count toward coverage. Planner stats from segment sums decline under annotations, whose link deltas only the walk counts, and otherwise carry the indexed link counts. - Stats-view identity: the index root's id reaches the snapshot through next's root decoder (`decode` takes the id, as `take_snapshot_metadata` does). `LedgerState::load_record` has a decoding-root form beside `load_decoding_root`. - Transact: #2184's parallel-relationship check runs in next's link cascade, counting the `rdf:reifies` links on the retracted edge that the transaction does not retract itself. Main's bundle `edge_reifiers` is dropped, and `subjects_with_prior_rows` and `enforce_single_target_reifiers` stay deleted. The upsert pre-check takes main's dictionary probe and bounded seek. - Query: geo search resolves the graph's POST tree once at open (pooled graphs keep their filter), an empty manifest when there is none. `branch_or_none` reads the dedicated branch, and the batched joins keep next's pooled lanes. The stats-view key hashes the root id. - Indexer: `apply_dict_novelty` and `compact_forward_streams` take the cycle's compaction budget, so the term dictionary keeps its reserved share. `Prefetched` holds `ContentBytes`. `relocalize_sorted_commit` rewrites next's 20-byte types records. - Disk cache: main's in-flight write registration, with an empty entry still read as crash debris that a write replaces. The process-wide eviction walk stays removed. - Graph import (#2232): fenced CAS and publishes, the seed carries the record's namespace and fence, 32-bit graph ids and next's loaders. An import into a graph of an existing ledger refuses triple terms and edge annotations: the splice merges no triple-term dictionary yet. - Iceberg: `create_iceberg_graph_source` goes with main (a source needs a mapping); the R2RML path keeps next's `model_instance`. - CLI: main's shared import flags without the leaflet flags; `graph import` routes through next's process-wide server routing, and `upload_source_import` serves next's `Destination`. Doc sources read a ledger through the command's open instance. - Tests: sibling ledger ids become distinct names, `genesis_ledger` is awaited, Cypher state dumps include each relationship's `rdf:reifies` link, and the graph-import arena test checks the refusal instead.
GitHub retires the macOS 14 runner image on November 2, 2026; v4.2.5's Apple silicon jobs were already cancelled by its brownout and had to be re-run outside it. Both release builds move off it:
dist-workspace.toml):aarch64-apple-darwinbuilds onmacos-26-xlarge. cargo-dist reads this at plan time, sorelease.ymlis unchanged.python-release.yml):macos-26-xlarge.ci.ymlpython job):macos-15→macos-26, so the Python tests run on the image releases build on.The xlarge runner stays: v4.2.0's Apple silicon build took ~3h on the default 3-core/7GB runner, against 30–55 min on xlarge since.
macOS 14 minimum
The Apple silicon builds now target macOS 14 (Sonoma) instead of rustc's default, macOS 11. The CPU baseline is unchanged (M1), so every Apple silicon Mac on macOS 14 or later runs them.
.cargo/config.tomlsetsMACOSX_DEPLOYMENT_TARGET = "14.0"in[env], which reaches rustc and the cc/cmake build scripts of C and C++ dependencies. It covers the cargo-dist build and local builds.python-release.ymlandci.ymlset the same variable, because maturin tags the wheel (macosx_14_0_arm64) from its own environment, not from cargo's config.On an older macOS the CLI does not start and
pip install flureefinds no wheel;docs/reference/compatibility.mdrecords this under Behavior changes.Docs
The platform list in
compatibility.mdsaid "macOS (Intel, Apple Silicon)"; no v4 release has shipped an Intel macOS build. It now says macOS 14 or later on Apple silicon, as do the Python wheel lists (docs/getting-started/python.md,fluree-db-python/README.md) and the pre-built binary downloads in the install pages.