From 4212040f0b601c85640a6c955cbfb0cd6d10971e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 12:28:28 +0000 Subject: chore(deps): update external/libzmq digest to b95d949 --- external/libzmq | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/libzmq b/external/libzmq index 59c9122..b95d949 160000 --- a/external/libzmq +++ b/external/libzmq @@ -1 +1 @@ -Subproject commit 59c91227b46b60b7f965816544b25fe0a3cc8bbe +Subproject commit b95d94935ed107679fd0ad9efd2f3d47309b6fd3 -- cgit v1.2.3 From 8102efa72b720c92f1b3b6f3771394d1003c3d11 Mon Sep 17 00:00:00 2001 From: cyan Date: Fri, 2 Aug 2024 18:04:56 +0200 Subject: add action to check for invalid dependencies (#28) * add action to check for invalid dependencies * downgrate polyseed to v2.0.0 --- .github/workflows/dependencies_matches.yaml | 74 +++++++++++++++++++++++++++++ external/polyseed | 2 +- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/dependencies_matches.yaml diff --git a/.github/workflows/dependencies_matches.yaml b/.github/workflows/dependencies_matches.yaml new file mode 100644 index 0000000..5552539 --- /dev/null +++ b/.github/workflows/dependencies_matches.yaml @@ -0,0 +1,74 @@ +name: Check if dependencies match +# Sometimes we have the libraries in two (or more) places +# at the same time, this check makes sure that we do use +# the same version of said libraries. +on: [push] + +jobs: + wownero-seed: + runs-on: ubuntu-latest + steps: + - 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 "ci@mrcyjanek.net" + git config --global user.name "CI mrcyjanek.net" + ./apply_patches.sh monero + ./apply_patches.sh wownero + - name: obtain hashes + run: | + set -x + pushd external/wownero-seed + echo "EXTERNAL_WOWNEROSEED=$(git rev-parse HEAD)" >> $GITHUB_ENV + popd + echo "WOWNERO_WOWNEROSEED=$(cat wownero/contrib/depends/packages/wownero_seed.mk | grep _download_file | tr '=.' '\n' | head -2 | tail -1)" >> $GITHUB_ENV + - name: compare hashes + run: | + if [[ "x$WOWNERO_WOWNEROSEED" == "x" ]]; + then + echo "Unable to obtain wownero seed from wownero repo" + exit 1 + fi + if [[ ! "x$EXTERNAL_WOWNEROSEED" == "x$WOWNERO_WOWNEROSEED" ]]; + then + echo "external/wownero-seed doesn't match wownero/contrib/depends/packages/wownero_seed.mk checksum" + exit 1 + fi + polyseed: + strategy: + matrix: + coin: [monero, wownero] + runs-on: ubuntu-latest + steps: + - 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 "ci@mrcyjanek.net" + git config --global user.name "CI mrcyjanek.net" + ./apply_patches.sh ${{ matrix.coin }} + - name: prepare + run: | + set -x + pushd ${{ matrix.coin }}/contrib/depends + make download # sorry, this is the easiest way + mkdir sources/polyseed + pushd sources/polyseed + tar xzf ../polyseed*.tar.gz + popd + popd + - name: diff + run: | + OUTPUT=$(diff -ra external/polyseed ${{ matrix.coin }}/contrib/depends/sources/polyseed/* | grep -v .git | wc -l) + if [[ ! "x$OUTPUT" == "x0" ]]; + then + diff -ra external/polyseed ${{ matrix.coin }}/contrib/depends/sources/polyseed/* + exit 1 + fi diff --git a/external/polyseed b/external/polyseed index b7c35bb..3ef3669 160000 --- a/external/polyseed +++ b/external/polyseed @@ -1 +1 @@ -Subproject commit b7c35bb3c6b91e481ecb04fc235eaff69c507fa1 +Subproject commit 3ef366993258a6f1c837d4908e3e4afb2cfefff7 -- cgit v1.2.3 From d56b480abe497c39ffdfdc4c827040569f0dd0e9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 30 Jul 2024 12:05:42 +0000 Subject: chore(deps): update ghcr.io/cirruslabs/flutter docker tag to v3.22.3 --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 232e912..da945f3 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/cirruslabs/flutter:3.22.2 +FROM ghcr.io/cirruslabs/flutter:3.22.3 # FROM debian:bookworm # Install dependencies -- cgit v1.2.3 From bcb328a4956105dc182afd0ce2e48fe263f5f20b Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Fri, 2 Aug 2024 19:26:48 +0200 Subject: bump java version in cake wallet ci --- .github/workflows/cake_wallet.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cake_wallet.yaml b/.github/workflows/cake_wallet.yaml index f4bc462..9ca355a 100644 --- a/.github/workflows/cake_wallet.yaml +++ b/.github/workflows/cake_wallet.yaml @@ -64,7 +64,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: 'zulu' - java-version: "11.x" + java-version: "17.x" - name: Configure placeholder git details run: | git config --global user.email "CI@cakewallet.com" @@ -246,4 +246,4 @@ jobs: with: issue-number: ${{steps.get_issue_number.outputs.result}} body: | - [download cake_wallet #${{github.run_id}}](https://nightly.link/MrCyjaneK/monero_c/actions/runs/${{github.run_id}}) (this comment will update whenever you push) \ No newline at end of file + [download cake_wallet #${{github.run_id}}](https://nightly.link/MrCyjaneK/monero_c/actions/runs/${{github.run_id}}) (this comment will update whenever you push) -- cgit v1.2.3 From 5de323b1ba7387cf73973042f06383d4dbe619f5 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Mon, 12 Aug 2024 15:12:37 +0200 Subject: fix macos rosseta builds --- .gitmodules | 3 +++ README.md | 2 +- build_single.sh | 34 +++++++++++++++++++++------------- external/libexpat | 1 + external/macos/build_unbound.sh | 22 +++++++++++++++++----- external/macos/config.sh | 5 +++-- 6 files changed, 46 insertions(+), 21 deletions(-) create mode 160000 external/libexpat diff --git a/.gitmodules b/.gitmodules index cbb27eb..d9a8e69 100644 --- a/.gitmodules +++ b/.gitmodules @@ -31,3 +31,6 @@ [submodule "external/libzmq"] path = external/libzmq url = https://github.com/zeromq/libzmq +[submodule "external/libexpat"] + path = external/libexpat + url = https://github.com/libexpat/libexpat.git diff --git a/README.md b/README.md index 4092b65..3a9b1a5 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ While building I aim to compile the code at oldest supported release of debian, | x86_64-w64-mingw32 | debian:buster | -"- | | x86_64-apple-darwin11 | debian:bookworm | extra build step: `${HOST_ABI}-ranlib $PWD/$repo/contrib/depends/${HOST_ABI}/lib/libpolyseed.a` | | aarch64-apple-darwin11 | debian:bookworm | -"- | -| host-apple-darwin | arm64-apple-darwin23 | dependencies: `brew install unbound boost@1.76 zmq && brew link boost@1.76` | +| host-apple-darwin | arm64-apple-darwin23 | dependencies: `brew install unbound boost@1.76 zmq cmake ccache autoconf automake libtool && brew link boost@1.76` | | host-apple-ios | arm64-apple-darwin23 | | ## Design diff --git a/build_single.sh b/build_single.sh index d98af2a..a8368da 100755 --- a/build_single.sh +++ b/build_single.sh @@ -2,6 +2,15 @@ cd "$(realpath $(dirname $0))" +proccount=1 +if [[ "x$(uname)" == "xDarwin" ]]; +then + proccount=$(sysctl -n hw.physicalcpu) +elif [[ "x$(uname)" == "xLinux" ]]; +then + proccount=$(nproc) +fi + function verbose_copy() { echo "==> cp $1 $2" cp $1 $2 @@ -11,13 +20,13 @@ set -e repo=$1 if [[ "x$repo" == "x" ]]; then - echo "Usage: $0 monero/wownero $(gcc -dumpmachine) -j$(nproc)" + echo "Usage: $0 monero/wownero $(gcc -dumpmachine) -j$proccount" exit 1 fi if [[ "x$repo" != "xwownero" && "x$repo" != "xmonero" ]]; then - echo "Usage: $0 monero/wownero $(gcc -dumpmachine) -j$(nproc)" + echo "Usage: $0 monero/wownero $(gcc -dumpmachine) -j$proccount" echo "Invalid target given, only monero and wownero are supported targets" fi @@ -31,7 +40,7 @@ fi HOST_ABI="$2" if [[ "x$HOST_ABI" == "x" ]]; then - echo "Usage: $0 monero/wownero $(gcc -dumpmachine) -j$(nproc)" + echo "Usage: $0 monero/wownero $(gcc -dumpmachine) -j$proccount" exit 1 fi @@ -39,7 +48,7 @@ NPROC="$3" if [[ "x$NPROC" == "x" ]]; then - echo "Usage: $0 monero/wownero $(gcc -dumpmachine) -j$(nproc)" + echo "Usage: $0 monero/wownero $(gcc -dumpmachine) -j$proccount" exit 1 fi cd $(dirname $0) @@ -181,20 +190,19 @@ pushd $repo/contrib/depends make $NPROC popd fi - pushd ../../../external/macos - ./build_unbound.sh - popd MACOS_LIBS_DIR="${PWD}/${HOST_ABI}" rm -rf ${MACOS_LIBS_DIR} mkdir -p ${MACOS_LIBS_DIR}/lib - if [[ "x$HOMEBREW_PREFIX" == "x" ]]; + if [[ "$(uname -m)" == "arm64" ]]; then - export HOMEBREW_PREFIX=/opt/homebrew - if [[ ! -d "$HOMEBREW_PREFIX" ]]; - then - export HOMEBREW_PREFIX=/usr/local - fi + export HOMEBREW_PREFIX="/opt/homebrew" + elif [[ "$(uname -m)" == "x86_64" ]]; + then + export HOMEBREW_PREFIX="/usr/local" fi + pushd ../../../external/macos + ./build_unbound.sh + popd # NOTE: we can use unbound from brew but app store rejects the app because of nghttp2 symbols being included # verbose_copy "${HOMEBREW_PREFIX}/lib/libunbound.a" ${MACOS_LIBS_DIR}/lib/libunbound.a verbose_copy "../../../external/macos/build/MACOS/lib/libunbound.a" ${MACOS_LIBS_DIR}/lib/libunbound.a diff --git a/external/libexpat b/external/libexpat new file mode 160000 index 0000000..3bab6c0 --- /dev/null +++ b/external/libexpat @@ -0,0 +1 @@ +Subproject commit 3bab6c09bbe8bf42d84b81563ddbcf4cca4be838 diff --git a/external/macos/build_unbound.sh b/external/macos/build_unbound.sh index e9e1ff8..d1c3825 100755 --- a/external/macos/build_unbound.sh +++ b/external/macos/build_unbound.sh @@ -9,9 +9,15 @@ EXPAT_VERSION=R_2_4_8 EXPAT_HASH="3bab6c09bbe8bf42d84b81563ddbcf4cca4be838" EXPAT_SRC_DIR=${EXTERNAL_MACOS_SOURCE_DIR}/libexpat rm -rf $EXPAT_SRC_DIR -git clone https://github.com/libexpat/libexpat.git -b ${EXPAT_VERSION} ${EXPAT_SRC_DIR} +if [ -d "$EXPAT_SRC_DIR" ]; then + echo "Unbound directory already exists." +else + echo "Cloning Unbound from $Unbound_URL" + mkdir -p ${EXPAT_SRC_DIR} || true + rm -rf ${EXPAT_SRC_DIR} + cp -r "${MONEROC_DIR}/external/libexpat" ${EXPAT_SRC_DIR} +fi cd $EXPAT_SRC_DIR -test `git rev-parse HEAD` = ${EXPAT_HASH} || exit 1 cd $EXPAT_SRC_DIR/expat ./buildconf.sh @@ -28,10 +34,16 @@ UNBOUND_DIR_PATH="${EXTERNAL_MACOS_SOURCE_DIR}/unbound-1.16.2" echo "============================ Unbound ============================" rm -rf ${UNBOUND_DIR_PATH} -git clone https://github.com/NLnetLabs/unbound.git -b ${UNBOUND_VERSION} ${UNBOUND_DIR_PATH} +# Check if the directory already exists. +if [ -d "$UNBOUND_DIR_PATH" ]; then + echo "Unbound directory already exists." +else + echo "Cloning Unbound from $Unbound_URL" + mkdir -p ${UNBOUND_DIR_PATH} || true + rm -rf ${UNBOUND_DIR_PATH} + cp -r "${MONEROC_DIR}/external/unbound" ${UNBOUND_DIR_PATH} +fi cd $UNBOUND_DIR_PATH -test `git rev-parse HEAD` = ${UNBOUND_HASH} || exit 1 - ./configure --prefix="${EXTERNAL_MACOS_DIR}" \ --with-ssl="${HOMEBREW_PREFIX}" \ --with-libexpat="${EXTERNAL_MACOS_DIR}" \ diff --git a/external/macos/config.sh b/external/macos/config.sh index dcdf462..3c40625 100755 --- a/external/macos/config.sh +++ b/external/macos/config.sh @@ -7,6 +7,7 @@ export EXTERNAL_MACOS_DIR="${EXTERNAL_DIR}/MACOS" export EXTERNAL_MACOS_SOURCE_DIR="${EXTERNAL_MACOS_DIR}/sources" export EXTERNAL_MACOS_LIB_DIR="${EXTERNAL_MACOS_DIR}/lib" export EXTERNAL_MACOS_INCLUDE_DIR="${EXTERNAL_MACOS_DIR}/include" +export MONEROC_DIR="$(pwd)/../.." -mkdir -p "$EXTERNAL_MACOS_LIB_DIR" -mkdir -p "$EXTERNAL_MACOS_INCLUDE_DIR" \ No newline at end of file +mkdir -p "$EXTERNAL_MACOS_LIB_DIR" || true +mkdir -p "$EXTERNAL_MACOS_INCLUDE_DIR" || true \ No newline at end of file -- cgit v1.2.3 From 06208221de515e75136c882b97dc7623487d17c8 Mon Sep 17 00:00:00 2001 From: cyan Date: Wed, 14 Aug 2024 13:41:11 +0200 Subject: fix cakewallet ci (#30) --- .github/workflows/cake_wallet.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cake_wallet.yaml b/.github/workflows/cake_wallet.yaml index 9ca355a..987a7cc 100644 --- a/.github/workflows/cake_wallet.yaml +++ b/.github/workflows/cake_wallet.yaml @@ -177,7 +177,7 @@ jobs: - name: Rename app run: | - echo -e "id=com.cakewallet.moneroc_${{ env.PR_NUMBER }}\nname=${{ github.ref_name }}" | tr '/-' '_' > /opt/android/cake_wallet/android/app.properties + echo -e "id=com.cakewallet.moneroc_${{ env.PR_NUMBER }}\nname=${{ github.ref_name }}" | sed 's/[^a-zA-Z0-9=\n.]//g' > /opt/android/cake_wallet/android/app.properties - name: Build run: | @@ -188,7 +188,7 @@ jobs: run: | cd /opt/android/cake_wallet/build/app/outputs/flutter-apk mkdir test-apk - cp app-arm64-v8a-release.apk "test-apk/$(echo ${{ github.ref_name }} | tr '/-' '_').apk" + cp app-arm64-v8a-release.apk "test-apk/$(echo ${{ github.ref_name }} | sed 's/[^a-zA-Z0-9]//g').apk" - name: Upload Artifact uses: kittaakos/upload-artifact-as-is@v0 -- cgit v1.2.3