Skip to content

Commit 751c435

Browse files
committed
Merge bitcoin-core/secp256k1#1152: Update macOS image for CI
a8494b0 Use compute credits for macOS jobs (Pieter Wuille) c0ae48c Update macOS image for CI (Pieter Wuille) Pull request description: ACKs for top commit: real-or-random: ACK a8494b0 jonasnick: ACK a8494b0 Tree-SHA512: af99585ef68fc8305785885efaf0a0ebe45e5765661d654523a36ba843fc83e0ac40a554638437fa53804e4aa42dbcd92d597702ee6225b66a044a6304bafd45
2 parents 2286f80 + a8494b0 commit 751c435

File tree

1 file changed

+16
-44
lines changed

1 file changed

+16
-44
lines changed

.cirrus.yml

+16-44
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ env:
2626
# Compile and run the tests
2727
EXAMPLES: yes
2828

29+
# https://cirrus-ci.org/pricing/#compute-credits
30+
# Only use credits for pull requests to the main repo
31+
credits_snippet: &CREDITS
32+
use_compute_credits: $CIRRUS_REPO_FULL_NAME == 'bitcoin-core/secp256k1' && $CIRRUS_PR != ""
33+
2934
cat_logs_snippet: &CAT_LOGS
3035
always:
3136
cat_tests_log_script:
@@ -107,65 +112,32 @@ task:
107112
<< : *CAT_LOGS
108113

109114
task:
110-
name: "x86_64: macOS Catalina"
115+
name: "arm64: macOS Ventura"
111116
macos_instance:
112-
image: catalina-base
117+
image: ghcr.io/cirruslabs/macos-ventura-base:latest
113118
env:
114119
HOMEBREW_NO_AUTO_UPDATE: 1
115120
HOMEBREW_NO_INSTALL_CLEANUP: 1
116-
# Cirrus gives us a fixed number of 12 virtual CPUs. Not that we even have that many jobs at the moment...
117-
MAKEFLAGS: -j13
121+
# Cirrus gives us a fixed number of 4 virtual CPUs. Not that we even have that many jobs at the moment...
122+
MAKEFLAGS: -j5
118123
matrix:
119124
<< : *ENV_MATRIX
125+
env:
126+
ASM: no
127+
WITH_VALGRIND: no
128+
CTIMETEST: no
120129
matrix:
121130
- env:
122-
CC: gcc-9
131+
CC: gcc
123132
- env:
124133
CC: clang
125-
# Update Command Line Tools
126-
# Uncomment this if the Command Line Tools on the CirrusCI macOS image are too old to brew valgrind.
127-
# See https://apple.stackexchange.com/a/195963 for the implementation.
128-
## update_clt_script:
129-
## - system_profiler SPSoftwareDataType
130-
## - touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
131-
## - |-
132-
## PROD=$(softwareupdate -l | grep "*.*Command Line" | tail -n 1 | awk -F"*" '{print $2}' | sed -e 's/^ *//' | sed 's/Label: //g' | tr -d '\n')
133-
## # For debugging
134-
## - softwareupdate -l && echo "PROD: $PROD"
135-
## - softwareupdate -i "$PROD" --verbose
136-
## - rm /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
137-
##
138-
brew_valgrind_pre_script:
139-
# Retry a few times because this tends to fail randomly.
140-
- for i in {1..5}; do brew update && break || sleep 15; done
141-
- brew config
142-
- brew tap LouisBrunner/valgrind
143-
# Fetch valgrind source but don't build it yet.
144-
- brew fetch --HEAD LouisBrunner/valgrind/valgrind
145-
brew_valgrind_cache:
146-
# This is $(brew --cellar valgrind) but command substition does not work here.
147-
folder: /usr/local/Cellar/valgrind
148-
# Rebuild cache if ...
149-
fingerprint_script:
150-
# ... macOS version changes:
151-
- sw_vers
152-
# ... brew changes:
153-
- brew config
154-
# ... valgrind changes:
155-
- git -C "$(brew --cache)/valgrind--git" rev-parse HEAD
156-
populate_script:
157-
# If there's no hit in the cache, build and install valgrind.
158-
- brew install --HEAD LouisBrunner/valgrind/valgrind
159-
brew_valgrind_post_script:
160-
# If we have restored valgrind from the cache, tell brew to create symlink to the PATH.
161-
# If we haven't restored from cached (and just run brew install), this is a no-op.
162-
- brew link valgrind
163134
brew_script:
164-
- brew install automake libtool gcc@9
135+
- brew install automake libtool gcc
165136
<< : *MERGE_BASE
166137
test_script:
167138
- ./ci/cirrus.sh
168139
<< : *CAT_LOGS
140+
<< : *CREDITS
169141

170142
task:
171143
name: "s390x (big-endian): Linux (Debian stable, QEMU)"

0 commit comments

Comments
 (0)