Skip to content

Commit

Permalink
Merge #2922: [GA] Bump native macOS runner versions
Browse files Browse the repository at this point in the history
454fbfd [GA] Bump native macOS runner versions (Fuzzbawls)

Pull request description:

  A recent 3rd party server outage for the miniupnpc library has caused macOS 11 jobs to fail. While the homebrew package manager for macOS has fixed the issue on their end, GitHub has no clear intention to update their macOS 11 runner image due to macOS 11 runners already being deprecated.

  macOS 11 support will be removed from GA completely on June, 28 2024. Pre-emptively bump the os runner versions we use to macOS 12 and macOS 14 (the latter of which runs on Apple's new CPU architecture).

  Relevant and required build system changes have also been applied to support the new macOS 14 runner environment.

ACKs for top commit: 454fbfd
  panleone:
    utACK 454fbfd
  Liquid369:
    tACK 454fbfd

Tree-SHA512: bb5b1965ae99b9e7eda0d464d07b1d8226a00a0aa27be84b2d7cf18f265ecdd759b5eaeba83316a75376100f8a37bb61fe96048a40746ed71febb3e2505cedd8
  • Loading branch information
Fuzzbawls committed Apr 6, 2024
2 parents f428a74 + 454fbfd commit db78a7e
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 27 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,19 @@ jobs:
cxx: g++

- name: macOS
os: macos-11
packages: llvm@12 python@3.8 autoconf automake berkeley-db@4 libtool boost@1.76 miniupnpc libnatpmp pkg-config libevent qrencode gmp libsodium rust
os: macos-12
packages: llvm@13 python@3.8 autoconf automake berkeley-db@4 libtool boost@1.76 miniupnpc libnatpmp pkg-config libevent qrencode gmp libsodium rust
no_qt: true
boost_root: true
cc: $(brew --prefix llvm@12)/bin/clang
cxx: $(brew --prefix llvm@12)/bin/clang++
cc: $(brew --prefix llvm@13)/bin/clang
cxx: $(brew --prefix llvm@13)/bin/clang++

- name: macOS-latest
os: macos-latest
packages: llvm@13 python@3.8 autoconf automake berkeley-db@4 libtool boost@1.76 miniupnpc libnatpmp pkg-config qt@5 zmq libevent qrencode gmp libsodium rust
os: macos-14
packages: llvm@14 python@3.8 autoconf automake berkeley-db@4 libtool boost@1.76 miniupnpc libnatpmp pkg-config qt@5 zmq libevent qrencode gmp libsodium rust
boost_root: true
cc: $(brew --prefix llvm@13)/bin/clang
cxx: $(brew --prefix llvm@13)/bin/clang++
cc: $(brew --prefix llvm@14)/bin/clang
cxx: $(brew --prefix llvm@14)/bin/clang++

steps:
- name: Get Source
Expand All @@ -115,11 +115,6 @@ jobs:
fi
if [[ ${{ matrix.config.os }} = macos* ]]; then
brew install "$APT_BASE" ${{ matrix.config.packages }}
# GA's macOS 11 image is inconsistent as to if it includes a pre-installed version of boost. Force linking
# to the specified version (1.76), which will overwrite the symlinks to a pre-existing version if it exists.
if [ "${{ matrix.config.os }}" = "macos-11" ]; then
brew link --overwrite -f boost@1.76
fi
fi
- name: ccache cache files
Expand All @@ -139,8 +134,13 @@ jobs:
fi
if [ "${{ matrix.config.boost_root }}" = "true" ]; then
export CI_BOOST=1
export CPPFLAGS="-I/usr/local/opt/boost@1.76/include"
export LDFLAGS="-L/usr/local/opt/boost@1.76/lib"
if [ "${{ matrix.config.os }}" = "macos-14" ]; then
export LDFLAGS="-L/opt/homebrew/opt/boost@1.76/lib"
export CPPFLAGS="-I/opt/homebrew/opt/boost@1.76/include"
else
export CPPFLAGS="-I/usr/local/opt/boost@1.76/include"
export LDFLAGS="-L/usr/local/opt/boost@1.76/lib"
fi
fi
fi
export CC
Expand Down Expand Up @@ -188,7 +188,7 @@ jobs:

- name: x64-macOS
id: macOS-nodepends
os: macos-11
os: macos-12
brew_install: autoconf automake ccache berkeley-db@4 libtool boost@1.76 miniupnpc libnatpmp pkg-config python@3.8 libevent qrencode gmp libsodium rust librsvg
unit_tests: true
functional_tests: true
Expand All @@ -198,14 +198,14 @@ jobs:

- name: x64-macOS-latest
id: macOS-nodepends-latest
os: macos-latest
os: macos-14
brew_install: autoconf automake ccache berkeley-db@4 libtool boost@1.76 miniupnpc libnatpmp pkg-config python@3.8 qt@5 zmq libevent qrencode gmp libsodium rust librsvg
unit_tests: true
functional_tests: true
goal: deploy
cc: clang
cxx: clang++
BITCOIN_CONFIG: "--enable-zmq --enable-gui --enable-reduce-exports --enable-werror --enable-debug --with-boost=/usr/local/opt/boost@1.76"
BITCOIN_CONFIG: "--enable-zmq --enable-gui --enable-reduce-exports --enable-werror --enable-debug --with-boost=/opt/homebrew/opt/boost@1.76"

steps:
- name: Get Source
Expand Down
18 changes: 11 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
else()
set(BerkeleyDB_ROOT_DIR "/usr/local/Cellar/berkeley-db@4/${BDB_VER}/" )
endif()
# Github Actions specific Boost override (macOS only)
if(DEFINED ENV{CI_BOOST})
if(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "arm")
set(BOOST_R "--with-boost=/opt/homebrew/opt/boost@1.76")
set(ENV{BOOSTROOT} "/opt/homebrew/opt/boost@1.76")
else()
set(BOOST_R "--with-boost=/usr/local/opt/boost@1.76")
set(ENV{BOOSTROOT} "/usr/local/opt/boost@1.76")
endif()
message(STATUS "Boost Root set to: ${BOOST_R}")
endif()
set(Boost_USE_MULTITHREADED ON)
set(Boost_NO_BOOST_CMAKE ON)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
Expand Down Expand Up @@ -74,13 +85,6 @@ if(DEFINED ENV{NO_QT})
message(STATUS "Skipping GUI Wallet Build!")
endif()

# Github Actions specific Boost override
if(DEFINED ENV{CI_BOOST})
set(BOOST_R "--with-boost=/usr/local/opt/boost@1.76")
set(ENV{BOOSTROOT} "/usr/local/opt/boost@1.76")
message(STATUS "Boost Root set to: ${BOOST_R}")
endif()

# Find Dependencies
find_package(BerkeleyDB ${BDB_VER} REQUIRED)
if(BerkeleyDB_FOUND)
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1544,6 +1544,7 @@ AC_SUBST(NATPMP_CPPFLAGS)
AC_SUBST(NATPMP_LIBS)
AC_SUBST(EVENT_LIBS)
AC_SUBST(EVENT_PTHREADS_LIBS)
AC_SUBST(SODIUM_CFLAGS)
AC_SUBST(SODIUM_LIBS)
AC_SUBST(ZMQ_LIBS)
AC_SUBST(LIBZCASH_LIBS)
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DIST_SUBDIRS = secp256k1 univalue chiabls

AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS) $(GPROF_LDFLAGS) $(SANITIZER_LDFLAGS)
AM_CXXFLAGS = $(DEBUG_CXXFLAGS) $(HARDENED_CXXFLAGS) $(WARN_CXXFLAGS) $(NOWARN_CXXFLAGS) $(ERROR_CXXFLAGS) $(GPROF_CXXFLAGS) $(SANITIZER_CXXFLAGS)
AM_CPPFLAGS = $(DEBUG_CPPFLAGS) $(HARDENED_CPPFLAGS)
AM_CPPFLAGS = $(DEBUG_CPPFLAGS) $(HARDENED_CPPFLAGS) $(SODIUM_CFLAGS)
AM_LIBTOOLFLAGS = --preserve-dup-deps
EXTRA_LIBRARIES =

Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.test.include
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ SAPLING_TESTS +=\
endif

test_test_pivx_SOURCES = $(BITCOIN_TEST_SUITE) $(BITCOIN_TESTS) $(SAPLING_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
test_test_pivx_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS) $(EVENT_FLAGS)
test_test_pivx_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS) $(EVENT_CFLAGS)
test_test_pivx_LDADD =

if ENABLE_WALLET
Expand Down

0 comments on commit db78a7e

Please sign in to comment.