Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build M1 binaries using Codemagic #277

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ endif()
include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external)

if(APPLE)
include_directories(SYSTEM /usr/include/malloc)
include_directories(SYSTEM /usr/include/malloc /opt/homebrew/include)
if(POLICY CMP0042)
cmake_policy(SET CMP0042 NEW)
endif()
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ release-all:

release-static:
mkdir -p $(builddir)/release
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release $(topdir) && $(MAKE)
cd $(builddir)/release && cmake -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release $(topdir) && $(MAKE)

coverage:
mkdir -p $(builddir)/debug
Expand Down
46 changes: 46 additions & 0 deletions codemagic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
workflows:
build:
name: Build workflow
triggering:
events:
- tag
branch_patterns:
- pattern: '*'
include: true
source: true
environment:
groups:
- github
scripts:
- name: install dependencies
script: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost openssl zmq libpgm miniupnpc ldns expat libunwind-headers protobuf
- name: fetch zmq.hpp
script: brew tap osrf/simulation && brew install cppzmq
- name: build
script: USE_SINGLE_BUILDDIR=1 make release-static -j3
- name: archive
working_directory: build/release
script: |
export ARTIFACT_NAME="aeon-mac-armv8-$(git describe --tags)"
mkdir $ARTIFACT_NAME
cp bin/* $ARTIFACT_NAME
tar cvzf $ARTIFACT_NAME.tar.bz2 $ARTIFACT_NAME
- name: SHA256 checksum
working_directory: build/release
script: |
export ARTIFACT_NAME="aeon-mac-armv8-$(git describe --tags)"
openssl sha256 $ARTIFACT_NAME.tar.bz2
- name: upload to transfer.sh
script: |
export ARTIFACT_NAME="aeon-mac-armv8-$(git describe --tags)"
curl --upload-file build/release/$ARTIFACT_NAME.tar.bz2 https://transfer.sh/$ARTIFACT_NAME.tar.bz2
- name: Publish to GitHub
script: |
#!/usr/bin/env zsh
# Publish only for tag builds
if [ -z ${CM_TAG} ]; then
echo "Not a tag build, will not publish GitHub release"
exit 0
fi
export ARTIFACT_NAME="aeon-mac-armv8-$(git describe --tags)"
gh release upload "${CM_TAG}" build/release/$ARTIFACT_NAME.tar.bz2
6 changes: 6 additions & 0 deletions src/crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,10 @@ if (ANDROID OR IOS)
endif()
endif()

# M1 Mac seems to behave oddly
if (APPLE AND ARM)
add_definitions(-DNO_AES)
add_definitions(-DFORCE_USE_HEAP)
endif()