Skip to content

Commit 3fa7bd1

Browse files
authored
ci: fix cirrus and reduce rebuilds (#2460)
* ci: fix Cirrus CI on Windows Signed-off-by: Henry Schreiner <[email protected]> * ci: skip unrelated changes more often Signed-off-by: Henry Schreiner <[email protected]> --------- Signed-off-by: Henry Schreiner <[email protected]>
1 parent c6368be commit 3fa7bd1

File tree

5 files changed

+40
-7
lines changed

5 files changed

+40
-7
lines changed

.cirrus.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
only_if: changesInclude('.cirrus.yml') || ($CIRRUS_BRANCH == "main" && !changesIncludeOnly('docs/*', '.pre-commit-config.yaml')) || $CIRRUS_BRANCH =~ 'cirrus.*'
1+
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.*'
22

33
run_tests: &RUN_TESTS
44
install_cibuildwheel_script:
5-
- python -m pip install dependency-groups
6-
- python -m dependency_groups test | xargs python -m pip install -e.
5+
- python -m pip install -U pip
6+
- python -m pip install -e. --group test
77
run_cibuildwheel_tests_script:
88
- python ./bin/run_tests.py
99

@@ -55,9 +55,12 @@ windows_x86_task:
5555
memory: 8G
5656

5757
install_pre_requirements_script:
58+
- certutil -generateSSTFromWU roots.sst
59+
- certutil -addstore -f root roots.sst
60+
- del roots.sst
5861
- choco install -y --no-progress python3 --version 3.12.4
5962
- refreshenv
60-
- echo PATH=%PATH% >> "%CIRRUS_ENV%"
63+
- powershell -Command "$cleanPath = $env:PATH -replace ';+$', ''; Add-Content -Path $env:CIRRUS_ENV -Value ('PATH=' + $cleanPath)"
6164
<<: *RUN_TESTS
6265

6366
macos_arm64_task:

.github/workflows/test.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,19 @@ on:
1212
- reopened
1313
- labeled
1414
paths-ignore:
15-
- 'docs/**'
15+
- .ci*
16+
- bin/*
17+
- docs/**
18+
- examples/azure-pipelines-*
19+
- examples/ci*
20+
- examples/travis-ci-*
1621
- .pre-commit-config.yaml
22+
- .readthedocs.yml
23+
- .travis.yml
24+
- README.md
25+
- azure-pipelines.yml
26+
- mkdocs.yml
27+
- noxfile.py
1728
workflow_dispatch:
1829
# allow manual runs on branches without a PR
1930

azure-pipelines.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
pr:
22
paths:
33
exclude:
4-
- docs/*
4+
- .github/**
5+
- bin/*
6+
- docs/**
7+
- examples/github-*
8+
- examples/ci*
9+
- examples/travis-ci-*
10+
- .ci*
511
- .pre-commit-config.yaml
12+
- .readthedocs.yml
13+
- .travis.yml
14+
- README.md
15+
- mkdocs.yml
16+
- noxfile.py
617

718
jobs:
819
- job: linux_311

examples/cirrus-ci-minimal.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,13 @@ windows_x86_task:
5252
memory: 4G
5353

5454
install_pre_requirements_script:
55+
- certutil -generateSSTFromWU roots.sst
56+
- certutil -addstore -f root roots.sst
57+
- del roots.sst
5558
- choco install -y --no-progress python3 --version 3.12.4
5659
- refreshenv
57-
- echo PATH=%PATH% >> "%CIRRUS_ENV%"
60+
- powershell -Command "$cleanPath = $env:PATH -replace ';+$', ''; Add-Content -Path $env:CIRRUS_ENV -Value ('PATH=' + $cleanPath)"
61+
5862
<<: *BUILD_AND_STORE_WHEELS
5963

6064
macos_arm64_task:

test/test_ssl.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import socket
12
import textwrap
23

34
from . import test_projects, utils
@@ -24,6 +25,9 @@ def test(tmp_path):
2425
project_dir = tmp_path / "project"
2526
project_with_ssl_tests.generate(project_dir)
2627

28+
# warm up connection
29+
socket.getaddrinfo("tls-v1-2.badssl.com", 443)
30+
2731
actual_wheels = utils.cibuildwheel_run(project_dir)
2832

2933
expected_wheels = utils.expected_wheels("spam", "0.1.0")

0 commit comments

Comments
 (0)