@@ -29,7 +29,6 @@ linux_container_definition: &LINUX_CONTAINER_DEFINITION
29
29
cpu : 3
30
30
memory : 8G
31
31
32
-
33
32
win_vm_definition : &WINDOWS_VM_DEFINITION
34
33
ec2_instance :
35
34
experimental : true # see https://github.com/cirruslabs/cirrus-ci-docs/issues/1051
@@ -95,6 +94,31 @@ poetry_cache_template: &POETRY_CACHE
95
94
eks_container :
96
95
<< : *LINUX_CONTAINER_DEFINITION
97
96
97
+
98
+ .poetry_macos_template : &POETRY_MACOS_TEMPLATE
99
+ << : *POETRY_CACHE
100
+ jfrog_install_script :
101
+ - brew install jfrog-cli
102
+ - jf intro
103
+ poetry_install_script :
104
+ - brew install poetry
105
+ - poetry config keyring.enabled false # Keyring is locked in macOS VM and not needed for downloading dependencies
106
+ - jfrog config add repox --artifactory-url "$ARTIFACTORY_URL" --access-token "$ARTIFACTORY_PRIVATE_ACCESS_TOKEN"
107
+ - jfrog poetry-config --server-id-resolve repox --repo-resolve sonarsource-pypi
108
+ - jfrog poetry install --build-name="$CIRRUS_REPO_NAME" --build-number="$CI_BUILD_NUMBER"
109
+
110
+ macos_worker_template : &MACOS_WORKER_DEFINITION
111
+ persistent_worker :
112
+ isolation :
113
+ tart :
114
+ image : ghcr.io/cirruslabs/macos-sonoma-xcode:latest
115
+ cpu : 3
116
+ memory : 6G
117
+ resources :
118
+ tart-vms : 1
119
+ labels :
120
+ envname : prod
121
+
98
122
mend_scan_task :
99
123
<< : *POETRY_LINUX_TEMPLATE
100
124
depends_on :
@@ -171,6 +195,26 @@ qa_task:
171
195
qa_script :
172
196
- poetry run pytest tests/
173
197
198
+ qa_macos_task :
199
+ alias : qa_macos
200
+ only_if : $CIRRUS_CRON == "macos-its-cron"
201
+ name : " [macOS] Run tests"
202
+ << : [*MACOS_WORKER_DEFINITION, *POETRY_MACOS_TEMPLATE]
203
+ env :
204
+ PATH : " /Users/admin/.local/bin:$PATH"
205
+ install_uv_script :
206
+ - brew install uv
207
+ test_39_script :
208
+ - .cirrus/run_macos_tests.sh "3.9.18"
209
+ test_310_script :
210
+ - .cirrus/run_macos_tests.sh "3.10.13"
211
+ test_311_script :
212
+ - .cirrus/run_macos_tests.sh "3.11.7"
213
+ test_312_script :
214
+ - .cirrus/run_macos_tests.sh "3.12.1"
215
+ test_313_script :
216
+ - .cirrus/run_macos_tests.sh "3.13.2"
217
+
174
218
qa_windows_task :
175
219
name : " Test Windows"
176
220
<< : *POETRY_WIN_INSTALL
@@ -194,15 +238,20 @@ its_task:
194
238
fingerprint_script : echo "sonarqube-$SONARQUBE_VERSION"
195
239
<< : *POETRY_LINUX_TEMPLATE
196
240
its_script :
197
- - unzip -q sonarqube_cache/sonarqube.zip -d sonarqube
198
- - cd $(ls -d sonarqube/*/)
199
- - ./bin/linux-x86-64/sonar.sh start
200
- - cd -
201
- - jfrog poetry-config --server-id-resolve repox --repo-resolve sonarsource-pypi
202
- - jfrog poetry install
203
- - unset SONAR_TOKEN
204
- - unset SONAR_HOST_URL
205
- - poetry run pytest --its tests/its
241
+ - .cirrus/run_its.sh
242
+
243
+ its_macos_task :
244
+ name : " [macOS] Integration Tests"
245
+ alias : its_macos
246
+ only_if : $CIRRUS_CRON == "macos-its-cron"
247
+ # the macOS workers are only available from Monday 06:45 CEST to Friday 20:00 CEST (see https://xtranet-sonarsource.atlassian.net/wiki/spaces/Platform/pages/3447980037/MacOS+Persistent+Workers+User+Guide+-+Cirrus+CI)
248
+ << : [*MACOS_WORKER_DEFINITION, *POETRY_MACOS_TEMPLATE]
249
+ sonarqube_cache :
250
+ folder : sonarqube_cache/
251
+ populate_script : mkdir -p sonarqube_cache && wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-$SONARQUBE_VERSION.zip -O sonarqube_cache/sonarqube.zip
252
+ fingerprint_script : echo "sonarqube-$SONARQUBE_VERSION"
253
+ its_script :
254
+ - .cirrus/run_its.sh
206
255
207
256
promote_task :
208
257
depends_on :
0 commit comments