Skip to content

Commit c1908c3

Browse files
bvu405meta-codesync[bot]
authored andcommitted
Pin MACOSX_DEPLOYMENT_TARGET on the OSS CI macOS
Summary: The OSS CI macOS legs are failing to compile snapshot_lib/SnapshotReader.cpp on Xcode 16.4: error: 'is_absolute' is unavailable: introduced in macOS 10.15 unknown if (src.is_absolute()) { ... } ^ note: 'is_absolute' has been explicitly marked unavailable here _LIBCPP_HIDE_FROM_ABI bool is_absolute() const { ... } ^ Cause: the Python.org universal2 frameworks that actions/setup-python@v5 installs for 3.12+ declare a MACOSX_DEPLOYMENT_TARGET of 10.13 in sysconfig (x86_64 slice). setuptools propagates that into the C++ extension build via -mmacosx-version-min=10.13, which is below the 10.15 floor where libc++ marks std::filesystem::path symbols available, so the compiler refuses any use of is_absolute(), the path destructor, etc. This diff sets MACOSX_DEPLOYMENT_TARGET=11.0 at the build-and-test job level so the env var is in scope before setup-python runs and before \`pip install -v .\` builds the extension. 11.0 (rather than the 10.15 strictly required by std::filesystem) matches release.yml's wheel target (CIBW_ENVIRONMENT_MACOS, line 91), so CI builds against the same ABI floor as the wheels we publish to PyPI. The env var is ignored on the Linux matrix legs, so no special-casing is needed. Reviewed By: pdepetro Differential Revision: D104851472 fbshipit-source-id: 1a962a4dacf4ad8448ee30b7fbf388a26dd32771
1 parent c874ad7 commit c1908c3

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ jobs:
1717
name: build-and-test (${{ matrix.os }}, py${{ matrix.python-version }})
1818
runs-on: ${{ matrix.os }}
1919
timeout-minutes: 30
20+
env:
21+
# Match release.yml's wheel target (CIBW_ENVIRONMENT_MACOS) so CI builds
22+
# the same ABI as published wheels. Also raises the floor above macOS 10.15,
23+
# which is required for std::filesystem symbols to be available — the
24+
# Python.org 3.12+ universal2 frameworks declare a 10.13 deployment target
25+
# in sysconfig, which propagates into extension builds and marks
26+
# <filesystem> as unavailable. Ignored on Linux.
27+
MACOSX_DEPLOYMENT_TARGET: '11.0'
2028
strategy:
2129
fail-fast: false
2230
matrix:

0 commit comments

Comments
 (0)