Skip to content

Commit

Permalink
Use the python3 executable on macOS Cirrus
Browse files Browse the repository at this point in the history
  • Loading branch information
joerick committed Mar 11, 2024
1 parent cb46a27 commit 3625458
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
12 changes: 5 additions & 7 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
only_if: changesInclude('.cirrus.yml') || ($BRANCH == "main" && !changesIncludeOnly('docs/*', '.pre-commit-config.yaml'))
only_if: changesInclude('.cirrus.yml') || ($CIRRUS_BRANCH == "main" && !changesIncludeOnly('docs/*', '.pre-commit-config.yaml')) || CIRRUS_BRANCH =~ 'cirrus.*'

run_tests: &RUN_TESTS
install_cibuildwheel_script:
- python -m pip install -e ".[dev]" pytest-custom-exit-code
- python3 -m pip install -e ".[dev]" pytest-custom-exit-code
run_cibuildwheel_tests_script:
- python ./bin/run_tests.py
- python3 ./bin/run_tests.py


linux_x86_task:
Expand Down Expand Up @@ -50,25 +50,23 @@ windows_x86_task:

macos_arm64_task:
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode
image: ghcr.io/cirruslabs/macos-sonoma-xcode

env:
PATH: /opt/homebrew/opt/python@3.10/bin:$PATH
install_pre_requirements_script:
- brew install python@3.10
- ln -s python3 /opt/homebrew/opt/python@3.10/bin/python
<<: *RUN_TESTS

macos_arm64_cp38_task:
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode
image: ghcr.io/cirruslabs/macos-sonoma-xcode

env:
PATH: /opt/homebrew/opt/python@3.10/bin:$PATH
PYTEST_ADDOPTS: --run-cp38-universal2 -k 'test_cp38_arm64_testing_universal2_installer or test_arch_auto'
install_pre_requirements_script:
- brew install python@3.10
- ln -s python3 /opt/homebrew/opt/python@3.10/bin/python
- curl -fsSLO https://www.python.org/ftp/python/3.8.10/python-3.8.10-macos11.pkg
- sudo installer -pkg python-3.8.10-macos11.pkg -target /
- rm python-3.8.10-macos11.pkg
Expand Down
5 changes: 2 additions & 3 deletions examples/cirrus-ci-intel-mac.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
install_cibuildwheel_script:
- python -m pip install cibuildwheel==2.16.5
- python3 -m pip install cibuildwheel==2.16.5
run_cibuildwheel_script:
- cibuildwheel
wheels_artifacts:
Expand All @@ -10,12 +10,11 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS
macos_task:
name: Build macOS x86_64 and arm64 wheels.
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode
image: ghcr.io/cirruslabs/macos-sonoma-xcode

env:
PATH: /opt/homebrew/opt/python@3.10/bin:$PATH
CIBW_ARCHS_MACOS: x86_64 arm64
install_pre_requirements_script:
- brew install python@3.10
- ln -s python3 /opt/homebrew/opt/python@3.10/bin/python
<<: *BUILD_AND_STORE_WHEELS
5 changes: 2 additions & 3 deletions examples/cirrus-ci-minimal.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
install_cibuildwheel_script:
- python -m pip install cibuildwheel==2.16.5
- python3 -m pip install cibuildwheel==2.16.5
run_cibuildwheel_script:
- cibuildwheel
wheels_artifacts:
Expand Down Expand Up @@ -50,11 +50,10 @@ windows_x86_task:
macos_arm64_task:
name: Build macOS arm64 wheels.
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode
image: ghcr.io/cirruslabs/macos-sonoma-xcode

env:
PATH: /opt/homebrew/opt/python@3.10/bin:$PATH
install_pre_requirements_script:
- brew install python@3.10
- ln -s python3 /opt/homebrew/opt/python@3.10/bin/python
<<: *BUILD_AND_STORE_WHEELS

0 comments on commit 3625458

Please sign in to comment.