Merge bitcoin-core/secp256k1#1412: ci: Switch macOS from Ventura to Monterey and add Valgrind
c223d7e33d50b1da0b3ba617c83534185428b3d5 ci: Switch macOS from Ventura to Monterey and add Valgrind (Hennadii Stepanov) Pull request description: This PR switches the macOS native job from Ventura to Monterey, which allows to support Valgrind. Both runners--`macos-12` and `macos-13`--have the same clang compilers installed: - https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md - https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md But Valgrind works fine on macOS Monterey, but not on Ventura. See: https://github.com/bitcoin-core/secp256k1/issues/1392#issuecomment-1693685610. The Homebrew's Valgrind package is cached once it has been built (as it was before https://github.com/bitcoin-core/secp256k1/pull/1152). Therefore, the `actions/cache@*` action is needed to be added to the list of the allowed actions. https://github.com/bitcoin-core/secp256k1/pull/1412#issuecomment-1695716350: > By the way, this solves #1151. ACKs for top commit: real-or-random: ACK c223d7e33d50b1da0b3ba617c83534185428b3d5 I tested that a cttest failure makes CI fail: https://github.com/real-or-random/secp256k1/actions/runs/6010365844 Tree-SHA512: 5e72d89fd4d82acbda8adeda7106db0dad85162cca03abe8eae9a40393997ba36a84ad7b12c4b32aec5e9230f275738ef12169994cd530952e2b0b963449b231
This commit is contained in:
commit
65c79fe2d0
33
.github/actions/install-homebrew-valgrind/action.yml
vendored
Normal file
33
.github/actions/install-homebrew-valgrind/action.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
name: "Install Valgrind"
|
||||
description: "Install Homebrew's Valgrind package and cache it."
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- run: |
|
||||
brew tap LouisBrunner/valgrind
|
||||
brew fetch --HEAD LouisBrunner/valgrind/valgrind
|
||||
echo "CI_HOMEBREW_CELLAR_VALGRIND=$(brew --cellar valgrind)" >> "$GITHUB_ENV"
|
||||
shell: bash
|
||||
|
||||
- run: |
|
||||
sw_vers > valgrind_fingerprint
|
||||
brew --version >> valgrind_fingerprint
|
||||
git -C "$(brew --cache)/valgrind--git" rev-parse HEAD >> valgrind_fingerprint
|
||||
cat valgrind_fingerprint
|
||||
shell: bash
|
||||
|
||||
- uses: actions/cache@v3
|
||||
id: cache
|
||||
with:
|
||||
path: ${{ env.CI_HOMEBREW_CELLAR_VALGRIND }}
|
||||
key: ${{ github.job }}-valgrind-${{ hashFiles('valgrind_fingerprint') }}
|
||||
|
||||
- if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
brew install --HEAD LouisBrunner/valgrind/valgrind
|
||||
shell: bash
|
||||
|
||||
- if: steps.cache.outputs.cache-hit == 'true'
|
||||
run: |
|
||||
brew link valgrind
|
||||
shell: bash
|
23
.github/workflows/ci.yml
vendored
23
.github/workflows/ci.yml
vendored
@ -575,27 +575,28 @@ jobs:
|
||||
if: ${{ always() }}
|
||||
|
||||
macos-native:
|
||||
name: "x86_64: macOS Ventura"
|
||||
name: "x86_64: macOS Monterey"
|
||||
# See: https://github.com/actions/runner-images#available-images.
|
||||
runs-on: macos-13 # Use M1 once available https://github.com/github/roadmap/issues/528
|
||||
runs-on: macos-12 # Use M1 once available https://github.com/github/roadmap/issues/528
|
||||
|
||||
env:
|
||||
ASM: 'no'
|
||||
WITH_VALGRIND: 'no'
|
||||
CTIMETESTS: 'no'
|
||||
CC: 'clang'
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
env_vars:
|
||||
- { WIDEMUL: 'int64', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
|
||||
- { WIDEMUL: 'int64', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CC: 'gcc' }
|
||||
- { WIDEMUL: 'int128_struct', ECMULTGENPRECISION: 2, ECMULTWINDOW: 4 }
|
||||
- { WIDEMUL: 'int128', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
|
||||
- { WIDEMUL: 'int128', RECOVERY: 'yes', SCHNORRSIG: 'yes' }
|
||||
- { WIDEMUL: 'int128', RECOVERY: 'yes' }
|
||||
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
|
||||
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CC: 'gcc' }
|
||||
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CPPFLAGS: '-DVERIFY' }
|
||||
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', WRAPPER_CMD: 'valgrind --error-exitcode=42', SECP256K1_TEST_ITERS: 2 }
|
||||
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CC: 'gcc', WRAPPER_CMD: 'valgrind --error-exitcode=42', SECP256K1_TEST_ITERS: 2 }
|
||||
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CPPFLAGS: '-DVERIFY', CTIMETESTS: 'no' }
|
||||
- BUILD: 'distcheck'
|
||||
|
||||
steps:
|
||||
@ -603,13 +604,13 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Homebrew packages
|
||||
env:
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
run: |
|
||||
brew install automake libtool gcc
|
||||
ln -s $(brew --prefix gcc)/bin/gcc-?? /usr/local/bin/gcc
|
||||
|
||||
- name: Install and cache Valgrind
|
||||
uses: ./.github/actions/install-homebrew-valgrind
|
||||
|
||||
- name: CI script
|
||||
env: ${{ matrix.env_vars }}
|
||||
run: ./ci/ci.sh
|
||||
|
Loading…
x
Reference in New Issue
Block a user