Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,16 @@ jobs:

- name: Install dependencies
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install python boost@1.85 hidapi openssl zmq libpgm miniupnpc expat libunwind-headers protobuf unbound ccache
HOMEBREW_NO_AUTO_UPDATE=1 brew install python boost@1.85 hidapi openssl@3 zmq libpgm miniupnpc expat libunwind-headers protobuf unbound ccache
brew unlink boost || true
brew link boost@1.85 --force
# brew links openssl@4 into /opt/homebrew, and the -I/opt/homebrew/include of boost and zeromq comes
# before the one of openssl@3, so its headers win over the ones of OPENSSL_ROOT_DIR
brew unlink openssl@4 || true
# brew's openssl is OpenSSL 4 on the newer runner images, which boost 1.85 does not build with.
# monero-project and monero-cpp take brew's openssl unless they are given another one, so
# they get it on the command line, and the module finds it in the environment
echo "OPENSSL_ROOT_DIR=$(brew --prefix openssl@3)" >> "$GITHUB_ENV"
pip3 install pytest pytest-cov setuptools wheel scikit-build-core --break-system-packages

- name: Install pybind11 v2.13.6
Expand All @@ -70,7 +77,11 @@ jobs:
cd external/monero-cpp/external/monero-project
mkdir -p build/release
cd build/release
cmake -DSTATIC=ON -DBUILD_64=ON -DCMAKE_BUILD_TYPE=Release ../../
# monero builds with -march=native unless it is told which cpu to build for, and objects compiled
# on a runner with newer instructions, restored by ccache or shipped in a package, end in an illegal
# instruction on another cpu
ARCH=$([ "$(uname -m)" = x86_64 ] && echo x86-64 || echo armv8-a)
cmake -DSTATIC=ON -DARCH="$ARCH" -DBUILD_64=ON -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR="$OPENSSL_ROOT_DIR" ../../
make -j3 wallet cryptonote_protocol
cd ../../../../../../

Expand All @@ -79,7 +90,7 @@ jobs:
cd external/monero-cpp
mkdir -p build
cd build
cmake .. -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake .. -DOPENSSL_ROOT_DIR="$OPENSSL_ROOT_DIR" -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build .
make -j3
cd ../../../
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ jobs:
cd external/monero-cpp/external/monero-project
mkdir -p build/release
cd build/release
cmake -DSTATIC=ON -DBUILD_64=ON -DCMAKE_BUILD_TYPE=Release ../../
# monero builds with -march=native unless it is told which cpu to build for, and objects compiled
# on a runner with newer instructions, restored by ccache or shipped in a package, end in an illegal
# instruction on another cpu
cmake -DSTATIC=ON -DARCH=x86-64 -DBUILD_64=ON -DCMAKE_BUILD_TYPE=Release ../../
make -j3 wallet cryptonote_protocol
cd ../../../../../../

Expand Down Expand Up @@ -420,9 +423,16 @@ jobs:

- name: Install dependencies
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install python boost@1.85 hidapi openssl zmq libpgm miniupnpc expat libunwind-headers protobuf unbound ccache
HOMEBREW_NO_AUTO_UPDATE=1 brew install python boost@1.85 hidapi openssl@3 zmq libpgm miniupnpc expat libunwind-headers protobuf unbound ccache
brew unlink boost || true
brew link boost@1.85 --force
# brew links openssl@4 into /opt/homebrew, and the -I/opt/homebrew/include of boost and zeromq comes
# before the one of openssl@3, so its headers win over the ones of OPENSSL_ROOT_DIR
brew unlink openssl@4 || true
# brew's openssl is OpenSSL 4 on the newer runner images, which boost 1.85 does not build with.
# monero-project and monero-cpp take brew's openssl unless they are given another one, so
# they get it on the command line, and the module finds it in the environment
echo "OPENSSL_ROOT_DIR=$(brew --prefix openssl@3)" >> "$GITHUB_ENV"
pip3 install pytest pytest-rerunfailures pytest-timeout pytest-cov setuptools wheel scikit-build-core --break-system-packages

- name: Install pybind11 v2.13.6
Expand All @@ -445,7 +455,11 @@ jobs:
cd external/monero-cpp/external/monero-project
mkdir -p build/release
cd build/release
cmake -DSTATIC=ON -DBUILD_64=ON -DCMAKE_BUILD_TYPE=Release ../../
# monero builds with -march=native unless it is told which cpu to build for, and objects compiled
# on a runner with newer instructions, restored by ccache or shipped in a package, end in an illegal
# instruction on another cpu
ARCH=$([ "$(uname -m)" = x86_64 ] && echo x86-64 || echo armv8-a)
cmake -DSTATIC=ON -DARCH="$ARCH" -DBUILD_64=ON -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR="$OPENSSL_ROOT_DIR" ../../
make -j3 wallet cryptonote_protocol
cd ../../../../../../

Expand All @@ -454,7 +468,7 @@ jobs:
cd external/monero-cpp
mkdir -p build
cd build
cmake .. -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake .. -DOPENSSL_ROOT_DIR="$OPENSSL_ROOT_DIR" -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build .
make -j3
cd ../../../
Expand Down
11 changes: 9 additions & 2 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,17 @@ if [[ $(uname -s) == "MINGW64_NT"* || $(uname -s) == "MSYS"* ]]; then
make release-static-win32 -j$HOST_NCORES
fi
else
# OS is not windows
# OS is not windows. monero builds with -march=native unless it is told which cpu to build for, and objects compiled
# on a runner with newer instructions, restored by ccache or shipped in a package, end in an illegal
# instruction on another cpu
case $(uname -m) in
x86_64) MONERO_ARCH="x86-64";;
aarch64|arm64) MONERO_ARCH="armv8-a";;
*) MONERO_ARCH="native";;
esac
mkdir -p build/release &&
cd build/release &&
cmake -DSTATIC=ON -DBUILD_64=ON -DCMAKE_BUILD_TYPE=Release ../../
cmake -DSTATIC=ON -DARCH="$MONERO_ARCH" -DBUILD_64=ON -DCMAKE_BUILD_TYPE=Release ../../
make -j$HOST_NCORES wallet cryptonote_protocol
fi
cd ../../../../
Expand Down
Loading