ci: fix cirrus and reduce rebuilds (#2460)
* ci: fix Cirrus CI on Windows Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * ci: skip unrelated changes more often Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
+7
-4
@@ -1,9 +1,9 @@
|
|||||||
only_if: changesInclude('.cirrus.yml') || ($CIRRUS_BRANCH == "main" && !changesIncludeOnly('docs/*', '.pre-commit-config.yaml')) || $CIRRUS_BRANCH =~ 'cirrus.*'
|
only_if: changesInclude('.cirrus.yml') || ($CIRRUS_BRANCH == "main" && !changesIncludeOnly('.github/*', 'bin/*', 'docs/*', '.circleci/*', '.travis.yml', '.pre-commit-config.yaml', '.readthedocs.yml', 'azure-pipelines.yml', 'README.md', 'mkdocs.yml', 'noxfile.py')) || $CIRRUS_BRANCH =~ 'cirrus.*'
|
||||||
|
|
||||||
run_tests: &RUN_TESTS
|
run_tests: &RUN_TESTS
|
||||||
install_cibuildwheel_script:
|
install_cibuildwheel_script:
|
||||||
- python -m pip install dependency-groups
|
- python -m pip install -U pip
|
||||||
- python -m dependency_groups test | xargs python -m pip install -e.
|
- python -m pip install -e. --group test
|
||||||
run_cibuildwheel_tests_script:
|
run_cibuildwheel_tests_script:
|
||||||
- python ./bin/run_tests.py
|
- python ./bin/run_tests.py
|
||||||
|
|
||||||
@@ -55,9 +55,12 @@ windows_x86_task:
|
|||||||
memory: 8G
|
memory: 8G
|
||||||
|
|
||||||
install_pre_requirements_script:
|
install_pre_requirements_script:
|
||||||
|
- certutil -generateSSTFromWU roots.sst
|
||||||
|
- certutil -addstore -f root roots.sst
|
||||||
|
- del roots.sst
|
||||||
- choco install -y --no-progress python3 --version 3.12.4
|
- choco install -y --no-progress python3 --version 3.12.4
|
||||||
- refreshenv
|
- refreshenv
|
||||||
- echo PATH=%PATH% >> "%CIRRUS_ENV%"
|
- powershell -Command "$cleanPath = $env:PATH -replace ';+$', ''; Add-Content -Path $env:CIRRUS_ENV -Value ('PATH=' + $cleanPath)"
|
||||||
<<: *RUN_TESTS
|
<<: *RUN_TESTS
|
||||||
|
|
||||||
macos_arm64_task:
|
macos_arm64_task:
|
||||||
|
|||||||
@@ -12,8 +12,19 @@ on:
|
|||||||
- reopened
|
- reopened
|
||||||
- labeled
|
- labeled
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'docs/**'
|
- .ci*
|
||||||
|
- bin/*
|
||||||
|
- docs/**
|
||||||
|
- examples/azure-pipelines-*
|
||||||
|
- examples/ci*
|
||||||
|
- examples/travis-ci-*
|
||||||
- .pre-commit-config.yaml
|
- .pre-commit-config.yaml
|
||||||
|
- .readthedocs.yml
|
||||||
|
- .travis.yml
|
||||||
|
- README.md
|
||||||
|
- azure-pipelines.yml
|
||||||
|
- mkdocs.yml
|
||||||
|
- noxfile.py
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
# allow manual runs on branches without a PR
|
# allow manual runs on branches without a PR
|
||||||
|
|
||||||
|
|||||||
+12
-1
@@ -1,8 +1,19 @@
|
|||||||
pr:
|
pr:
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- docs/*
|
- .github/**
|
||||||
|
- bin/*
|
||||||
|
- docs/**
|
||||||
|
- examples/github-*
|
||||||
|
- examples/ci*
|
||||||
|
- examples/travis-ci-*
|
||||||
|
- .ci*
|
||||||
- .pre-commit-config.yaml
|
- .pre-commit-config.yaml
|
||||||
|
- .readthedocs.yml
|
||||||
|
- .travis.yml
|
||||||
|
- README.md
|
||||||
|
- mkdocs.yml
|
||||||
|
- noxfile.py
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- job: linux_311
|
- job: linux_311
|
||||||
|
|||||||
@@ -52,9 +52,13 @@ windows_x86_task:
|
|||||||
memory: 4G
|
memory: 4G
|
||||||
|
|
||||||
install_pre_requirements_script:
|
install_pre_requirements_script:
|
||||||
|
- certutil -generateSSTFromWU roots.sst
|
||||||
|
- certutil -addstore -f root roots.sst
|
||||||
|
- del roots.sst
|
||||||
- choco install -y --no-progress python3 --version 3.12.4
|
- choco install -y --no-progress python3 --version 3.12.4
|
||||||
- refreshenv
|
- refreshenv
|
||||||
- echo PATH=%PATH% >> "%CIRRUS_ENV%"
|
- powershell -Command "$cleanPath = $env:PATH -replace ';+$', ''; Add-Content -Path $env:CIRRUS_ENV -Value ('PATH=' + $cleanPath)"
|
||||||
|
|
||||||
<<: *BUILD_AND_STORE_WHEELS
|
<<: *BUILD_AND_STORE_WHEELS
|
||||||
|
|
||||||
macos_arm64_task:
|
macos_arm64_task:
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import socket
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
from . import test_projects, utils
|
from . import test_projects, utils
|
||||||
@@ -24,6 +25,9 @@ def test(tmp_path):
|
|||||||
project_dir = tmp_path / "project"
|
project_dir = tmp_path / "project"
|
||||||
project_with_ssl_tests.generate(project_dir)
|
project_with_ssl_tests.generate(project_dir)
|
||||||
|
|
||||||
|
# warm up connection
|
||||||
|
socket.getaddrinfo("tls-v1-2.badssl.com", 443)
|
||||||
|
|
||||||
actual_wheels = utils.cibuildwheel_run(project_dir)
|
actual_wheels = utils.cibuildwheel_run(project_dir)
|
||||||
|
|
||||||
expected_wheels = utils.expected_wheels("spam", "0.1.0")
|
expected_wheels = utils.expected_wheels("spam", "0.1.0")
|
||||||
|
|||||||
Reference in New Issue
Block a user