-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.cirrus.yml
130 lines (123 loc) · 3.54 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
Lint_task:
container:
cpu: 1
memory: 512Mi
image: python:3-slim
install_script:
- pip3 install -U .[lint]
script:
- bork run lint
Linux_task:
alias: Linux tests
allow_failures: $CIRRUS_TASK_NAME =~ '.*-rc-.*'
container:
cpu: 1
memory: 512Mi
matrix:
- image: python:3.8-slim
- image: python:3.9-slim
- image: python:3.10-slim
- image: python:3.11-slim
- image: python:3.12-slim
install_script:
- pip3 install -U .[test]
script:
- python3 --version
- pytest --verbose
macOS_task:
alias: macOS tests
macos_instance:
image: ghcr.io/cirruslabs/macos-runner:sonoma
env:
PATH: ${HOME}/.pyenv/shims:${PATH}
PYTHON: 3:latest
brew_update_script:
- brew update
brew_install_script:
# Per the pyenv homebrew recommendations.
# https://github.com/pyenv/pyenv/wiki#suggested-build-environment
- brew install openssl readline sqlite3 xz zlib pyenv git
pyenv_install_script:
- pyenv install ${PYTHON}
- pyenv global 3
- pyenv rehash
pip_install_script:
- pip install -U --upgrade-strategy eager pip 'setuptools>61'
- pip install .[test]
script:
- python3 --version
- pytest --verbose
FreeBSD_task:
alias: FreeBSD tests
freebsd_instance:
image_family: freebsd-14-0
env:
matrix:
- PYTHON: 3.8
- PYTHON: 3.9
- PYTHON: 3.10
- PYTHON: 3.11
install_script:
- PY=`echo $PYTHON | tr -d '.'`
- pkg install -y python${PY} py${PY}-setuptools
- python${PYTHON} -m ensurepip --upgrade
- python${PYTHON} -m pip install -U 'pip>=19' # Hard requirement for no setup.py.
- python${PYTHON} -m pip install .[test]
script:
- python${PYTHON} --version
- pytest --verbose
Windows_task:
alias: Windows tests
windows_container:
image: cirrusci/windowsservercore:2019
env:
matrix:
- PYTHON: 3.8.10
- PYTHON: 3.9.13
- PYTHON: 3.10.9
- PYTHON: 3.11.8
- PYTHON: 3.12.2
python_install_script:
# https://docs.python.org/3.6/using/windows.html#installing-without-ui
- ps: Invoke-WebRequest -Uri https://www.python.org/ftp/python/${env:PYTHON}/python-${env:PYTHON}-amd64.exe -OutFile C:\python-installer.exe
- C:\python-installer.exe /quiet TargetDir=C:\Python SimpleInstall=1
install_script:
- C:\Python\python.exe -m pip install -U pip
- C:\Python\python.exe -m pip install -e .[test]
version_info_script:
- C:\Python\python.exe --version
- C:\Python\python.exe -m pip --version
test_script:
- C:\Python\python.exe -m pytest --verbose
# Meta-task which depends on every other test/lint task to finish.
success_task:
name: CI success
container: {image: "busybox"}
script: "exit 0"
depends_on:
- Lint
- FreeBSD tests
- Linux tests
- macOS tests
- Windows tests
# If the `version` file is modified on the main branch, make a release.
Release_task:
only_if: "changesInclude('emanate/version.py') && $BRANCH == 'main' && $CIRRUS_CRON == ''"
depends_on: [CI success]
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ENCRYPTED[93940c854f7cb146391fdb3ef75ab7f8e229e83837f49fbcb52472bcf3f1d0265ed8629fd57204152e019af4c6b9354c]
BORK_GITHUB_TOKEN: ENCRYPTED[2c14d546bfe3ccf73f08fc2f722dfa41a4f0f302e03032b232df5ba998f49bb3d5f2370aabdcc4a7dac727578e384f1c]
container:
image: python:3-slim
install_script:
- apt-get update
- apt-get install -y git
- pip3 install . .[test]
build_script:
- bork clean
- bork build
test_script:
- bork run test
release_script:
- bork release