Skip to content

Commit

Permalink
Update macOS x86_64 wheel build CI runner to 10.13 (#13470) (#13550)
Browse files Browse the repository at this point in the history
* Update macOS x86_64 wheel build CI runner to 10.13

Github actions has deprecated their macOS 10.12 CI runner and will be
removing it in December, 2024. We were using this macOS runner because
our target OS version for intel mac is 10.12. However, with this
enviornment being removed by Github we must upgrade to continue running
the jobs.

This commit does not bump the MACOSX_DEPLOYMENT_TARGET environment
variable (which is used to set the target OS version for intel macs)
though, because we should test if we can build it compatibility
mode from a newer version of macOS. If this fails then we can bump this
to 10.13 in a subsequent commit on this PR and add an upgrade release
note to document the change.

* Fix macOS deployment target config in cibuildwheel

Looking at the 1.3.0 release build the build failed during the audit
stage checking the shared object file that was built. This was failing
because the macOS target version in the binary was 10.12 but the
environment variable to override the default target of 10.9 was not
getting set properly. We set this in the pyproject.toml but it is
getting overridden by the PGO settings via CIBW_ENVIRONMENT in the
github actions config. If you look at the recent builds we were
publishing 10.9 target wheels on pypi despite documenting we target
10.12. The CI job logs also show that env variable is never being
set during the cibuildwheel process.

The release of rust 1.83 in the last 24 hrs probably is what changed
the output here causing the failure, although rust was supposed to
raise it's minimum target to 10.12 in 1.74 [1] something probably
changed in the release today which is tripping up the audit now.

This PR updates the CI configuration as was done to hotfix the
deployment job temporarily during the 1.3.0 release process [2]
to ensure we're setting our macOS deployment target correctly on
x86_64 macOS builds to 10.12.

[1] https://blog.rust-lang.org/2023/09/25/Increasing-Apple-Version-Requirements.html
[2] https://github.com/Qiskit/qiskit/actions/runs/12075613320

---------

Co-authored-by: Julien Gacon <jules.gacon@googlemail.com>
(cherry picked from commit 17648eb)

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
  • Loading branch information
mergify[bot] and mtreinish authored Dec 11, 2024
1 parent 51be8c5 commit d4a67bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/wheels-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
os:
- ubuntu-latest
# Used for the x86_64 builds.
- macos-12
- macos-13
# Used for the ARM builds.
- macos-14
- windows-latest
Expand Down Expand Up @@ -121,6 +121,7 @@ jobs:
cat >>"$GITHUB_ENV" <<EOF
CIBW_BEFORE_BUILD=bash ./tools/build_pgo.sh $PGO_WORK_DIR $PGO_OUT_PATH
CIBW_ENVIRONMENT=RUSTUP_TOOLCHAIN=stable RUSTFLAGS='-Cprofile-use=$PGO_OUT_PATH -Cllvm-args=-pgo-warn-missing-function'
CIBW_ENVIRONMENT_MACOS=MACOSX_DEPLOYMENT_TARGET='10.12' RUSTUP_TOOLCHAIN=stable RUSTFLAGS='-Cprofile-use=$PGO_OUT_PATH -Cllvm-args=-pgo-warn-missing-function'
CIBW_ENVIRONMENT_LINUX=RUSTUP_TOOLCHAIN=stable RUSTFLAGS='-Cprofile-use=$PGO_OUT_PATH -Cllvm-args=-pgo-warn-missing-function' PATH="\$PATH:\$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true"
EOF
env:
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ environment = 'PATH="$PATH:$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true"
repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel} && pipx run abi3audit --strict --report {wheel}"

[tool.cibuildwheel.macos]
environment = "MACOSX_DEPLOYMENT_TARGET=10.12"
repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} && pipx run abi3audit --strict --report {wheel}"

[tool.cibuildwheel.windows]
Expand Down

0 comments on commit d4a67bc

Please sign in to comment.