cake_wallet/scripts/android/build_monero_all.sh

61 lines
3.1 KiB
Bash
Raw Normal View History

2022-03-31 14:47:40 +00:00
#!/bin/bash
2022-03-30 15:57:04 +00:00
2024-05-01 15:47:11 +00:00
# Usage: env USE_DOCKER= ./build_all.sh
set -x -e
cd "$(dirname "$0")"
NPROC="-j$(nproc)"
if [[ "x$(uname)" == "xDarwin" ]];
then
USE_DOCKER="ON"
NPROC="-j1"
fi
../prepare_moneroc.sh
2024-06-05 07:52:22 +00:00
if [[ ! "x$RUNNER_OS" == "x" ]];
then
REMOVE_CACHES=ON
fi
2024-05-01 15:47:11 +00:00
# NOTE: -j1 is intentional. Otherwise you will run into weird behaviour on macos
if [[ ! "x$USE_DOCKER" == "x" ]];
then
2024-06-08 11:50:26 +00:00
for COIN in monero wownero;
2024-05-01 15:47:11 +00:00
do
pushd ../monero_c
docker run --platform linux/amd64 -v$HOME/.cache/ccache:/root/.ccache -v$PWD:$PWD -w $PWD --rm -it git.mrcyjanek.net/mrcyjanek/debian:buster bash -c "git config --global --add safe.directory '*'; apt update; apt install -y ccache gcc g++ libtinfo5 gperf; ./build_single.sh ${COIN} x86_64-linux-android $NPROC"
# docker run --platform linux/amd64 -v$PWD:$PWD -w $PWD --rm -it git.mrcyjanek.net/mrcyjanek/debian:buster bash -c "git config --global --add safe.directory '*'; apt update; apt install -y ccache gcc g++ libtinfo5 gperf; ./build_single.sh ${COIN} i686-linux-android $NPROC"
2024-06-13 06:02:25 +00:00
docker run --platform linux/amd64 -v$HOME/.cache/ccache:/root/.ccache -v$PWD:$PWD -w $PWD --rm -it git.mrcyjanek.net/mrcyjanek/debian:buster bash -c "git config --global --add safe.directory '*'; apt update; apt install -y ccache gcc g++ libtinfo5 gperf; ./build_single.sh ${COIN} armv7a-linux-androideabi $NPROC"
2024-05-01 15:47:11 +00:00
docker run --platform linux/amd64 -v$HOME/.cache/ccache:/root/.ccache -v$PWD:$PWD -w $PWD --rm -it git.mrcyjanek.net/mrcyjanek/debian:buster bash -c "git config --global --add safe.directory '*'; apt update; apt install -y ccache gcc g++ libtinfo5 gperf; ./build_single.sh ${COIN} aarch64-linux-android $NPROC"
popd
done
else
2024-06-08 11:50:26 +00:00
for COIN in monero wownero;
2024-05-01 15:47:11 +00:00
do
pushd ../monero_c
2024-06-13 12:05:44 +00:00
env -i ./build_single.sh ${COIN} x86_64-linux-android $NPROC
2024-06-08 11:50:26 +00:00
[[ ! "x$REMOVE_CACHES" == "x" ]] && rm -rf ${COIN}/contrib/depends/x86_64-linux-android
2024-05-01 15:47:11 +00:00
# ./build_single.sh ${COIN} i686-linux-android $NPROC
2024-06-08 11:50:26 +00:00
# [[ ! "x$REMOVE_CACHES" == "x" ]] && rm -rf ${COIN}/contrib/depends/i686-linux-android
2024-06-13 12:05:44 +00:00
env -i ./build_single.sh ${COIN} armv7a-linux-androideabi $NPROC
2024-06-13 06:02:25 +00:00
[[ ! "x$REMOVE_CACHES" == "x" ]] && rm -rf ${COIN}/contrib/depends/armv7a-linux-androideabi
2024-06-13 12:05:44 +00:00
env -i ./build_single.sh ${COIN} aarch64-linux-android $NPROC
2024-06-08 11:50:26 +00:00
[[ ! "x$REMOVE_CACHES" == "x" ]] && rm -rf ${COIN}/contrib/depends/aarch64-linux-android
2024-06-05 07:52:22 +00:00
2024-05-01 15:47:11 +00:00
popd
2024-06-08 11:50:26 +00:00
unxz -f ../monero_c/release/${COIN}/x86_64-linux-android_libwallet2_api_c.so.xz
unxz -f ../monero_c/release/${COIN}/x86_64-linux-android_libc++_shared.so.xz
2024-05-01 15:47:11 +00:00
2024-06-13 06:02:25 +00:00
unxz -f ../monero_c/release/${COIN}/armv7a-linux-androideabi_libwallet2_api_c.so.xz
unxz -f ../monero_c/release/${COIN}/armv7a-linux-androideabi_libc++_shared.so.xz
2024-05-13 17:39:11 +00:00
2024-06-08 11:50:26 +00:00
unxz -f ../monero_c/release/${COIN}/aarch64-linux-android_libwallet2_api_c.so.xz
unxz -f ../monero_c/release/${COIN}/aarch64-linux-android_libc++_shared.so.xz
2024-06-10 13:46:54 +00:00
[[ ! "x$REMOVE_CACHES" == "x" ]] && rm -rf ${COIN}/contrib/depends/{built,sources}
2024-06-08 11:50:26 +00:00
done
2024-06-10 13:46:54 +00:00
fi