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
|
|
|
|
for COIN in monero;
|
|
|
|
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"
|
|
|
|
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} arm-linux-androideabi $NPROC"
|
|
|
|
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
|
|
|
|
for COIN in monero;
|
|
|
|
do
|
|
|
|
pushd ../monero_c
|
|
|
|
./build_single.sh ${COIN} x86_64-linux-android $NPROC
|
2024-06-05 07:52:22 +00:00
|
|
|
[[ ! "x$REMOVE_CACHES" == "x" ]] && rm -rf monero/contrib/depends/x86_64-linux-android
|
2024-05-01 15:47:11 +00:00
|
|
|
# ./build_single.sh ${COIN} i686-linux-android $NPROC
|
2024-06-05 07:52:22 +00:00
|
|
|
# [[ ! "x$REMOVE_CACHES" == "x" ]] && rm -rf monero/contrib/depends/i686-linux-android
|
2024-05-01 15:47:11 +00:00
|
|
|
./build_single.sh ${COIN} arm-linux-androideabi $NPROC
|
2024-06-05 07:52:22 +00:00
|
|
|
[[ ! "x$REMOVE_CACHES" == "x" ]] && rm -rf monero/contrib/depends/arm-linux-androideabi
|
2024-05-01 15:47:11 +00:00
|
|
|
./build_single.sh ${COIN} aarch64-linux-android $NPROC
|
2024-06-05 07:52:22 +00:00
|
|
|
[[ ! "x$REMOVE_CACHES" == "x" ]] && rm -rf monero/contrib/depends/aarch64-linux-android
|
|
|
|
|
2024-05-01 15:47:11 +00:00
|
|
|
popd
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2024-06-05 11:57:47 +00:00
|
|
|
[[ ! "x$REMOVE_CACHES" == "x" ]] && rm -rf monero/contrib/depends/built
|
|
|
|
[[ ! "x$REMOVE_CACHES" == "x" ]] && rm -rf monero/contrib/depends/sources
|
|
|
|
|
2024-05-01 15:47:11 +00:00
|
|
|
unxz -f ../monero_c/release/monero/x86_64-linux-android_libwallet2_api_c.so.xz
|
2024-05-14 05:43:32 +00:00
|
|
|
unxz -f ../monero_c/release/monero/x86_64-linux-android_libc++_shared.so.xz
|
2024-05-13 17:39:11 +00:00
|
|
|
|
2024-05-01 15:47:11 +00:00
|
|
|
unxz -f ../monero_c/release/monero/arm-linux-androideabi_libwallet2_api_c.so.xz
|
2024-05-14 05:43:32 +00:00
|
|
|
unxz -f ../monero_c/release/monero/arm-linux-androideabi_libc++_shared.so.xz
|
2024-05-13 17:39:11 +00:00
|
|
|
|
2024-05-01 15:47:11 +00:00
|
|
|
unxz -f ../monero_c/release/monero/aarch64-linux-android_libwallet2_api_c.so.xz
|
2024-05-14 05:43:32 +00:00
|
|
|
unxz -f ../monero_c/release/monero/aarch64-linux-android_libc++_shared.so.xz
|