Skip to content

Commit 60a7a82

Browse files
committed
fix tests on cirrus
1 parent 74e7ee5 commit 60a7a82

File tree

3 files changed

+41
-18
lines changed

3 files changed

+41
-18
lines changed

.cirrus.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ only_if: changesInclude('.cirrus.yml') || ($CIRRUS_BRANCH == "main" && !changesI
22

33
run_tests: &RUN_TESTS
44
install_cibuildwheel_script:
5+
- python -V
56
- python -m pip install -e ".[dev]" pytest-custom-exit-code
67
run_cibuildwheel_tests_script:
78
- python ./bin/run_tests.py
89

9-
1010
linux_x86_task:
1111
timeout_in: 120m
1212
compute_engine_instance:
@@ -15,9 +15,14 @@ linux_x86_task:
1515
platform: linux
1616
cpu: 8
1717
memory: 8G
18-
18+
env:
19+
VENV_ROOT: ${HOME}/venv-cibuildwheel
20+
PATH: ${VENV_ROOT}/bin:${PATH}
1921
install_pre_requirements_script:
20-
- apt install -y python3-venv python-is-python3
22+
- add-apt-repository -y ppa:deadsnakes/ppa
23+
- apt-get update
24+
- apt-get install -y python3.12-venv
25+
- python3.12 -m venv ${VENV_ROOT}
2126
<<: *RUN_TESTS
2227

2328
linux_aarch64_task:
@@ -28,9 +33,14 @@ linux_aarch64_task:
2833
platform: linux
2934
cpu: 4
3035
memory: 4G
31-
36+
env:
37+
VENV_ROOT: ${HOME}/venv-cibuildwheel
38+
PATH: ${VENV_ROOT}/bin:${PATH}
3239
install_pre_requirements_script:
33-
- apt install -y python3-venv python-is-python3
40+
- add-apt-repository -y ppa:deadsnakes/ppa
41+
- apt-get update
42+
- apt-get install -y python3.12-venv
43+
- python3.12 -m venv ${VENV_ROOT}
3444
<<: *RUN_TESTS
3545

3646
windows_x86_task:
@@ -51,22 +61,24 @@ windows_x86_task:
5161
macos_arm64_task:
5262
macos_instance:
5363
image: ghcr.io/cirruslabs/macos-sonoma-xcode
54-
5564
env:
56-
PATH: /opt/homebrew/opt/[email protected]/libexec/bin:$PATH
65+
VENV_ROOT: ${HOME}/venv-cibuildwheel
66+
PATH: ${VENV_ROOT}/bin:${PATH}
5767
install_pre_requirements_script:
5868
- brew install [email protected]
69+
- python3.12 -m venv ${VENV_ROOT}
5970
<<: *RUN_TESTS
6071

6172
macos_arm64_cp38_task:
6273
macos_instance:
6374
image: ghcr.io/cirruslabs/macos-sonoma-xcode
64-
6575
env:
66-
PATH: /opt/homebrew/opt/[email protected]/libexec/bin:$PATH
76+
VENV_ROOT: ${HOME}/venv-cibuildwheel
77+
PATH: ${VENV_ROOT}/bin:${PATH}
6778
PYTEST_ADDOPTS: --run-cp38-universal2 -k 'test_cp38_arm64_testing_universal2_installer or test_arch_auto'
6879
install_pre_requirements_script:
6980
- brew install [email protected]
81+
- python3.12 -m venv ${VENV_ROOT}
7082
- curl -fsSLO https://www.python.org/ftp/python/3.8.10/python-3.8.10-macos11.pkg
7183
- sudo installer -pkg python-3.8.10-macos11.pkg -target /
7284
- rm python-3.8.10-macos11.pkg

examples/cirrus-ci-intel-mac.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ macos_task:
1111
name: Build macOS x86_64 and arm64 wheels.
1212
macos_instance:
1313
image: ghcr.io/cirruslabs/macos-sonoma-xcode
14-
1514
env:
16-
PATH: /opt/homebrew/opt/[email protected]/libexec/bin:$PATH
17-
CIBW_ARCHS_MACOS: x86_64 arm64
15+
VENV_ROOT: ${HOME}/venv-cibuildwheel
16+
PATH: ${VENV_ROOT}/bin:${PATH}
1817
install_pre_requirements_script:
1918
- brew install [email protected]
19+
- python3.12 -m venv ${VENV_ROOT}
2020
<<: *BUILD_AND_STORE_WHEELS

examples/cirrus-ci-minimal.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@ linux_x86_task:
1515
platform: linux
1616
cpu: 4
1717
memory: 4G
18-
18+
env:
19+
VENV_ROOT: ${HOME}/venv-cibuildwheel
20+
PATH: ${VENV_ROOT}/bin:${PATH}
1921
install_pre_requirements_script:
20-
- apt install -y python3-venv python-is-python3
22+
- add-apt-repository -y ppa:deadsnakes/ppa
23+
- apt-get update
24+
- apt-get install -y python3.12-venv
25+
- python3.12 -m venv ${VENV_ROOT}
2126
<<: *BUILD_AND_STORE_WHEELS
2227

2328
linux_aarch64_task:
@@ -29,9 +34,14 @@ linux_aarch64_task:
2934
platform: linux
3035
cpu: 4
3136
memory: 4G
32-
37+
env:
38+
VENV_ROOT: ${HOME}/venv-cibuildwheel
39+
PATH: ${VENV_ROOT}/bin:${PATH}
3340
install_pre_requirements_script:
34-
- apt install -y python3-venv python-is-python3
41+
- add-apt-repository -y ppa:deadsnakes/ppa
42+
- apt-get update
43+
- apt-get install -y python3.12-venv
44+
- python3.12 -m venv ${VENV_ROOT}
3545
<<: *BUILD_AND_STORE_WHEELS
3646

3747
windows_x86_task:
@@ -51,9 +61,10 @@ macos_arm64_task:
5161
name: Build macOS arm64 wheels.
5262
macos_instance:
5363
image: ghcr.io/cirruslabs/macos-sonoma-xcode
54-
5564
env:
56-
PATH: /opt/homebrew/opt/[email protected]/libexec/bin:$PATH
65+
VENV_ROOT: ${HOME}/venv-cibuildwheel
66+
PATH: ${VENV_ROOT}/bin:${PATH}
5767
install_pre_requirements_script:
5868
- brew install [email protected]
69+
- python3.12 -m venv ${VENV_ROOT}
5970
<<: *BUILD_AND_STORE_WHEELS

0 commit comments

Comments
 (0)