Skip to content

Commit f7e1922

Browse files
authored
CirrusCI fixes (#1786)
* Fix executable name, that doesn't always exist on windows * Use the `python3` executable on macOS Cirrus * Homebrew changed where it puts the python binaries * Update examples to match new config
1 parent 0d8e919 commit f7e1922

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

.cirrus.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
only_if: changesInclude('.cirrus.yml') || ($BRANCH == "main" && !changesIncludeOnly('docs/*', '.pre-commit-config.yaml'))
1+
only_if: changesInclude('.cirrus.yml') || ($CIRRUS_BRANCH == "main" && !changesIncludeOnly('docs/*', '.pre-commit-config.yaml')) || $CIRRUS_BRANCH =~ 'cirrus.*'
22

33
run_tests: &RUN_TESTS
44
install_cibuildwheel_script:
@@ -50,25 +50,23 @@ windows_x86_task:
5050

5151
macos_arm64_task:
5252
macos_instance:
53-
image: ghcr.io/cirruslabs/macos-monterey-xcode
53+
image: ghcr.io/cirruslabs/macos-sonoma-xcode
5454

5555
env:
56-
PATH: /opt/homebrew/opt/[email protected]/bin:$PATH
56+
PATH: /opt/homebrew/opt/[email protected]/libexec/bin:$PATH
5757
install_pre_requirements_script:
5858
- brew install [email protected]
59-
- ln -s python3 /opt/homebrew/opt/[email protected]/bin/python
6059
<<: *RUN_TESTS
6160

6261
macos_arm64_cp38_task:
6362
macos_instance:
64-
image: ghcr.io/cirruslabs/macos-monterey-xcode
63+
image: ghcr.io/cirruslabs/macos-sonoma-xcode
6564

6665
env:
67-
PATH: /opt/homebrew/opt/[email protected]/bin:$PATH
66+
PATH: /opt/homebrew/opt/[email protected]/libexec/bin:$PATH
6867
PYTEST_ADDOPTS: --run-cp38-universal2 -k 'test_cp38_arm64_testing_universal2_installer or test_arch_auto'
6968
install_pre_requirements_script:
7069
- brew install [email protected]
71-
- ln -s python3 /opt/homebrew/opt/[email protected]/bin/python
7270
- curl -fsSLO https://www.python.org/ftp/python/3.8.10/python-3.8.10-macos11.pkg
7371
- sudo installer -pkg python-3.8.10-macos11.pkg -target /
7472
- rm python-3.8.10-macos11.pkg

examples/cirrus-ci-intel-mac.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS
1010
macos_task:
1111
name: Build macOS x86_64 and arm64 wheels.
1212
macos_instance:
13-
image: ghcr.io/cirruslabs/macos-monterey-xcode
13+
image: ghcr.io/cirruslabs/macos-sonoma-xcode
1414

1515
env:
16-
PATH: /opt/homebrew/opt/[email protected]/bin:$PATH
16+
PATH: /opt/homebrew/opt/[email protected]/libexec/bin:$PATH
1717
CIBW_ARCHS_MACOS: x86_64 arm64
1818
install_pre_requirements_script:
1919
- brew install [email protected]
20-
- ln -s python3 /opt/homebrew/opt/[email protected]/bin/python
2120
<<: *BUILD_AND_STORE_WHEELS

examples/cirrus-ci-minimal.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,10 @@ windows_x86_task:
5050
macos_arm64_task:
5151
name: Build macOS arm64 wheels.
5252
macos_instance:
53-
image: ghcr.io/cirruslabs/macos-monterey-xcode
53+
image: ghcr.io/cirruslabs/macos-sonoma-xcode
5454

5555
env:
56-
PATH: /opt/homebrew/opt/[email protected]/bin:$PATH
56+
PATH: /opt/homebrew/opt/[email protected]/libexec/bin:$PATH
5757
install_pre_requirements_script:
5858
- brew install [email protected]
59-
- ln -s python3 /opt/homebrew/opt/[email protected]/bin/python
6059
<<: *BUILD_AND_STORE_WHEELS

test/test_from_sdist.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def test_simple(tmp_path):
6969
assert os.path.exists('{package}/setup.py')
7070
""",
7171
)
72-
setup_py_assertion_cmd = f'python3 -c "{setup_py_assertion_snippet !s}"'
72+
setup_py_assertion_cmd = f'python -c "{setup_py_assertion_snippet !s}"'
7373

7474
# build the wheels from sdist
7575
actual_wheels = cibuildwheel_from_sdist_run(

0 commit comments

Comments
 (0)