Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f0fce1e

Browse files
authored
ci: drop Cirrus CI except for FreeBSD (#302)
This is a quick conversion of Cirrus to GHA for everythinh that can be moved. FreeBSD might just be a casualty? Assisted-by: OpenCode:Kimi-K2.5 Signed-off-by: Henry Schreiner <[email protected]>
1 parent 08d1715 commit f0fce1e

2 files changed

Lines changed: 50 additions & 100 deletions

File tree

.cirrus.yml

Lines changed: 3 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
# ---- Default values to be merged into tasks ----
2+
# Cirrus CI configuration - FreeBSD testing only
3+
# Other platforms and tests are now covered by GitHub Actions
34

45
env:
56
LC_ALL: C.UTF-8
@@ -32,10 +33,6 @@ env:
3233
folder: "${CIRRUS_WORKING_DIR}/.cache/pip"
3334
fingerprint_script: echo "${CIRRUS_OS}-${CIRRUS_TASK_NAME}"
3435
reupload_on_changes: true
35-
pre_commit_cache:
36-
folder: "${CIRRUS_WORKING_DIR}/.cache/pre-commit"
37-
fingerprint_script: echo "${CIRRUS_OS}-${CIRRUS_TASK_NAME}" | cat - .pre-commit-config.yaml
38-
reupload_on_changes: true
3936

4037
.test_template: &test-template
4138
# Requires pip, tox, and pipx to be installed via OS/pip
@@ -85,48 +82,6 @@ build_task:
8582
upload_artifacts:
8683
path: dist.tar.gz
8784

88-
89-
linux_task:
90-
matrix:
91-
- name: test (Linux - 3.9)
92-
container: {image: "python:3.9-bookworm"}
93-
- name: test (Linux - 3.10)
94-
container: {image: "python:3.10-trixie"}
95-
skip: $BRANCH !=~ "^(main|master)$"
96-
- name: test (Linux - 3.12)
97-
container: {image: "python:3.12-trixie"}
98-
skip: $BRANCH !=~ "^(main|master)$"
99-
- name: test (Linux - 3.14)
100-
container: {image: "python:3.14-trixie"}
101-
- name: test (Linux - 3.15)
102-
container: {image: "python:3.15-rc-trixie"}
103-
allow_failures: true # RC
104-
install_script:
105-
- python -m pip install --upgrade pip tox tox-uv pipx
106-
<<: *test-template
107-
alias: base-test
108-
109-
mamba_task:
110-
name: test (Linux - mambaforge)
111-
container: {image: "condaforge/mambaforge"}
112-
install_script: # Overwrite template
113-
- mamba install -y pip pipx tox curl
114-
<<: *test-template
115-
depends_on: [base-test]
116-
117-
macos_task:
118-
name: test (macOS - brew)
119-
macos_instance:
120-
image: ghcr.io/cirruslabs/macos-runner:sonoma
121-
env:
122-
PATH: "/opt/homebrew/opt/python/libexec/bin:${PATH}"
123-
brew_cache: {folder: "$HOME/Library/Caches/Homebrew"}
124-
install_script:
125-
- brew reinstall python
126-
- brew install tox pipx
127-
<<: *test-template
128-
depends_on: [build, base-test]
129-
13085
freebsd_task:
13186
name: test (freebsd - 3.11)
13287
freebsd_instance: {image_family: freebsd-14-3}
@@ -135,28 +90,7 @@ freebsd_task:
13590
- pkg install -y git python311 py311-pip py311-gdbm py311-sqlite3 py311-tox py311-tomli py311-pipx
13691
- ln -s /usr/local/bin/python3.11 /usr/local/bin/python
13792
<<: *test-template
138-
depends_on: [build, base-test]
139-
140-
windows_task:
141-
name: test (Windows - 3.12.10)
142-
windows_container:
143-
image: "cirrusci/windowsservercore:2019"
144-
os_version: 2019
145-
env:
146-
CIRRUS_SHELL: bash
147-
PATH: /c/Python312:/c/Python312/Scripts:/c/tools:${PATH}
148-
install_script:
149-
# Activate long file paths to avoid some errors
150-
- ps: New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
151-
- choco install -y --no-progress python3 --version=3.12.10 --params "/NoLockdown"
152-
- choco install -y --no-progress curl
153-
- python -m pip install --upgrade certifi
154-
- python -m pip install -U pip tox tox-uv pipx
155-
configure_certs_script: |
156-
CERT_PATH="$(python -m certifi | tr -d '\r\n')"
157-
echo "SSL_CERT_FILE=$CERT_PATH" >> "$CIRRUS_ENV"
158-
<<: *test-template
159-
depends_on: [build, base-test]
93+
depends_on: [build]
16094

16195
finalize_task:
16296
container: {image: "python:3.12-trixie"}
@@ -165,33 +99,3 @@ finalize_task:
16599
install_script: pip install 'coveralls<4'
166100
# ^-- https://github.com/TheKevJames/coveralls-python/issues/434
167101
finalize_coverage_script: coveralls --finish
168-
169-
linkcheck_task:
170-
name: linkcheck (Linux - 3.12)
171-
only_if: $BRANCH =~ "^(main|master)$"
172-
container: {image: "python:3.12-trixie"}
173-
depends_on: [finalize]
174-
allow_failures: true
175-
<<: *task-template
176-
install_script: pip install tox tox-uv
177-
download_artifact_script: *download-artifact
178-
linkcheck_script: tox --installpkg dist/*.whl -e linkcheck -- -q
179-
180-
# # The following task is already covered by a GitHub Action,
181-
# # (commented to avoid errors when publishing duplicated packages to PyPI)
182-
# publish_task:
183-
# name: publish (Linux - 3.12)
184-
# container: {image: "python:3.12-trixie"}
185-
# depends_on: [build, base-test, test]
186-
# only_if: $CIRRUS_TAG =~ 'v\d.*' && $CIRRUS_USER_PERMISSION == "admin"
187-
# <<: *task-template
188-
# env:
189-
# TWINE_REPOSITORY: pypi
190-
# TWINE_USERNAME: __token__
191-
# TWINE_PASSWORD: $PYPI_TOKEN
192-
# # See: https://cirrus-ci.org/guide/writing-tasks/#encrypted-variables
193-
# install_script: pip install tox tox-uv
194-
# download_artifact_script: *download-artifact
195-
# publish_script:
196-
# - ls dist/*
197-
# - tox -e publish

.github/workflows/ci.yml

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,54 @@ jobs:
108108
flag-name: ${{ matrix.platform }} - py${{ matrix.python }}
109109
parallel: true
110110

111+
test-mamba:
112+
needs: prepare
113+
runs-on: ubuntu-latest
114+
steps:
115+
- uses: actions/checkout@v6
116+
- name: Setup Micromamba
117+
uses: mamba-org/setup-micromamba@v2
118+
with:
119+
environment-name: test
120+
create-args: >-
121+
pip
122+
pipx
123+
tox
124+
curl
125+
- name: Retrieve pre-built distribution files
126+
uses: actions/download-artifact@v7
127+
with: {name: python-distribution-files, path: dist/}
128+
- name: Retrieve test download files
129+
uses: actions/download-artifact@v7
130+
with:
131+
name: test-download-files
132+
path: ${{ env.VALIDATE_PYPROJECT_CACHE_REMOTE }}
133+
- name: Run tests
134+
shell: bash -el {0}
135+
run: >-
136+
tox
137+
--installpkg '${{ needs.prepare.outputs.wheel-distribution }}'
138+
-- -n 5 -rFEx --durations 10 --color yes
139+
140+
linkcheck:
141+
needs: finalize
142+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
143+
runs-on: ubuntu-latest
144+
steps:
145+
- uses: actions/checkout@v6
146+
- uses: actions/setup-python@v6
147+
with: {python-version: "3.x"}
148+
- uses: astral-sh/setup-uv@v7
149+
- name: Retrieve pre-built distribution files
150+
uses: actions/download-artifact@v7
151+
with: {name: python-distribution-files, path: dist/}
152+
- name: Check links
153+
run: >-
154+
uvx --with tox-uv
155+
tox --installpkg dist/*.whl -e linkcheck -- -q
156+
111157
finalize:
112-
needs: test
158+
needs: [test, test-mamba]
113159
runs-on: ubuntu-latest
114160
steps:
115161
- name: Finalize coverage report

0 commit comments

Comments
 (0)