Skip to content

Commit 8e017f3

Browse files
committed
ci, refactor: Add MACOS_NATIVE_TASK_TEMPLATE
A native macOS task does not aware of Linux container settings, and it does not use the `depends_built_cache`.
1 parent e3b06e8 commit 8e017f3

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

.cirrus.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,30 @@ base_template: &BASE_TEMPLATE
3535

3636
main_template: &MAIN_TEMPLATE
3737
timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out
38+
ccache_cache:
39+
folder: "/tmp/ccache_dir"
40+
ci_script:
41+
- ./ci/test_run_all.sh
42+
43+
global_task_template: &GLOBAL_TASK_TEMPLATE
44+
<< : *BASE_TEMPLATE
3845
container:
3946
# https://cirrus-ci.org/faq/#are-there-any-limits
4047
# Each project has 16 CPU in total, assign 2 to each container, so that 8 tasks run in parallel
4148
cpu: 2
4249
greedy: true
4350
memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-containers
44-
ccache_cache:
45-
folder: "/tmp/ccache_dir"
4651
depends_built_cache:
4752
folder: "depends/built"
4853
fingerprint_script: echo $CIRRUS_TASK_NAME $(git rev-list -1 HEAD ./depends)
49-
ci_script:
50-
- ./ci/test_run_all.sh
54+
<< : *MAIN_TEMPLATE
5155

52-
global_task_template: &GLOBAL_TASK_TEMPLATE
56+
macos_native_task_template: &MACOS_NATIVE_TASK_TEMPLATE
5357
<< : *BASE_TEMPLATE
58+
check_clang_script:
59+
- clang --version
60+
brew_install_script:
61+
- brew install boost libevent qt@5 miniupnpc libnatpmp ccache zeromq qrencode libtool automake gnu-getopt
5462
<< : *MAIN_TEMPLATE
5563

5664
compute_credits_template: &CREDITS_TEMPLATE
@@ -307,12 +315,10 @@ task:
307315

308316
task:
309317
name: 'macOS 12 native [gui, system sqlite only] [no depends]'
310-
brew_install_script:
311-
- brew install boost libevent qt@5 miniupnpc libnatpmp ccache zeromq qrencode libtool automake gnu-getopt
312-
<< : *GLOBAL_TASK_TEMPLATE
313318
macos_instance:
314319
# Use latest image, but hardcode version to avoid silent upgrades (and breaks)
315320
image: monterey-xcode-13.3 # https://cirrus-ci.org/guide/macOS
321+
<< : *MACOS_NATIVE_TASK_TEMPLATE
316322
env:
317323
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
318324
CI_USE_APT_INSTALL: "no"

0 commit comments

Comments
 (0)