From 8b7d505d253619608b4098cca26904da6cb3c991 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 25 Mar 2025 13:41:24 +0800 Subject: [PATCH 01/18] Disable CI for non-macOS platforms. --- .circleci/config.yml | 76 +++++++------- .cirrus.yml | 148 +++++++++++++-------------- .github/workflows/test.yml | 199 +++++++++++++++++++------------------ .gitlab-ci.yml | 66 ++++++------ .travis.yml | 3 +- appveyor.yml | 8 +- azure-pipelines.yml | 46 ++++----- 7 files changed, 274 insertions(+), 272 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5c8bef6f6..0ffe1c1cf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,50 +18,50 @@ jobs: command: venv/bin/python ./bin/run_tests.py no_output_timeout: 30m - linux-python3.12: - docker: - - image: cimg/python:3.12 - environment: - PYTHON: python3 - # Temporarily restrict the tests that are run on CircleCI to prevent - # test timeouts. - PYTEST_ADDOPTS: -k "unit_test or main_tests or test_0_basic or test_docker_images" - steps: - - checkout - - setup_remote_docker + # linux-python3.12: + # docker: + # - image: cimg/python:3.12 + # environment: + # PYTHON: python3 + # # Temporarily restrict the tests that are run on CircleCI to prevent + # # test timeouts. + # PYTEST_ADDOPTS: -k "unit_test or main_tests or test_0_basic or test_docker_images" + # steps: + # - checkout + # - setup_remote_docker - - run: - name: Prepare the environment. - command: bash .circleci/prepare.sh - - run: - name: Test. - command: venv/bin/python ./bin/run_tests.py - no_output_timeout: 30m + # - run: + # name: Prepare the environment. + # command: bash .circleci/prepare.sh + # - run: + # name: Test. + # command: venv/bin/python ./bin/run_tests.py + # no_output_timeout: 30m - linux-aarch64: - machine: - image: default - resource_class: arm.medium - environment: - PYTHON: python3 - # Temporarily restrict the tests that are run on CircleCI to prevent - # test timeouts. - PYTEST_ADDOPTS: -k "unit_test or main_tests or test_0_basic or test_docker_images" - steps: - - checkout + # linux-aarch64: + # machine: + # image: default + # resource_class: arm.medium + # environment: + # PYTHON: python3 + # # Temporarily restrict the tests that are run on CircleCI to prevent + # # test timeouts. + # PYTEST_ADDOPTS: -k "unit_test or main_tests or test_0_basic or test_docker_images" + # steps: + # - checkout - - run: - name: Prepare the environment. - command: bash .circleci/prepare.sh - - run: - name: Test. - command: venv/bin/python ./bin/run_tests.py - no_output_timeout: 30m + # - run: + # name: Prepare the environment. + # command: bash .circleci/prepare.sh + # - run: + # name: Test. + # command: venv/bin/python ./bin/run_tests.py + # no_output_timeout: 30m workflows: version: 2 all-tests: jobs: - osx-python3.12 - - linux-python3.12 - - linux-aarch64 + # - linux-python3.12 + # - linux-aarch64 diff --git a/.cirrus.yml b/.cirrus.yml index 6c13ee1a7..88057f6ad 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -7,82 +7,82 @@ run_tests: &RUN_TESTS run_cibuildwheel_tests_script: - python ./bin/run_tests.py -linux_x86_task: - timeout_in: 120m - compute_engine_instance: - image_project: cirrus-images - image: family/docker-builder - platform: linux - cpu: 8 - memory: 8G - env: - VENV_ROOT: ${HOME}/venv-cibuildwheel - PATH: ${VENV_ROOT}/bin:${PATH} - install_pre_requirements_script: - - docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all - - 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_x86_task: +# timeout_in: 120m +# compute_engine_instance: +# image_project: cirrus-images +# image: family/docker-builder +# platform: linux +# cpu: 8 +# memory: 8G +# env: +# VENV_ROOT: ${HOME}/venv-cibuildwheel +# PATH: ${VENV_ROOT}/bin:${PATH} +# install_pre_requirements_script: +# - docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all +# - 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: - compute_engine_instance: - image_project: cirrus-images - image: family/docker-builder-arm64 - architecture: arm64 - platform: linux - cpu: 4 - memory: 4G - env: - VENV_ROOT: ${HOME}/venv-cibuildwheel - PATH: ${VENV_ROOT}/bin:${PATH} - install_pre_requirements_script: - - docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all - - 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: +# compute_engine_instance: +# image_project: cirrus-images +# image: family/docker-builder-arm64 +# architecture: arm64 +# platform: linux +# cpu: 4 +# memory: 4G +# env: +# VENV_ROOT: ${HOME}/venv-cibuildwheel +# PATH: ${VENV_ROOT}/bin:${PATH} +# install_pre_requirements_script: +# - docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all +# - 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: - # The task takes ~55 minutes while the timeout happens - # after 60 minutes by default, let's allow some wiggle room. - timeout_in: 120m - windows_container: - image: cirrusci/windowsservercore:visualstudio2022 - cpu: 8 - memory: 8G +# windows_x86_task: +# # The task takes ~55 minutes while the timeout happens +# # after 60 minutes by default, let's allow some wiggle room. +# timeout_in: 120m +# windows_container: +# image: cirrusci/windowsservercore:visualstudio2022 +# cpu: 8 +# memory: 8G - install_pre_requirements_script: - - choco install -y --no-progress python3 --version 3.12.4 - - refreshenv - - echo PATH=%PATH% >> "%CIRRUS_ENV%" - <<: *RUN_TESTS +# install_pre_requirements_script: +# - choco install -y --no-progress python3 --version 3.12.4 +# - refreshenv +# - echo PATH=%PATH% >> "%CIRRUS_ENV%" +# <<: *RUN_TESTS -macos_arm64_task: - macos_instance: - image: ghcr.io/cirruslabs/macos-runner:sonoma - env: - 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_task: +# macos_instance: +# image: ghcr.io/cirruslabs/macos-runner:sonoma +# env: +# 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-runner:sonoma - env: - 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 - - sh "/Applications/Python 3.8/Install Certificates.command" - <<: *RUN_TESTS +# macos_arm64_cp38_task: +# macos_instance: +# image: ghcr.io/cirruslabs/macos-runner:sonoma +# env: +# 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 +# - sh "/Applications/Python 3.8/Install Certificates.command" +# <<: *RUN_TESTS diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6d690562d..457472ea1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,30 +17,31 @@ concurrency: cancel-in-progress: true jobs: - lint: - name: Linters (mypy, flake8, etc.) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - id: python - with: - python-version: "3.x" - - uses: pre-commit/action@v3.0.1 - - name: PyLint checks - run: pipx run --python "${{ steps.python.outputs.python-path }}" nox -s pylint -- --output-format=github + # lint: + # name: Linters (mypy, flake8, etc.) + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-python@v5 + # id: python + # with: + # python-version: "3.x" + # - uses: pre-commit/action@v3.0.1 + # - name: PyLint checks + # run: pipx run --python "${{ steps.python.outputs.python-path }}" nox -s pylint -- --output-format=github test: name: Test on ${{ matrix.os }} (${{ matrix.python_version }}) - needs: lint + # needs: lint runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14] + # os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14] + os: [macos-13, macos-14] python_version: ['3.13'] - include: - - os: ubuntu-latest - python_version: '3.11' + # include: + # - os: ubuntu-latest + # python_version: '3.11' timeout-minutes: 180 steps: - uses: actions/checkout@v4 @@ -129,85 +130,85 @@ jobs: run: | uv run bin/run_tests.py ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }} - emulated-archs: - name: Get qemu emulated architectures - needs: lint - runs-on: ubuntu-latest - outputs: - archs: ${{ steps.archs.outputs.archs }} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - uses: astral-sh/setup-uv@v5 - - name: Install dependencies - run: uv sync --no-dev --group test - - name: Get qemu emulated architectures - id: archs - run: | - OUTPUT=$(uv run python -c "from json import dumps; from test.utils import EMULATED_ARCHS; print(dumps(EMULATED_ARCHS))") - echo "${OUTPUT}" - echo "archs=${OUTPUT}" >> "$GITHUB_OUTPUT" - - test-emulated: - name: Test Linux ${{ matrix.arch }} using qemu - needs: emulated-archs - runs-on: ubuntu-latest - timeout-minutes: 180 - strategy: - matrix: - arch: ${{ fromJSON(needs.emulated-archs.outputs.archs) }} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - uses: astral-sh/setup-uv@v5 - - name: Install dependencies - run: uv sync --no-dev --group test - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - # This should be temporary - # xref https://github.com/docker/setup-qemu-action/issues/188 - # xref https://github.com/tonistiigi/binfmt/issues/215 - image: tonistiigi/binfmt:qemu-v8.1.5 - - - name: Run the emulation tests - run: uv run pytest --run-emulation ${{ matrix.arch }} test/test_emulation.py - - test-pyodide: - name: Test cibuildwheel building Pyodide wheels - needs: lint - runs-on: ubuntu-24.04 - timeout-minutes: 180 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - name: Install Python 3.12 - with: - python-version: '3.12' - - uses: astral-sh/setup-uv@v5 - - - name: Install dependencies - run: uv sync --no-dev --group test - - - name: Generate a sample project - run: | - uv run -m test.test_projects test.test_0_basic.basic_project sample_proj - - - name: Run a sample build (GitHub Action) - uses: ./ - with: - package-dir: sample_proj - output-dir: wheelhouse - env: - CIBW_PLATFORM: pyodide - - - name: Run tests with 'CIBW_PLATFORM' set to 'pyodide' - run: | - uv run ./bin/run_tests.py - env: - CIBW_PLATFORM: pyodide + # emulated-archs: + # name: Get qemu emulated architectures + # needs: lint + # runs-on: ubuntu-latest + # outputs: + # archs: ${{ steps.archs.outputs.archs }} + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-python@v5 + # with: + # python-version: "3.x" + # - uses: astral-sh/setup-uv@v5 + # - name: Install dependencies + # run: uv sync --no-dev --group test + # - name: Get qemu emulated architectures + # id: archs + # run: | + # OUTPUT=$(uv run python -c "from json import dumps; from test.utils import EMULATED_ARCHS; print(dumps(EMULATED_ARCHS))") + # echo "${OUTPUT}" + # echo "archs=${OUTPUT}" >> "$GITHUB_OUTPUT" + + # test-emulated: + # name: Test Linux ${{ matrix.arch }} using qemu + # needs: emulated-archs + # runs-on: ubuntu-latest + # timeout-minutes: 180 + # strategy: + # matrix: + # arch: ${{ fromJSON(needs.emulated-archs.outputs.archs) }} + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-python@v5 + # with: + # python-version: "3.x" + # - uses: astral-sh/setup-uv@v5 + # - name: Install dependencies + # run: uv sync --no-dev --group test + + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3 + # with: + # # This should be temporary + # # xref https://github.com/docker/setup-qemu-action/issues/188 + # # xref https://github.com/tonistiigi/binfmt/issues/215 + # image: tonistiigi/binfmt:qemu-v8.1.5 + + # - name: Run the emulation tests + # run: uv run pytest --run-emulation ${{ matrix.arch }} test/test_emulation.py + + # test-pyodide: + # name: Test cibuildwheel building Pyodide wheels + # needs: lint + # runs-on: ubuntu-24.04 + # timeout-minutes: 180 + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-python@v5 + # name: Install Python 3.12 + # with: + # python-version: '3.12' + # - uses: astral-sh/setup-uv@v5 + + # - name: Install dependencies + # run: uv sync --no-dev --group test + + # - name: Generate a sample project + # run: | + # uv run -m test.test_projects test.test_0_basic.basic_project sample_proj + + # - name: Run a sample build (GitHub Action) + # uses: ./ + # with: + # package-dir: sample_proj + # output-dir: wheelhouse + # env: + # CIBW_PLATFORM: pyodide + + # - name: Run tests with 'CIBW_PLATFORM' set to 'pyodide' + # run: | + # uv run ./bin/run_tests.py + # env: + # CIBW_PLATFORM: pyodide diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ecf0361fb..d0042d474 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,37 +1,37 @@ -linux: - image: python:3.12 - services: - - name: docker:dind - entrypoint: ["env", "-u", "DOCKER_HOST"] - command: ["dockerd-entrypoint.sh"] - variables: - DOCKER_HOST: tcp://docker:2375/ - DOCKER_DRIVER: overlay2 - # See https://github.com/docker-library/docker/pull/166 - DOCKER_TLS_CERTDIR: "" - - # skip all but the basic tests - # (comment the below line in a PR to debug a Gitlab-specific issue) - PYTEST_ADDOPTS: -k "unit_test or test_0_basic" --suppress-no-test-exit-code - script: - - curl -sSL https://get.docker.com/ | sh - - docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all - - python -m pip install dependency-groups - - python -m dependency_groups test | xargs python -m pip install -e. pytest-custom-exit-code - - python ./bin/run_tests.py +# linux: +# image: python:3.12 +# services: +# - name: docker:dind +# entrypoint: ["env", "-u", "DOCKER_HOST"] +# command: ["dockerd-entrypoint.sh"] +# variables: +# DOCKER_HOST: tcp://docker:2375/ +# DOCKER_DRIVER: overlay2 +# # See https://github.com/docker-library/docker/pull/166 +# DOCKER_TLS_CERTDIR: "" -windows: - image: mcr.microsoft.com/windows/servercore:1809 - variables: - PYTEST_ADDOPTS: -k "unit_test or test_0_basic" --suppress-no-test-exit-code - before_script: - - choco install python -y --version 3.12.4 - script: - - py -m pip install dependency-groups - - py -m pip install -e. pytest-custom-exit-code $(py -m dependency_groups test) - - py bin\run_tests.py - tags: - - saas-windows-medium-amd64 +# # skip all but the basic tests +# # (comment the below line in a PR to debug a Gitlab-specific issue) +# PYTEST_ADDOPTS: -k "unit_test or test_0_basic" --suppress-no-test-exit-code +# script: +# - curl -sSL https://get.docker.com/ | sh +# - docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all +# - python -m pip install dependency-groups +# - python -m dependency_groups test | xargs python -m pip install -e. pytest-custom-exit-code +# - python ./bin/run_tests.py +# +# windows: +# image: mcr.microsoft.com/windows/servercore:1809 +# variables: +# PYTEST_ADDOPTS: -k "unit_test or test_0_basic" --suppress-no-test-exit-code +# before_script: +# - choco install python -y --version 3.12.4 +# script: +# - py -m pip install dependency-groups +# - py -m pip install -e. pytest-custom-exit-code $(py -m dependency_groups test) +# - py bin\run_tests.py +# tags: +# - saas-windows-medium-amd64 macos: image: macos-14-xcode-15 diff --git a/.travis.yml b/.travis.yml index ec2365a09..8eaef8c71 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,8 @@ branches: - main # only build the main branch or PR that explicitely want to test with Travis CI -if: (type = "push") OR (commit_message =~ /travis-ci/) +# if: (type = "push") OR (commit_message =~ /travis-ci/) +if: (commit_message =~ /travis-ci/) jobs: include: diff --git a/appveyor.yml b/appveyor.yml index ca5d4a6c4..efa6d65bf 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,9 +1,9 @@ environment: matrix: - - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2204 - APPVEYOR_JOB_NAME: "python312-x64-ubuntu" - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - APPVEYOR_JOB_NAME: "python312-x64-vs2022" + # - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2204 + # APPVEYOR_JOB_NAME: "python312-x64-ubuntu" + # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + # APPVEYOR_JOB_NAME: "python312-x64-vs2022" - APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma APPVEYOR_JOB_NAME: "python312-x64-macos" diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 76b1c6186..9e81b4590 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -5,18 +5,18 @@ pr: - .pre-commit-config.yaml jobs: -- job: linux_311 - timeoutInMinutes: 120 - pool: {vmImage: 'Ubuntu-20.04'} - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.11' - - bash: | - docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all - python -m pip install dependency-groups - python -m dependency_groups test | xargs python -m pip install -e. - python ./bin/run_tests.py +# - job: linux_311 +# timeoutInMinutes: 120 +# pool: {vmImage: 'Ubuntu-20.04'} +# steps: +# - task: UsePythonVersion@0 +# inputs: +# versionSpec: '3.11' +# - bash: | +# docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all +# python -m pip install dependency-groups +# python -m dependency_groups test | xargs python -m pip install -e. +# python ./bin/run_tests.py - job: macos_311 pool: {vmImage: 'macOS-13'} @@ -29,14 +29,14 @@ jobs: python -m dependency_groups test | xargs python -m pip install -e. python ./bin/run_tests.py --num-processes 2 -- job: windows_311 - pool: {vmImage: 'windows-2019'} - timeoutInMinutes: 180 - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.11' - - bash: | - python -m pip install dependency-groups - python -m dependency_groups test | xargs python -m pip install -e. - python ./bin/run_tests.py +# - job: windows_311 +# pool: {vmImage: 'windows-2019'} +# timeoutInMinutes: 180 +# steps: +# - task: UsePythonVersion@0 +# inputs: +# versionSpec: '3.11' +# - bash: | +# python -m pip install dependency-groups +# python -m dependency_groups test | xargs python -m pip install -e. +# python ./bin/run_tests.py From 777398c13b460cffbf88797dbe03afff425c9684 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 25 Mar 2025 15:27:53 +0800 Subject: [PATCH 02/18] Disable even more CI. --- .github/workflows/test.yml | 102 ++++++++++++++++++------------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 457472ea1..f97923f8f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,57 +74,57 @@ jobs: run: | uv sync --no-dev --group test - - name: Generate a sample project - run: | - uv run -m test.test_projects test.test_0_basic.basic_project sample_proj - - - name: Run a sample build (GitHub Action) - uses: ./ - with: - package-dir: sample_proj - output-dir: wheelhouse - env: - CIBW_ARCHS_MACOS: x86_64 universal2 arm64 - CIBW_BUILD_FRONTEND: 'build[uv]' - CIBW_ENABLE: "cpython-prerelease cpython-freethreading pypy" - - - name: Run a sample build (GitHub Action, only) - uses: ./ - with: - package-dir: sample_proj - output-dir: wheelhouse_only - only: cp312-${{ runner.os == 'Linux' && (runner.arch == 'ARM64' && 'manylinux_aarch64' || 'manylinux_x86_64') || (runner.os == 'Windows' && 'win_amd64' || 'macosx_x86_64') }} - - - name: Create custom configuration file - shell: bash - run: | - cat > sample_proj/cibw.toml < sample_proj/cibw.toml < Date: Wed, 26 Mar 2025 05:41:50 +0800 Subject: [PATCH 03/18] Use verbose logs during testing. --- test/test_ios.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_ios.py b/test/test_ios.py index 6dc7b40d3..52af0c0ff 100644 --- a/test/test_ios.py +++ b/test/test_ios.py @@ -48,6 +48,7 @@ def test_ios_platforms(tmp_path, build_config): "CIBW_BUILD": "cp313-*", "CIBW_TEST_SOURCES": "tests", "CIBW_TEST_COMMAND": "unittest discover tests test_platform.py", + "CIBW_BUILD_VERBOSITY": "1", **build_config, }, ) From f7e419c3751b15c3b0ae7cb92e728fb8ad994e30 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 26 Mar 2025 09:02:43 +0800 Subject: [PATCH 04/18] Pre-warm iOS simulator. --- .github/workflows/test.yml | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f97923f8f..4ebb6dbd1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,19 +74,24 @@ jobs: run: | uv sync --no-dev --group test - # - name: Generate a sample project - # run: | - # uv run -m test.test_projects test.test_0_basic.basic_project sample_proj + - name: Boot iPhone simulator + if: ${{ startsWith(runner.os, 'macos-') }} + run: | + xcrun simctl boot "iPhone SE (3rd generation)" - # - name: Run a sample build (GitHub Action) - # uses: ./ - # with: - # package-dir: sample_proj - # output-dir: wheelhouse - # env: - # CIBW_ARCHS_MACOS: x86_64 universal2 arm64 - # CIBW_BUILD_FRONTEND: 'build[uv]' - # CIBW_ENABLE: "cpython-prerelease cpython-freethreading pypy" + - name: Generate a sample project + run: | + uv run -m test.test_projects test.test_0_basic.basic_project sample_proj + + - name: Run a sample build (GitHub Action) + uses: ./ + with: + package-dir: sample_proj + output-dir: wheelhouse + env: + CIBW_ARCHS_MACOS: x86_64 universal2 arm64 + CIBW_BUILD_FRONTEND: 'build[uv]' + CIBW_ENABLE: "cpython-prerelease cpython-freethreading pypy" # - name: Run a sample build (GitHub Action, only) # uses: ./ From c3e2f55142a98ed255fc00db524acb87b327d20e Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 26 Mar 2025 09:30:28 +0800 Subject: [PATCH 05/18] Fix runner targeting. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4ebb6dbd1..20c28c025 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -75,7 +75,7 @@ jobs: uv sync --no-dev --group test - name: Boot iPhone simulator - if: ${{ startsWith(runner.os, 'macos-') }} + if: runner.os == 'macOS' run: | xcrun simctl boot "iPhone SE (3rd generation)" From 9bf14f9e36a318a1615ed5eb75b75412ef855756 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 26 Mar 2025 09:56:12 +0800 Subject: [PATCH 06/18] Request a simulator specific device. --- cibuildwheel/platforms/ios.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cibuildwheel/platforms/ios.py b/cibuildwheel/platforms/ios.py index 25dc2a461..0923806aa 100644 --- a/cibuildwheel/platforms/ios.py +++ b/cibuildwheel/platforms/ios.py @@ -557,6 +557,8 @@ def build(options: Options, tmp_path: Path) -> None: testbed_path, "run", *(["--verbose"] if build_options.build_verbosity > 0 else []), + "--simulator", + "iPhone SE (3rd generation)", "--", *(shlex.split(build_options.test_command)), env=build_env, From 07e8b90f56c5868aa45796aae0134f1e8d678c51 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 26 Mar 2025 09:57:41 +0800 Subject: [PATCH 07/18] Temporarily remove fail-fast. --- .github/workflows/test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 20c28c025..4ed9f6a91 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,6 +35,7 @@ jobs: # needs: lint runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: # os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14] os: [macos-13, macos-14] @@ -77,6 +78,11 @@ jobs: - name: Boot iPhone simulator if: runner.os == 'macOS' run: | + # Boot an iPhone SE simulator. This will return immediately, but the + # actual boot process will take a couple of minutes, during which time, + # we can run the sample builds (that won't use the iOS simulator). + # Having the simulator pre-warmed will speed up the subsequent simulator + # clones produced when running the iOS tests. xcrun simctl boot "iPhone SE (3rd generation)" - name: Generate a sample project From 068c1b49ef4c586868f074bc3c6a5c96faa83769 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 26 Mar 2025 10:26:54 +0800 Subject: [PATCH 08/18] Completely remove the pipelines we're not testing. --- .circleci/config.yml | 120 +++++++++++++++++++++---------------------- appveyor.yml | 62 +++++++++++----------- azure-pipelines.yml | 20 ++++---- 3 files changed, 101 insertions(+), 101 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0ffe1c1cf..0f4fe1218 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,67 +1,67 @@ -version: 2 +# version: 2 -jobs: - osx-python3.12: - macos: - xcode: 15.4.0 - resource_class: macos.m1.medium.gen1 - environment: - PYTHON: python3 - steps: - - checkout +# jobs: +# osx-python3.12: +# macos: +# xcode: 15.4.0 +# resource_class: macos.m1.medium.gen1 +# environment: +# PYTHON: python3 +# steps: +# - checkout - - run: - name: Prepare the environment. - command: bash .circleci/prepare.sh - - run: - name: Test. - command: venv/bin/python ./bin/run_tests.py - no_output_timeout: 30m +# - run: +# name: Prepare the environment. +# command: bash .circleci/prepare.sh +# - run: +# name: Test. +# command: venv/bin/python ./bin/run_tests.py +# no_output_timeout: 30m - # linux-python3.12: - # docker: - # - image: cimg/python:3.12 - # environment: - # PYTHON: python3 - # # Temporarily restrict the tests that are run on CircleCI to prevent - # # test timeouts. - # PYTEST_ADDOPTS: -k "unit_test or main_tests or test_0_basic or test_docker_images" - # steps: - # - checkout - # - setup_remote_docker +# # linux-python3.12: +# # docker: +# # - image: cimg/python:3.12 +# # environment: +# # PYTHON: python3 +# # # Temporarily restrict the tests that are run on CircleCI to prevent +# # # test timeouts. +# # PYTEST_ADDOPTS: -k "unit_test or main_tests or test_0_basic or test_docker_images" +# # steps: +# # - checkout +# # - setup_remote_docker - # - run: - # name: Prepare the environment. - # command: bash .circleci/prepare.sh - # - run: - # name: Test. - # command: venv/bin/python ./bin/run_tests.py - # no_output_timeout: 30m +# # - run: +# # name: Prepare the environment. +# # command: bash .circleci/prepare.sh +# # - run: +# # name: Test. +# # command: venv/bin/python ./bin/run_tests.py +# # no_output_timeout: 30m - # linux-aarch64: - # machine: - # image: default - # resource_class: arm.medium - # environment: - # PYTHON: python3 - # # Temporarily restrict the tests that are run on CircleCI to prevent - # # test timeouts. - # PYTEST_ADDOPTS: -k "unit_test or main_tests or test_0_basic or test_docker_images" - # steps: - # - checkout +# # linux-aarch64: +# # machine: +# # image: default +# # resource_class: arm.medium +# # environment: +# # PYTHON: python3 +# # # Temporarily restrict the tests that are run on CircleCI to prevent +# # # test timeouts. +# # PYTEST_ADDOPTS: -k "unit_test or main_tests or test_0_basic or test_docker_images" +# # steps: +# # - checkout - # - run: - # name: Prepare the environment. - # command: bash .circleci/prepare.sh - # - run: - # name: Test. - # command: venv/bin/python ./bin/run_tests.py - # no_output_timeout: 30m +# # - run: +# # name: Prepare the environment. +# # command: bash .circleci/prepare.sh +# # - run: +# # name: Test. +# # command: venv/bin/python ./bin/run_tests.py +# # no_output_timeout: 30m -workflows: - version: 2 - all-tests: - jobs: - - osx-python3.12 - # - linux-python3.12 - # - linux-aarch64 +# workflows: +# version: 2 +# all-tests: +# jobs: +# - osx-python3.12 +# # - linux-python3.12 +# # - linux-aarch64 diff --git a/appveyor.yml b/appveyor.yml index efa6d65bf..92989b302 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,38 +1,38 @@ -environment: - matrix: - # - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2204 - # APPVEYOR_JOB_NAME: "python312-x64-ubuntu" - # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - # APPVEYOR_JOB_NAME: "python312-x64-vs2022" - - APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma - APPVEYOR_JOB_NAME: "python312-x64-macos" +# environment: +# matrix: +# # - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2204 +# # APPVEYOR_JOB_NAME: "python312-x64-ubuntu" +# # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 +# # APPVEYOR_JOB_NAME: "python312-x64-vs2022" +# - APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma +# APPVEYOR_JOB_NAME: "python312-x64-macos" -stack: python 3.12 +# stack: python 3.12 -build: off +# build: off -init: -- ps: | - $BRANCH = if ($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH) { $env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH } else { $env:APPVEYOR_REPO_BRANCH } - if (-not ($BRANCH -eq 'main' -or $BRANCH.ToLower().StartsWith('appveyor-'))) { - $env:PYTEST_ADDOPTS = '-k "unit_test or test_0_basic" --suppress-no-test-exit-code' - } - if ($IsLinux) { - docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all - } +# init: +# - ps: | +# $BRANCH = if ($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH) { $env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH } else { $env:APPVEYOR_REPO_BRANCH } +# if (-not ($BRANCH -eq 'main' -or $BRANCH.ToLower().StartsWith('appveyor-'))) { +# $env:PYTEST_ADDOPTS = '-k "unit_test or test_0_basic" --suppress-no-test-exit-code' +# } +# if ($IsLinux) { +# docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all +# } -install: - - python -m pip install -U pip - - python -m pip install -e ".[dev]" pytest-custom-exit-code +# install: +# - python -m pip install -U pip +# - python -m pip install -e ".[dev]" pytest-custom-exit-code -# the '-u' flag is required so the output is in the correct order. -# See https://github.com/pypa/cibuildwheel/pull/24 for more info. -test_script: python -u ./bin/run_tests.py +# # the '-u' flag is required so the output is in the correct order. +# # See https://github.com/pypa/cibuildwheel/pull/24 for more info. +# test_script: python -u ./bin/run_tests.py -branches: - only: - - main +# branches: +# only: +# - main -skip_commits: - files: - - docs/* +# skip_commits: +# files: +# - docs/* diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9e81b4590..c5f283e60 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,16 +18,16 @@ jobs: # python -m dependency_groups test | xargs python -m pip install -e. # python ./bin/run_tests.py -- job: macos_311 - pool: {vmImage: 'macOS-13'} - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.11' - - bash: | - python -m pip install dependency-groups - python -m dependency_groups test | xargs python -m pip install -e. - python ./bin/run_tests.py --num-processes 2 +# - job: macos_311 +# pool: {vmImage: 'macOS-13'} +# steps: +# - task: UsePythonVersion@0 +# inputs: +# versionSpec: '3.11' +# - bash: | +# python -m pip install dependency-groups +# python -m dependency_groups test | xargs python -m pip install -e. +# python ./bin/run_tests.py --num-processes 2 # - job: windows_311 # pool: {vmImage: 'windows-2019'} From 9abdd08eb4a10a5cbc4a97e581871e2bbb6acb16 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 26 Mar 2025 11:16:39 +0800 Subject: [PATCH 09/18] Try using Xcode 16.2 --- .github/workflows/test.yml | 53 +++++++++++++++++++++-------------- cibuildwheel/platforms/ios.py | 5 ++-- 2 files changed, 35 insertions(+), 23 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4ed9f6a91..6b98b6cfb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -75,29 +75,35 @@ jobs: run: | uv sync --no-dev --group test - - name: Boot iPhone simulator - if: runner.os == 'macOS' - run: | - # Boot an iPhone SE simulator. This will return immediately, but the - # actual boot process will take a couple of minutes, during which time, - # we can run the sample builds (that won't use the iOS simulator). - # Having the simulator pre-warmed will speed up the subsequent simulator - # clones produced when running the iOS tests. - xcrun simctl boot "iPhone SE (3rd generation)" - - - name: Generate a sample project + # - name: Boot iPhone simulator + # if: runner.os == 'macOS' + # run: | + # # Boot an iPhone SE simulator. This will return immediately, but the + # # actual boot process will take a couple of minutes, during which time, + # # we can run the sample builds (that won't use the iOS simulator). + # # Having the simulator pre-warmed will speed up the subsequent simulator + # # clones produced when running the iOS tests. + # xcrun simctl boot "iPhone SE (3rd generation)" + # xcrun simctl list + + - name: Switch to + if: matrix.os == 'macos-14' run: | - uv run -m test.test_projects test.test_0_basic.basic_project sample_proj + sudo xcode-select --switch /Applications/Xcode_16.2.app - - name: Run a sample build (GitHub Action) - uses: ./ - with: - package-dir: sample_proj - output-dir: wheelhouse - env: - CIBW_ARCHS_MACOS: x86_64 universal2 arm64 - CIBW_BUILD_FRONTEND: 'build[uv]' - CIBW_ENABLE: "cpython-prerelease cpython-freethreading pypy" + # - name: Generate a sample project + # run: | + # uv run -m test.test_projects test.test_0_basic.basic_project sample_proj + + # - name: Run a sample build (GitHub Action) + # uses: ./ + # with: + # package-dir: sample_proj + # output-dir: wheelhouse + # env: + # CIBW_ARCHS_MACOS: x86_64 universal2 arm64 + # CIBW_BUILD_FRONTEND: 'build[uv]' + # CIBW_ENABLE: "cpython-prerelease cpython-freethreading pypy" # - name: Run a sample build (GitHub Action, only) # uses: ./ @@ -137,6 +143,11 @@ jobs: # name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} # path: wheelhouse/*.whl + # - name: Check iOS simulator availability + # if: runner.os == 'macOS' + # run: | + # xcrun simctl list + - name: Test cibuildwheel run: | uv run bin/run_tests.py ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }} diff --git a/cibuildwheel/platforms/ios.py b/cibuildwheel/platforms/ios.py index 0923806aa..d0982ea26 100644 --- a/cibuildwheel/platforms/ios.py +++ b/cibuildwheel/platforms/ios.py @@ -557,8 +557,9 @@ def build(options: Options, tmp_path: Path) -> None: testbed_path, "run", *(["--verbose"] if build_options.build_verbosity > 0 else []), - "--simulator", - "iPhone SE (3rd generation)", + # *(["--simulator", build_options.simulator] if build_options.simulator else []), + # "--simulator", + # "iPhone SE (3rd generation)", "--", *(shlex.split(build_options.test_command)), env=build_env, From 872c5b5bb145723e2592e6467b9f42f97e2aafca Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 26 Mar 2025 12:17:23 +0800 Subject: [PATCH 10/18] Try Xcode 16.2 again. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6b98b6cfb..12eb263d7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -86,7 +86,7 @@ jobs: # xcrun simctl boot "iPhone SE (3rd generation)" # xcrun simctl list - - name: Switch to + - name: Switch to Xcode 16 if: matrix.os == 'macos-14' run: | sudo xcode-select --switch /Applications/Xcode_16.2.app From a5997eb8e70ecdace28c13c929eb426be13b26c1 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 26 Mar 2025 12:46:52 +0800 Subject: [PATCH 11/18] Re-run CI with Xcode 16.2, attempt 2 --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 12eb263d7..1a011e3a3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,6 +89,7 @@ jobs: - name: Switch to Xcode 16 if: matrix.os == 'macos-14' run: | + # attempt 2 sudo xcode-select --switch /Applications/Xcode_16.2.app # - name: Generate a sample project From a258144cc8f94b4afa1f667b9a19fb3f08fcb6ec Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 26 Mar 2025 12:56:23 +0800 Subject: [PATCH 12/18] Run integration suite single threaded. --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1a011e3a3..208a08104 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,7 +89,6 @@ jobs: - name: Switch to Xcode 16 if: matrix.os == 'macos-14' run: | - # attempt 2 sudo xcode-select --switch /Applications/Xcode_16.2.app # - name: Generate a sample project @@ -151,7 +150,7 @@ jobs: - name: Test cibuildwheel run: | - uv run bin/run_tests.py ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }} + uv run bin/run_tests.py ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }}${{ (runner.os == 'macOS') && '--num-processes 1' || '' }} # emulated-archs: # name: Get qemu emulated architectures From f001e08c322263c1d7bdc4ee8409b7eb46d6689b Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 26 Mar 2025 14:05:14 +0800 Subject: [PATCH 13/18] Split out a serial test group. --- .github/workflows/test.yml | 2 +- bin/run_tests.py | 20 +++++++++++++++++++- cibuildwheel/platforms/ios.py | 3 --- pyproject.toml | 4 +++- test/test_ios.py | 12 +++++++----- 5 files changed, 30 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 208a08104..12eb263d7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -150,7 +150,7 @@ jobs: - name: Test cibuildwheel run: | - uv run bin/run_tests.py ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }}${{ (runner.os == 'macOS') && '--num-processes 1' || '' }} + uv run bin/run_tests.py ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }} # emulated-archs: # name: Get qemu emulated architectures diff --git a/bin/run_tests.py b/bin/run_tests.py index 2aed4f01a..40385f089 100755 --- a/bin/run_tests.py +++ b/bin/run_tests.py @@ -36,11 +36,29 @@ subprocess.run(unit_test_args, check=True) - # integration tests + # Run the serial integration tests without --dist + serial_integration_test_args = [ + sys.executable, + "-m", + "pytest", + "-m", + "serial", + "-x", + "--durations", + "0", + "--timeout=2400", + "test", + "-vv", + ] + subprocess.run(serial_integration_test_args, check=True) + + # Non-serial integration tests integration_test_args = [ sys.executable, "-m", "pytest", + "-m", + "not serial", "--dist", "loadgroup", f"--numprocesses={args.num_processes}", diff --git a/cibuildwheel/platforms/ios.py b/cibuildwheel/platforms/ios.py index d0982ea26..25dc2a461 100644 --- a/cibuildwheel/platforms/ios.py +++ b/cibuildwheel/platforms/ios.py @@ -557,9 +557,6 @@ def build(options: Options, tmp_path: Path) -> None: testbed_path, "run", *(["--verbose"] if build_options.build_verbosity > 0 else []), - # *(["--simulator", build_options.simulator] if build_options.simulator else []), - # "--simulator", - # "iPhone SE (3rd generation)", "--", *(shlex.split(build_options.test_command)), env=build_env, diff --git a/pyproject.toml b/pyproject.toml index 0319e2e09..e3efab7ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,7 +102,9 @@ junit_family = "xunit2" xfail_strict = true filterwarnings = ["error"] log_cli_level = "info" - +markers = [ + "serial: tests that must *not* be run in parallel (deselect with '-m \"not serial\"')", +] [tool.mypy] python_version = "3.11" diff --git a/test/test_ios.py b/test/test_ios.py index 52af0c0ff..ca6bc7ab2 100644 --- a/test/test_ios.py +++ b/test/test_ios.py @@ -20,10 +20,12 @@ def test_platform(self): """ -# iOS tests shouldn't be run in parallel, because they're dependent on starting -# a simulator. It's *possible* to start multiple simulators, but not advisable -# to start as many simulators as there are CPUs on the test machine. -@pytest.mark.xdist_group(name="ios") +# iOS tests shouldn't be run in parallel, because they're dependent on calling +# Xcode, and starting a simulator. These are both multi-threaded operations, and +# it's easy to overload the CI machine if there are multiple test processes +# running multithreaded processes. Therefore, they're put in the serial group, +# which is guaranteed to run single-process. +@pytest.mark.serial @pytest.mark.parametrize( "build_config", [ @@ -72,7 +74,7 @@ def test_ios_platforms(tmp_path, build_config): assert set(actual_wheels) == expected_wheels -@pytest.mark.xdist_group(name="ios") +@pytest.mark.serial def test_no_test_sources(tmp_path, capfd): if utils.platform != "macos": pytest.skip("this test can only run on macOS") From b2e7e614fbe0dd6831a997814b905f08b7bc6a9d Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 26 Mar 2025 14:39:40 +0800 Subject: [PATCH 14/18] Try the serial group again. --- bin/run_tests.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/run_tests.py b/bin/run_tests.py index 40385f089..43319f0a8 100755 --- a/bin/run_tests.py +++ b/bin/run_tests.py @@ -34,6 +34,7 @@ if args.run_podman: unit_test_args += ["--run-podman"] + print("\n********** UNIT TESTS **********") subprocess.run(unit_test_args, check=True) # Run the serial integration tests without --dist @@ -50,6 +51,7 @@ "test", "-vv", ] + print("\n********** SERIAL INTEGRATION TESTS **********") subprocess.run(serial_integration_test_args, check=True) # Non-serial integration tests @@ -73,4 +75,5 @@ if sys.platform.startswith("linux") and args.run_podman: integration_test_args += ["--run-podman"] + print("\n********** NON-SERIAL INTEGRATION TESTS **********") subprocess.run(integration_test_args, check=True) From 1b166874ce342cda786e6059746a7e38f03a734b Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 27 Mar 2025 06:03:08 +0800 Subject: [PATCH 15/18] Try running on macos-15. --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 12eb263d7..cc9379230 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,8 +37,8 @@ jobs: strategy: fail-fast: false matrix: - # os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14] - os: [macos-13, macos-14] + # os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-15] + os: [macos-13, macos-15] python_version: ['3.13'] # include: # - os: ubuntu-latest From a73ca0edc8e6e96258bda6edce29c965303211bd Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 27 Mar 2025 06:24:07 +0800 Subject: [PATCH 16/18] Run on macos-15 again (removing xcode update) --- .github/workflows/test.yml | 5 ----- bin/run_tests.py | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cc9379230..bd671f671 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -86,11 +86,6 @@ jobs: # xcrun simctl boot "iPhone SE (3rd generation)" # xcrun simctl list - - name: Switch to Xcode 16 - if: matrix.os == 'macos-14' - run: | - sudo xcode-select --switch /Applications/Xcode_16.2.app - # - name: Generate a sample project # run: | # uv run -m test.test_projects test.test_0_basic.basic_project sample_proj diff --git a/bin/run_tests.py b/bin/run_tests.py index 43319f0a8..4acd50e50 100755 --- a/bin/run_tests.py +++ b/bin/run_tests.py @@ -34,7 +34,7 @@ if args.run_podman: unit_test_args += ["--run-podman"] - print("\n********** UNIT TESTS **********") + print("\n\n********** UNIT TESTS **********") subprocess.run(unit_test_args, check=True) # Run the serial integration tests without --dist @@ -51,7 +51,7 @@ "test", "-vv", ] - print("\n********** SERIAL INTEGRATION TESTS **********") + print("\n\n********** SERIAL INTEGRATION TESTS **********") subprocess.run(serial_integration_test_args, check=True) # Non-serial integration tests @@ -75,5 +75,5 @@ if sys.platform.startswith("linux") and args.run_podman: integration_test_args += ["--run-podman"] - print("\n********** NON-SERIAL INTEGRATION TESTS **********") + print("\n\n********** NON-SERIAL INTEGRATION TESTS **********") subprocess.run(integration_test_args, check=True) From 299a5751e63c389dca5720f9ffa472601e8aa0b1 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 27 Mar 2025 07:06:36 +0800 Subject: [PATCH 17/18] macos-15 again. --- bin/run_tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/run_tests.py b/bin/run_tests.py index 4acd50e50..6a73d03a1 100755 --- a/bin/run_tests.py +++ b/bin/run_tests.py @@ -34,7 +34,7 @@ if args.run_podman: unit_test_args += ["--run-podman"] - print("\n\n********** UNIT TESTS **********") + print("\n\n==================== UNIT TESTS ====================") subprocess.run(unit_test_args, check=True) # Run the serial integration tests without --dist @@ -51,7 +51,7 @@ "test", "-vv", ] - print("\n\n********** SERIAL INTEGRATION TESTS **********") + print("\n\n==================== SERIAL INTEGRATION TESTS ====================") subprocess.run(serial_integration_test_args, check=True) # Non-serial integration tests @@ -75,5 +75,5 @@ if sys.platform.startswith("linux") and args.run_podman: integration_test_args += ["--run-podman"] - print("\n\n********** NON-SERIAL INTEGRATION TESTS **********") + print("\n\n==================== NON-SERIAL INTEGRATION TESTS ====================") subprocess.run(integration_test_args, check=True) From b44d0c5472690c6eba135d67818b44771acda159 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 27 Mar 2025 07:41:53 +0800 Subject: [PATCH 18/18] Try flushing stdout to get test output... --- bin/run_tests.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/bin/run_tests.py b/bin/run_tests.py index 6a73d03a1..421d29366 100755 --- a/bin/run_tests.py +++ b/bin/run_tests.py @@ -34,7 +34,10 @@ if args.run_podman: unit_test_args += ["--run-podman"] - print("\n\n==================== UNIT TESTS ====================") + print( + "\n\n================================== UNIT TESTS ==================================", + flush=True, + ) subprocess.run(unit_test_args, check=True) # Run the serial integration tests without --dist @@ -51,7 +54,10 @@ "test", "-vv", ] - print("\n\n==================== SERIAL INTEGRATION TESTS ====================") + print( + "\n\n=========================== SERIAL INTEGRATION TESTS ===========================", + flush=True, + ) subprocess.run(serial_integration_test_args, check=True) # Non-serial integration tests @@ -75,5 +81,8 @@ if sys.platform.startswith("linux") and args.run_podman: integration_test_args += ["--run-podman"] - print("\n\n==================== NON-SERIAL INTEGRATION TESTS ====================") + print( + "\n\n========================= NON-SERIAL INTEGRATION TESTS =========================", + flush=True, + ) subprocess.run(integration_test_args, check=True)