name: Android Release run-name: Building monero_c for android on: push: tags: - '*' # cat envs.txt | sed 's/ //g' | sed 's/: /=/g' | grep -v '#' > .env # export $(cat .env | xargs) env: WORKDIR: /opt/android ANDROID_SDK_ROOT: /opt/android/tools ANDROID_NDK_ROOT: /opt/android/android-ndk-r17c PREFIX: /opt/android/prefix TOOLCHAIN_DIR: /opt/android/toolchain NPROC: 4 CLEAN_PATH: /usr/cmake-3.14.6-Linux-x86_64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PATH: /usr/cmake-3.14.6-Linux-x86_64/bin:/opt/android/toolchain/${{ matrix.host_triplet }}/bin:/opt/android/toolchain/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin # CMake CMAKE_VERSION: '3.14.6' CMAKE_HASH: '82e08e50ba921035efa82b859c74c5fbe27d3e49a4003020e3c77618a4e912cd' # Boost BOOST_VERSION: '1_70_0' BOOST_VERSION_DOT: '1.70.0' BOOST_HASH: '430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778' # iconv ICONV_VERSION: '1.16' ICONV_HASH: 'e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04' # zlib ZLIB_VERSION: '1.3' ZLIB_HASH: 'ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e' # OpenSSL OPENSSL_VERSION: '3.0.5' OPENSSL_HASH: 'aa7d8d9bef71ad6525c55ba11e5f4397889ce49c2c9349dcea6d3e4f0b024a7a' # ZMQ ZMQ_VERSION: 'v4.3.2' ZMQ_HASH: 'a84ffa12b2eb3569ced199660bac5ad128bff1f0' # libsodium SODIUM_VERSION: '1.0.18' SODIUM_HASH: '4f5e89fa84ce1d178a6765b8b46f2b6f91216677' # libexpat LIBEXPAT_VERSION: 'R_2_4_8' LIBEXPAT_HASH: '3bab6c09bbe8bf42d84b81563ddbcf4cca4be838' # libunbound LIBUNBOUND_VERSION: 'branch-1.16.1' LIBUNBOUND_HASH: '903538c76e1d8eb30d0814bb55c3ef1ea28164e8' # polyseed POLYSEED_HASH: 'b7c35bb3c6b91e481ecb04fc235eaff69c507fa1' # utf8proc UTF8PROC_HASH: '1cb28a66ca79a0845e99433fd1056257456cef8b' # (finally) monero MONERO_GIT_SOURCE_SIMPLE: 'github.com_monero-project_monero' MONERO_GIT_SOURCE: https://github.com/monero-project/monero MONERO_TAG: 'v0.18.3.1' jobs: build-android: strategy: matrix: include: - short_arch: arm64 full_arch: arm64-v8a monero_arch: armv8-a monero_buildtag: android-armv8 monero_build64: 'ON' monero_cmake_arm_mode: 'OFF' host_triplet: aarch64-linux-android - short_arch: arm full_arch: armeabi-v7a monero_arch: armv7-a monero_buildtag: android-armv7 monero_build64: 'OFF' monero_cmake_arm_mode: 'ON' host_triplet: arm-linux-androideabi - short_arch: x86_64 full_arch: x86_64 monero_arch: x86-64 monero_buildtag: android-x86_64 monero_build64: 'ON' monero_cmake_arm_mode: 'OFF' host_triplet: x86_64-linux-android - short_arch: x86 full_arch: x86 monero_arch: i686 monero_buildtag: android-x86 monero_build64: 'OFF' monero_cmake_arm_mode: 'OFF' host_triplet: i686-linux-android runs-on: androidndk-r17c steps: - name: Checkout repository code uses: actions/checkout@v3 # - name: Download cached build artifacts # run: | # ${{ github.workspace }}/download_artifact.sh libsodium "${SODIUM_VERSION}-${{ matrix.host_triplet }}-${SODIUM_HASH}" ${{ github.workspace }}/prefix/lib/libsodium.a # ${{ github.workspace }}/download_artifact.sh openssl "${OPENSSL_VERSION}-${{ matrix.host_triplet }}-${OPENSSL_HASH}" ${{ github.workspace }}/prefix/lib/libcrypto.a # ${{ github.workspace }}/download_artifact.sh openssl "${OPENSSL_VERSION}-${{ matrix.host_triplet }}-${OPENSSL_HASH}" ${{ github.workspace }}/prefix/lib/libssl.a # ${{ github.workspace }}/download_artifact.sh boost "${BOOST_VERSION_DOT}-${{ matrix.host_triplet }}-${BOOST_HASH}" ${{ github.workspace }}/prefix/lib/libboost_chrono.a # ${{ github.workspace }}/download_artifact.sh boost "${BOOST_VERSION_DOT}-${{ matrix.host_triplet }}-${BOOST_HASH}" ${{ github.workspace }}/prefix/lib/libboost_date_time.a # ${{ github.workspace }}/download_artifact.sh boost "${BOOST_VERSION_DOT}-${{ matrix.host_triplet }}-${BOOST_HASH}" ${{ github.workspace }}/prefix/lib/libboost_filesystem.a # ${{ github.workspace }}/download_artifact.sh boost "${BOOST_VERSION_DOT}-${{ matrix.host_triplet }}-${BOOST_HASH}" ${{ github.workspace }}/prefix/lib/libboost_program_options.a # ${{ github.workspace }}/download_artifact.sh boost "${BOOST_VERSION_DOT}-${{ matrix.host_triplet }}-${BOOST_HASH}" ${{ github.workspace }}/prefix/lib/libboost_regex.a # ${{ github.workspace }}/download_artifact.sh boost "${BOOST_VERSION_DOT}-${{ matrix.host_triplet }}-${BOOST_HASH}" ${{ github.workspace }}/prefix/lib/libboost_serialization.a # ${{ github.workspace }}/download_artifact.sh boost "${BOOST_VERSION_DOT}-${{ matrix.host_triplet }}-${BOOST_HASH}" ${{ github.workspace }}/prefix/lib/libboost_system.a # ${{ github.workspace }}/download_artifact.sh boost "${BOOST_VERSION_DOT}-${{ matrix.host_triplet }}-${BOOST_HASH}" ${{ github.workspace }}/prefix/lib/libboost_thread.a # ${{ github.workspace }}/download_artifact.sh boost "${BOOST_VERSION_DOT}-${{ matrix.host_triplet }}-${BOOST_HASH}" ${{ github.workspace }}/prefix/lib/libboost_wserialization.a # ${{ github.workspace }}/download_artifact.sh libunbound "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/prefix/lib/libunbound.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/lib/libwallet_api.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/lib/libwallet.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/cryptonote_core/libcryptonote_core.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/cryptonote_basic/libcryptonote_basic.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/mnemonics/libmnemonics.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/common/libcommon.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/crypto/libcncrypto.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/ringct/libringct.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/ringct/libringct_basic.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/blockchain_db/libblockchain_db.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/external/db_drivers/liblmdb/liblmdb.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/external/easylogging++/libeasylogging.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/contrib/epee/src/libepee.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/blocks/libblocks.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/checkpoints/libcheckpoints.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/device/libdevice.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/device_trezor/libdevice_trezor.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/multisig/libmultisig.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/libversion.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/net/libnet.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/hardforks/libhardforks.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/external/randomx/librandomx.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/rpc/librpc_base.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/crypto/wallet/libwallet-crypto.a # ${{ github.workspace }}/download_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/cryptonote_basic/libcryptonote_format_utils_basic.a # - name: Create skip flag based on cache # run: | # if [[ -f "${{ github.workspace }}/prefix/lib/libsodium.a" ]] \ # && [[ -f "${{ github.workspace }}/prefix/lib/libcrypto.a" ]] \ # && [[ -f "${{ github.workspace }}/prefix/lib/libssl.a" ]] \ # && [[ -f "${{ github.workspace }}/prefix/lib/libboost_chrono.a" ]] \ # && [[ -f "${{ github.workspace }}/prefix/lib/libboost_date_time.a" ]] \ # && [[ -f "${{ github.workspace }}/prefix/lib/libboost_filesystem.a" ]] \ # && [[ -f "${{ github.workspace }}/prefix/lib/libboost_program_options.a" ]] \ # && [[ -f "${{ github.workspace }}/prefix/lib/libboost_regex.a" ]] \ # && [[ -f "${{ github.workspace }}/prefix/lib/libboost_serialization.a" ]] \ # && [[ -f "${{ github.workspace }}/prefix/lib/libboost_system.a" ]] \ # && [[ -f "${{ github.workspace }}/prefix/lib/libboost_thread.a" ]] \ # && [[ -f "${{ github.workspace }}/prefix/lib/libboost_wserialization.a" ]] \ # && [[ -f "${{ github.workspace }}/prefix/lib/libunbound.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/lib/libwallet_api.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/lib/libwallet.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/src/cryptonote_core/libcryptonote_core.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/src/cryptonote_basic/libcryptonote_basic.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/src/mnemonics/libmnemonics.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/src/common/libcommon.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/src/crypto/libcncrypto.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/src/ringct/libringct.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/src/ringct/libringct_basic.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/src/blockchain_db/libblockchain_db.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/external/db_drivers/liblmdb/liblmdb.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/external/easylogging++/libeasylogging.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/contrib/epee/src/libepee.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/src/blocks/libblocks.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/src/checkpoints/libcheckpoints.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/src/device/libdevice.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/src/device_trezor/libdevice_trezor.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/src/multisig/libmultisig.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/src/libversion.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/src/net/libnet.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/src/hardforks/libhardforks.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/external/randomx/librandomx.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/src/rpc/librpc_base.a" ]] \ # && [[ -f "${{ github.workspace }}/monero/build/release/src/cryptonote_basic/libcryptonote_format_utils_basic.a" ]]; \ # then \ # echo "Cache exist, creating /tmp/skip_deps"; \ # touch /tmp/skip_deps; \ # else \ # echo "Cache missing, this will be a looooong build."; \ # fi - name: Download monero run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && rm -rf monero && git clone ${MONERO_GIT_SOURCE} --depth=1 --branch ${MONERO_TAG} monero \ && cd monero \ && git submodule init && git submodule update - name: Install CMake run: | cd ${{ github.workspace }} \ && cd /usr \ && curl -L -O https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz \ && echo "${CMAKE_HASH} cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz" | sha256sum -c \ && tar -xzf /usr/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz \ && rm -f /usr/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz - name: Download Boost run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && curl -L -o boost_${BOOST_VERSION}.tar.bz2 https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.bz2 \ && echo "${BOOST_HASH} boost_${BOOST_VERSION}.tar.bz2" | sha256sum -c \ && tar -xf boost_${BOOST_VERSION}.tar.bz2 \ && rm -f boost_${BOOST_VERSION}.tar.bz2 - name: Download iconv run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && curl -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz \ && echo "${ICONV_HASH} libiconv-${ICONV_VERSION}.tar.gz" | sha256sum -c \ && tar -xzf libiconv-${ICONV_VERSION}.tar.gz \ && rm -f libiconv-${ICONV_VERSION}.tar.gz - name: Download zlib run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && curl -O https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \ && echo "${ZLIB_HASH} zlib-${ZLIB_VERSION}.tar.gz" | sha256sum -c \ && tar -xzf zlib-${ZLIB_VERSION}.tar.gz \ && rm zlib-${ZLIB_VERSION}.tar.gz \ && mv zlib-${ZLIB_VERSION} zlib - name: Download OpenSSL run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && curl -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \ && echo "${OPENSSL_HASH} openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c \ && tar -xzf openssl-${OPENSSL_VERSION}.tar.gz \ && rm openssl-${OPENSSL_VERSION}.tar.gz - name: Download ZMQ run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} --depth=1 \ && cd libzmq \ && test `git rev-parse HEAD` = ${ZMQ_HASH} || exit 1 - name: Download libsodium run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && git clone https://github.com/jedisct1/libsodium.git -b ${SODIUM_VERSION} --depth=1 \ && cd libsodium \ && test `git rev-parse HEAD` = ${SODIUM_HASH} || exit 1 - name: Download libexpat run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && git clone https://github.com/libexpat/libexpat.git -b ${LIBEXPAT_VERSION} --depth=1 \ && cd libexpat/expat \ && test `git rev-parse HEAD` = ${LIBEXPAT_HASH} || exit 1 \ - name: Download libunbound run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && git clone https://github.com/NLnetLabs/unbound.git -b ${LIBUNBOUND_VERSION} --depth=1 \ && cd unbound \ && test `git rev-parse HEAD` = ${LIBUNBOUND_HASH} || exit 1 - name: Download polyseed run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && git clone https://github.com/tevador/polyseed.git \ && cd polyseed \ && git reset --hard ${POLYSEED_HASH} - name: Download utf8proc run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && git clone https://github.com/JuliaStrings/utf8proc -b v2.8.0 --depth=1 \ && cd utf8proc \ && git reset --hard ${UTF8PROC_HASH} - name: Make standalone toolchain run: | cd ${{ github.workspace }} \ && ${ANDROID_NDK_ROOT}/build/tools/make_standalone_toolchain.py --arch ${{ matrix.short_arch }} --api 21 --install-dir ${TOOLCHAIN_DIR} --stl=libc++ - name: Build boost (1/2) run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && cd boost_${BOOST_VERSION} \ && PATH=$CLEAN_PATH ./bootstrap.sh --prefix=${PREFIX} # iconv: libtool: warning: remember to run 'libtool --finish /opt/android/prefix/lib' # TODO(mrcyjanek): x86_64-linux-gnu <- get this dynamically. - name: Build iconv (for boost) run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && cd libiconv-${ICONV_VERSION} \ && CC=clang CXX=clang++ ./configure --build=x86_64-linux-gnu --host=${{ matrix.host_triplet }} --prefix=${PREFIX} --disable-rpath \ && make -j${NPROC} \ && make install - name: Build boost (2/2) run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && cd boost_${BOOST_VERSION} \ && ./b2 --build-type=minimal link=static runtime-link=static --with-chrono --with-date_time --with-filesystem --with-program_options --with-regex --with-serialization --with-system --with-thread --with-locale --build-dir=android --stagedir=android toolset=clang threading=multi threadapi=pthread target-os=android -sICONV_PATH=${PREFIX} install -j${NPROC} &>/tmp/boost_log.txt || cat /tmp/boost_log.txt - name: Build zlib run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && cd zlib \ && CC=clang CXX=clang++ ./configure --static \ && make -j${NPROC} - name: Build OpenSSL run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && cd openssl-${OPENSSL_VERSION} \ && export PATH=${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH \ && ./Configure android-${{ matrix.short_arch }} -D__ANDROID_API__=21 -static no-shared no-tests --with-zlib-include=${WORKDIR}/zlib/include --with-zlib-lib=${WORKDIR}/zlib/lib --prefix=${PREFIX} --openssldir=${PREFIX} \ && make -j${NPROC} &>/tmp/openssl_log.txt || cat /tmp/openssl_log.txt \ && make install_sw &>/tmp/openssl_log_2.txt || cat /tmp/openssl_log_2.txt - name: Build ZMQ run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && cd libzmq \ && ./autogen.sh \ && CC=clang CXX=clang++ ./configure --prefix=${PREFIX} --host=${{ matrix.host_triplet }} --enable-static --disable-shared \ && make -j${NPROC} \ && make install - name: Build Sodium run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && cd libsodium \ && ./autogen.sh \ && CC=clang CXX=clang++ ./configure --prefix=${PREFIX} --host=${{ matrix.host_triplet }} --enable-static --disable-shared \ && make -j${NPROC} \ && make install - name: Build libexpat run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && cd libexpat/expat \ && ./buildconf.sh \ && CC=clang CXX=clang++ ./configure --prefix=${PREFIX} --host=${{ matrix.host_triplet }} --enable-static --disable-shared \ && make -j${NPROC} \ && make install - name: Build libunbound run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && cd unbound \ && CC=clang CXX=clang++ ./configure --prefix=${PREFIX} --host=${{ matrix.host_triplet }} --enable-static --disable-shared --disable-flto --with-ssl=${PREFIX} --with-libexpat=${PREFIX} \ && make -j${NPROC} \ && make install - name: Build polyseed run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && cd polyseed \ && CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} . \ && make -j${NPROC} \ && make install - name: Build utf8proc run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && cd utf8proc \ && mkdir build \ && cd build \ && rm -rf ../CMakeCache.txt ../CMakeFiles/ \ && CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} .. \ && make -j${NPROC} \ && make install - name: Build monero (1/2) configure run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && cd monero \ && export CMAKE_INCLUDE_PATH="${PREFIX}/include" \ CMAKE_LIBRARY_PATH="${PREFIX}/lib" \ ANDROID_STANDALONE_TOOLCHAIN_PATH=${TOOLCHAIN_DIR} \ USE_SINGLE_BUILDDIR=1 \ PATH=${CLEAN_PATH} \ && mkdir -p build/release \ && cd build/release \ && if [[ "x${{ matrix.monero_cmake_arm_mode }}" == "xON" ]]; then echo xON \ && env CC=clang CXX=clang++ cmake -D USE_DEVICE_TREZOR=OFF -D BUILD_GUI_DEPS=1 -D BUILD_TESTS=OFF -D ARCH="${{ matrix.monero_arch }}" -D STATIC=ON -D BUILD_64="${{ matrix.monero_build64 }}" -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D BUILD_TAG="${{ matrix.monero_buildtag }}" -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARM_MODE="ON" -D CMAKE_ANDROID_ARCH_ABI="${{ matrix.full_arch }}" ../.. ; else echo xONelse \ && env CC=clang CXX=clang++ cmake -D USE_DEVICE_TREZOR=OFF -D BUILD_GUI_DEPS=1 -D BUILD_TESTS=OFF -D ARCH="${{ matrix.monero_arch }}" -D STATIC=ON -D BUILD_64="${{ matrix.monero_build64 }}" -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D BUILD_TAG="${{ matrix.monero_buildtag }}" -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARCH_ABI="${{ matrix.full_arch }}" ../.. ; fi - name: Build monero (2/2) build run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && cd monero \ && cd build/release \ && export CMAKE_INCLUDE_PATH="${PREFIX}/include" \ && export CMAKE_LIBRARY_PATH="${PREFIX}/lib" \ && export ANDROID_STANDALONE_TOOLCHAIN_PATH=${TOOLCHAIN_DIR} \ && export USE_SINGLE_BUILDDIR=1 \ && export PATH=${CLEAN_PATH} \ && make wallet_api -j${NPROC} - name: Copy prefix from $PREFIX to local run: | [[ -f "/tmp/skip_deps" ]] && exit 0; \ cd ${{ github.workspace }} \ && cp -a /opt/android/prefix ${{ github.workspace }}/prefix - name: Build libbridge (1/2) configure run: | cd ${{ github.workspace }} \ && cd libbridge \ && mkdir build \ && cd build \ && env CC=clang CXX=clang++ cmake -DANDROID_ABI=${{ matrix.full_arch }} .. \ && make -j${NPROC} - name: Build libbridge (2/2) make run: | cd ${{ github.workspace }} \ && cd libbridge \ && cd build \ && make -j${NPROC} - name: Rename libwallet2_api_c.so run: | cd ${{ github.workspace }}/libbridge/build/ \ && mv libwallet2_api_c.so ${{ matrix.host_triplet }}_libwallet2_api_c.so \ && sha256sum ${{ matrix.host_triplet }}_libwallet2_api_c.so > ${{ matrix.host_triplet }}_libwallet2_api_c.so.sha256 # - name: act - copy workspace to /opt/wspace # if: ${{ env.ACT }} # run: cp -a ${{ github.workspace }} /opt/wspace # - name: Create release # uses: https://gitea.com/akkuman/gitea-release-action@v1 # with: # body: | # This is a **preview** release to be used by testers. # It was built from **${{ github.ref }}** commit `${{ github.sha }}` # Grab corresponding [wallet2_api_c.h](https://git.mrcyjanek.net/mrcyjanek/monero_c/src/commit/${{ github.sha }}/libbridge/src/main/cpp/wallet2_api_c.h) # ### Release info # ${{ github.event.head_commit.message }} # files: |- # ${{ github.workspace }}/libbridge/build/${{ matrix.host_triplet }}_libwallet2_api_c.so # ${{ github.workspace }}/libbridge/build/${{ matrix.host_triplet }}_libwallet2_api_c.so.sha256 - name: Create cache entries run: | PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh libsodium "${SODIUM_VERSION}-${{ matrix.host_triplet }}-${SODIUM_HASH}" ${{ github.workspace }}/prefix/lib/libsodium.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh openssl "${OPENSSL_VERSION}-${{ matrix.host_triplet }}-${OPENSSL_HASH}" ${{ github.workspace }}/prefix/lib/libcrypto.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh openssl "${OPENSSL_VERSION}-${{ matrix.host_triplet }}-${OPENSSL_HASH}" ${{ github.workspace }}/prefix/lib/libssl.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh boost "${BOOST_VERSION_DOT}-${{ matrix.host_triplet }}-${BOOST_HASH}" ${{ github.workspace }}/prefix/lib/libboost_chrono.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh boost "${BOOST_VERSION_DOT}-${{ matrix.host_triplet }}-${BOOST_HASH}" ${{ github.workspace }}/prefix/lib/libboost_date_time.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh boost "${BOOST_VERSION_DOT}-${{ matrix.host_triplet }}-${BOOST_HASH}" ${{ github.workspace }}/prefix/lib/libboost_filesystem.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh boost "${BOOST_VERSION_DOT}-${{ matrix.host_triplet }}-${BOOST_HASH}" ${{ github.workspace }}/prefix/lib/libboost_program_options.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh boost "${BOOST_VERSION_DOT}-${{ matrix.host_triplet }}-${BOOST_HASH}" ${{ github.workspace }}/prefix/lib/libboost_regex.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh boost "${BOOST_VERSION_DOT}-${{ matrix.host_triplet }}-${BOOST_HASH}" ${{ github.workspace }}/prefix/lib/libboost_serialization.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh boost "${BOOST_VERSION_DOT}-${{ matrix.host_triplet }}-${BOOST_HASH}" ${{ github.workspace }}/prefix/lib/libboost_system.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh boost "${BOOST_VERSION_DOT}-${{ matrix.host_triplet }}-${BOOST_HASH}" ${{ github.workspace }}/prefix/lib/libboost_thread.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh boost "${BOOST_VERSION_DOT}-${{ matrix.host_triplet }}-${BOOST_HASH}" ${{ github.workspace }}/prefix/lib/libboost_wserialization.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh libunbound "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/prefix/lib/libunbound.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/lib/libwallet_api.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/lib/libwallet.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/cryptonote_core/libcryptonote_core.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/cryptonote_basic/libcryptonote_basic.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/mnemonics/libmnemonics.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/common/libcommon.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/crypto/libcncrypto.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/ringct/libringct.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/ringct/libringct_basic.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/blockchain_db/libblockchain_db.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/external/db_drivers/liblmdb/liblmdb.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/external/easylogging++/libeasylogging.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/contrib/epee/src/libepee.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/blocks/libblocks.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/checkpoints/libcheckpoints.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/device/libdevice.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/device_trezor/libdevice_trezor.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/multisig/libmultisig.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/libversion.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/net/libnet.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/hardforks/libhardforks.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/external/randomx/librandomx.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/rpc/librpc_base.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/crypto/wallet/libwallet-crypto.a PAT_SECRET_PACKAGE=${{ secrets.PAT_SECRET_PACKAGE }} ${{ github.workspace }}/save_artifact.sh monero "${MONERO_TAG}-${{ matrix.host_triplet }}-${MONERO_GIT_SOURCE_SIMPLE}" ${{ github.workspace }}/monero/build/release/src/cryptonote_basic/libcryptonote_format_utils_basic.a