Skip to content

Commit

Permalink
macos compat
Browse files Browse the repository at this point in the history
android fixes
  • Loading branch information
MrCyjaneK committed May 23, 2024
1 parent f9a6c90 commit 54ed596
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 16 deletions.
44 changes: 42 additions & 2 deletions .github/workflows/compat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,48 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
with:
files: release/gh/*
darwin:
runs-on: ubuntu-latest
container:
image: debian:bookworm
steps:
- name: Install dependencies
run: |
apt update
apt install -y build-essential pkg-config autoconf libtool ccache make cmake gcc g++ git curl lbzip2 libtinfo5 gperf gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-i686-linux-gnu g++-i686-linux-gnu
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Patch sources
run: |
git config --global --add safe.directory '*'
git config --global user.email "[email protected]"
git config --global user.name "CI mrcyjanek.net"
./apply_patches.sh monero
./apply_patches.sh wownero
- name: monero/x86_64-apple-darwin11
run: ./build_single.sh monero x86_64-apple-darwin11 -j$(nproc)
- name: wownero/x86_64-apple-darwin11
run: ./build_single.sh wownero x86_64-apple-darwin11 -j$(nproc)
- name: monero/aarch64-apple-darwin11
run: ./build_single.sh monero aarch64-apple-darwin11 -j$(nproc)
- name: wownero/aarch64-apple-darwin11
run: ./build_single.sh wownero aarch64-apple-darwin11 -j$(nproc)
- name: rename artifacts
run: |
mkdir release/gh/
for i in release/monero/*
do
mv "$i" "release/gh/monero_$(basename $i)"
done
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: release/gh/*
macos-host:
runs-on: macos-13
runs-on: macos-14
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
Expand All @@ -140,7 +180,7 @@ jobs:
uses: Homebrew/actions/setup-homebrew@master
- name: Install brew dependencies
run: |
brew install unbound [email protected] zmq
brew install git unbound [email protected] zmq
brew link [email protected]
- uses: actions/checkout@v4
with:
Expand Down
8 changes: 4 additions & 4 deletions build_single.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ case "$HOST_ABI" in
export PATH="$WDIR/$repo/contrib/depends/${HOST_ABI}/native/bin/:$PATH"
if [[ "$repo" == "wownero" ]];
then
export CC=aarch64-linux-android-clang
export CXX=aarch64-linux-android-clang++
export CC=arm-linux-androideabi-clang
export CXX=arm-linux-androideabi-clang++
else
export CC=aarch64-linux-android21-clang
export CXX=aarch64-linux-android21-clang++
export CC=armv7a-linux-androideabi21-clang
export CXX=armv7a-linux-androideabi21-clang++
fi
;;
"i686-w64-mingw32")
Expand Down
27 changes: 17 additions & 10 deletions patches/monero/0013-android-ndk-version-bump.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From 29bdcc2760da4e26ca4320394560e4fdf1d3736f Mon Sep 17 00:00:00 2001
From 5815bf9d5dd2420915fafb73a3314eb467a489a7 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <[email protected]>
Date: Thu, 23 May 2024 08:02:49 +0200
Subject: [PATCH] android ndk version bump

---
contrib/depends/hosts/android.mk | 16 +++++++++++++---
contrib/depends/packages/android_ndk.mk | 12 +++++++-----
contrib/depends/packages/android_ndk.mk | 20 ++++++++++++++------
contrib/depends/packages/boost.mk | 1 +
contrib/depends/toolchain.cmake.in | 11 ++++++-----
4 files changed, 27 insertions(+), 13 deletions(-)
4 files changed, 34 insertions(+), 14 deletions(-)

diff --git a/contrib/depends/hosts/android.mk b/contrib/depends/hosts/android.mk
index d6f8b99dd..e1c99aef3 100644
Expand Down Expand Up @@ -41,10 +41,10 @@ index d6f8b99dd..e1c99aef3 100644
android_CFLAGS=-pipe
android_CXXFLAGS=$(android_CFLAGS)
diff --git a/contrib/depends/packages/android_ndk.mk b/contrib/depends/packages/android_ndk.mk
index 5deff76c7..e5a433a38 100644
index 5deff76c7..1ad250653 100644
--- a/contrib/depends/packages/android_ndk.mk
+++ b/contrib/depends/packages/android_ndk.mk
@@ -1,8 +1,8 @@
@@ -1,8 +1,10 @@
package=android_ndk
-$(package)_version=17b
+$(package)_version=26d
Expand All @@ -53,20 +53,27 @@ index 5deff76c7..e5a433a38 100644
-$(package)_sha256_hash=5dfbbdc2d3ba859fed90d0e978af87c71a91a5be1f6e1c40ba697503d48ccecd
+$(package)_file_name=android-ndk-r$($(package)_version)-linux.zip
+$(package)_sha256_hash=eefeafe7ccf177de7cc57158da585e7af119bb7504a63604ad719e4b2a328b54
+
+$(package)_version_apiversion=21

define $(package)_set_vars
$(package)_config_opts_arm=--arch arm
@@ -17,8 +17,10 @@ define $(package)_extract_cmds
@@ -17,8 +19,14 @@ define $(package)_extract_cmds
endef

define $(package)_stage_cmds
+ mkdir -p $(build_prefix) &&\
+ echo $(build_prefix)/toolchain && \
android-ndk-r$($(package)_version)/build/tools/make_standalone_toolchain.py --api 21 \
- android-ndk-r$($(package)_version)/build/tools/make_standalone_toolchain.py --api 21 \
- --install-dir $(build_prefix) --stl=libc++ $($(package)_config_opts) &&\
- mv $(build_prefix) $($(package)_staging_dir)/$(host_prefix)
+ mkdir -p $(build_prefix) &&\
+ echo $(build_prefix)/toolchain && \
+ android-ndk-r$($(package)_version)/build/tools/make_standalone_toolchain.py --api $($(package)_version_apiversion) \
+ --install-dir $(build_prefix)/toolchain --stl=libc++ $($(package)_config_opts) &&\
+ mv $(build_prefix)/toolchain $($(package)_staging_dir)/$(host_prefix)/native
+ mv $(build_prefix)/toolchain $($(package)_staging_dir)/$(host_prefix)/native && \
+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ar $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)$($(package)_version_apiversion)-ar &&\
+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ranlib $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)$($(package)_version_apiversion)-ranlib &&\
+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ar $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)-ar &&\
+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ranlib $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)-ranlib
endef

diff --git a/contrib/depends/packages/boost.mk b/contrib/depends/packages/boost.mk
Expand Down

0 comments on commit 54ed596

Please sign in to comment.