Skip to content

Commit

Permalink
fix tests on cirrus
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Jul 6, 2024
1 parent 74e7ee5 commit 60a7a82
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 18 deletions.
30 changes: 21 additions & 9 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ only_if: changesInclude('.cirrus.yml') || ($CIRRUS_BRANCH == "main" && !changesI

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


linux_x86_task:
timeout_in: 120m
compute_engine_instance:
Expand All @@ -15,9 +15,14 @@ linux_x86_task:
platform: linux
cpu: 8
memory: 8G

env:
VENV_ROOT: ${HOME}/venv-cibuildwheel
PATH: ${VENV_ROOT}/bin:${PATH}
install_pre_requirements_script:
- apt install -y python3-venv python-is-python3
- add-apt-repository -y ppa:deadsnakes/ppa
- apt-get update
- apt-get install -y python3.12-venv
- python3.12 -m venv ${VENV_ROOT}
<<: *RUN_TESTS

linux_aarch64_task:
Expand All @@ -28,9 +33,14 @@ linux_aarch64_task:
platform: linux
cpu: 4
memory: 4G

env:
VENV_ROOT: ${HOME}/venv-cibuildwheel
PATH: ${VENV_ROOT}/bin:${PATH}
install_pre_requirements_script:
- apt install -y python3-venv python-is-python3
- add-apt-repository -y ppa:deadsnakes/ppa
- apt-get update
- apt-get install -y python3.12-venv
- python3.12 -m venv ${VENV_ROOT}
<<: *RUN_TESTS

windows_x86_task:
Expand All @@ -51,22 +61,24 @@ windows_x86_task:
macos_arm64_task:
macos_instance:
image: ghcr.io/cirruslabs/macos-sonoma-xcode

env:
PATH: /opt/homebrew/opt/python@3.12/libexec/bin:$PATH
VENV_ROOT: ${HOME}/venv-cibuildwheel
PATH: ${VENV_ROOT}/bin:${PATH}
install_pre_requirements_script:
- brew install python@3.12
- python3.12 -m venv ${VENV_ROOT}
<<: *RUN_TESTS

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

env:
PATH: /opt/homebrew/opt/python@3.12/libexec/bin:$PATH
VENV_ROOT: ${HOME}/venv-cibuildwheel
PATH: ${VENV_ROOT}/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.12
- python3.12 -m venv ${VENV_ROOT}
- 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
6 changes: 3 additions & 3 deletions examples/cirrus-ci-intel-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ macos_task:
name: Build macOS x86_64 and arm64 wheels.
macos_instance:
image: ghcr.io/cirruslabs/macos-sonoma-xcode

env:
PATH: /opt/homebrew/opt/python@3.12/libexec/bin:$PATH
CIBW_ARCHS_MACOS: x86_64 arm64
VENV_ROOT: ${HOME}/venv-cibuildwheel
PATH: ${VENV_ROOT}/bin:${PATH}
install_pre_requirements_script:
- brew install python@3.12
- python3.12 -m venv ${VENV_ROOT}
<<: *BUILD_AND_STORE_WHEELS
23 changes: 17 additions & 6 deletions examples/cirrus-ci-minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@ linux_x86_task:
platform: linux
cpu: 4
memory: 4G

env:
VENV_ROOT: ${HOME}/venv-cibuildwheel
PATH: ${VENV_ROOT}/bin:${PATH}
install_pre_requirements_script:
- apt install -y python3-venv python-is-python3
- add-apt-repository -y ppa:deadsnakes/ppa
- apt-get update
- apt-get install -y python3.12-venv
- python3.12 -m venv ${VENV_ROOT}
<<: *BUILD_AND_STORE_WHEELS

linux_aarch64_task:
Expand All @@ -29,9 +34,14 @@ linux_aarch64_task:
platform: linux
cpu: 4
memory: 4G

env:
VENV_ROOT: ${HOME}/venv-cibuildwheel
PATH: ${VENV_ROOT}/bin:${PATH}
install_pre_requirements_script:
- apt install -y python3-venv python-is-python3
- add-apt-repository -y ppa:deadsnakes/ppa
- apt-get update
- apt-get install -y python3.12-venv
- python3.12 -m venv ${VENV_ROOT}
<<: *BUILD_AND_STORE_WHEELS

windows_x86_task:
Expand All @@ -51,9 +61,10 @@ macos_arm64_task:
name: Build macOS arm64 wheels.
macos_instance:
image: ghcr.io/cirruslabs/macos-sonoma-xcode

env:
PATH: /opt/homebrew/opt/python@3.12/libexec/bin:$PATH
VENV_ROOT: ${HOME}/venv-cibuildwheel
PATH: ${VENV_ROOT}/bin:${PATH}
install_pre_requirements_script:
- brew install python@3.12
- python3.12 -m venv ${VENV_ROOT}
<<: *BUILD_AND_STORE_WHEELS

0 comments on commit 60a7a82

Please sign in to comment.