Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update to latest intel osx runner and download 10.15 SDK #5387

Merged
merged 33 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7234ddc
ci: use latest osx sdk and see what happens
beckermr Jun 24, 2024
a931503
Update pyproject.toml
beckermr Jun 24, 2024
eea2c6b
Merge branch 'main' into mac12
beckermr Jun 24, 2024
949c564
test: ensure glob file test can run on osx-arm
beckermr Jun 24, 2024
43e8349
Merge branch 'mac12' of https://github.com/beckermr/conda-build into …
beckermr Jun 24, 2024
9785427
test: try to run under rosetta emulating intel
beckermr Jun 24, 2024
9498b0c
test: try a recent python
beckermr Jun 24, 2024
7d6d874
Update .github/workflows/tests.yml
beckermr Jun 24, 2024
30be095
test: use intel macs for now
beckermr Jun 24, 2024
17c42f1
ci: use 13.3 SDK
beckermr Jun 25, 2024
e13d7f7
style: spacing
beckermr Jun 25, 2024
8546360
style: spacing
beckermr Jun 25, 2024
d73cb02
doc: add changelog entry
beckermr Jun 25, 2024
a99f0b1
ci: stop after first several failures to debug
beckermr Jun 25, 2024
0f7738a
fix: try using 11.3 sdk
beckermr Jun 25, 2024
9f0d19e
fix: wrong compression on sdk
beckermr Jun 25, 2024
d33cc00
fix: wrong sha
beckermr Jun 25, 2024
abd3d96
ci: point xcode at correct SDK
beckermr Jun 25, 2024
c5049cd
fix: use SDKROOT
beckermr Jun 25, 2024
214fad8
ci: try 10.15 sdk
beckermr Jun 25, 2024
95f43a8
fix: extra sha check
beckermr Jun 25, 2024
419050e
fix: make sure tests point to new SDK
beckermr Jun 25, 2024
bcd2a33
Merge branch 'main' into mac12
beckermr Jun 25, 2024
044c4fb
fix: python syntax error
beckermr Jun 25, 2024
e3bf5ab
debug: testing setting sdkroot and conda_build_sysroot by default
beckermr Jun 26, 2024
32a0e78
test: set osx info
beckermr Jun 26, 2024
3261d10
fix: set variants in default config, not metadata
beckermr Jun 26, 2024
e827df8
fix: clean up debug stuff
beckermr Jun 26, 2024
6c7a8ba
fix: clean up changes not needed
beckermr Jun 26, 2024
9afd22f
debug: try ci without SDKROOT
beckermr Jun 26, 2024
6d45507
fix: no need to set the SDKROOT
beckermr Jun 26, 2024
83e2ecc
refactor: simpler code
beckermr Jun 26, 2024
cbe5d3a
refactor: keep old behavior for future testing
beckermr Jun 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 26 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,10 @@ jobs:
needs: changes
if: github.event_name == 'schedule' || needs.changes.outputs.code == 'true'

# Old macOS needed for old SDK (see xcode step below)
# This is needed for some MACOSX_DEPLOYMENT_TARGET tests
# We could also install SDKs from a external provider in the future
# if we want to update this runner to a non-deprecated version
runs-on: macos-11
# we still need intel macs so we are stuck on macos-13 (not -14 or -latest)
# the issue is that there are recipes that depend on packages
# that do not exist for osx-arm64 - see #5388
runs-on: macos-13
defaults:
run:
# https://github.com/conda-incubator/setup-miniconda#use-a-default-shell
Expand Down Expand Up @@ -376,7 +375,9 @@ jobs:
- name: Cache Conda
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: ~/conda_pkgs_dir
path: |
~/conda_pkgs_dir
~/macosx_sdks
key: cache-${{ env.HASH }}

- name: Setup Miniconda
Expand All @@ -385,8 +386,23 @@ jobs:
condarc-file: .github/condarc
run-post: false # skip post cleanup

beckermr marked this conversation as resolved.
Show resolved Hide resolved
- name: Xcode Install
run: sudo xcode-select --switch /Applications/Xcode_11.7.app
- name: SDK Download
run: |
echo "MACOSX_SDK_DIR=${HOME}/macosx_sdks" >> "$GITHUB_ENV"
export MACOSX_SDK_DIR=${HOME}/macosx_sdks
echo "MACOSX_SDK_VERSION=10.15" >> "$GITHUB_ENV"
export MACOSX_SDK_VERSION=10.15
echo "MACOSX_SDK_ROOT=${MACOSX_SDK_DIR}/MacOSX${MACOSX_SDK_VERSION}.sdk" >> "$GITHUB_ENV"
export MACOSX_SDK_ROOT=${MACOSX_SDK_DIR}/MacOSX${MACOSX_SDK_VERSION}.sdk

if [ ! -d ${MACOSX_SDK_DIR} ]; then mkdir ${MACOSX_SDK_DIR}; fi
if [ ! -d ${MACOSX_SDK_ROOT} ]; then
url="https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX${MACOSX_SDK_VERSION}.sdk.tar.xz"
curl -L --output MacOSX${MACOSX_SDK_VERSION}.sdk.tar.xz "${url}"
sdk_sha256=ac75d9e0eb619881f5aa6240689fce862dcb8e123f710032b7409ff5f4c3d18b
echo "${sdk_sha256} *MacOSX${MACOSX_SDK_VERSION}.sdk.tar.xz" | shasum -a 256 -c
tar -xf MacOSX${MACOSX_SDK_VERSION}.sdk.tar.xz -C "${MACOSX_SDK_DIR}"
fi

- name: Conda Install
run: >
Expand Down Expand Up @@ -415,6 +431,8 @@ jobs:
--cov=conda_build
-n auto
-m "${{ env.PYTEST_MARKER }}"
env:
CONDA_BUILD_SYSROOT: ${{ env.MACOSX_SDK_ROOT }}

- name: Upload Coverage
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
Expand Down
3 changes: 3 additions & 0 deletions news/5387-ci-osx-sdk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Other

* Updated the CI to download the MacOSX 10.15 SDK.
30 changes: 14 additions & 16 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,17 @@ def boolify(v):
exit_on_verify_error=exit_on_verify_error_default,
conda_pkg_format=conda_pkg_format_default,
)
result = Config(variant=None, **testing_config_kwargs)

if on_mac:
var_dict = {}
if "CONDA_BUILD_SYSROOT" in os.environ:
var_dict["CONDA_BUILD_SYSROOT"] = [os.environ["CONDA_BUILD_SYSROOT"]]
if not var_dict:
var_dict = None
else:
var_dict = None
beckermr marked this conversation as resolved.
Show resolved Hide resolved

result = Config(variant=var_dict, **testing_config_kwargs)
result._testing_config_kwargs = testing_config_kwargs
assert result.no_rewrite_stdout_env is False
assert result._src_cache_root is None
Expand Down Expand Up @@ -204,23 +214,11 @@ def variants_conda_build_sysroot(monkeypatch, request):
if not on_mac:
return {}

monkeypatch.setenv(
"CONDA_BUILD_SYSROOT",
subprocess.run(
["xcrun", "--sdk", "macosx", "--show-sdk-path"],
check=True,
capture_output=True,
text=True,
).stdout.strip(),
)
monkeypatch.setenv(
"MACOSX_DEPLOYMENT_TARGET",
subprocess.run(
["xcrun", "--sdk", "macosx", "--show-sdk-version"],
check=True,
capture_output=True,
text=True,
).stdout.strip(),
os.path.basename(os.environ["CONDA_BUILD_SYSROOT"])
.replace("MacOSX", "")
.replace(".sdk", ""),
)
return request.param

Expand Down
Loading