diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index 27fb33260f..c50c7a326d 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -7,30 +7,35 @@ on: jobs: part1: name: Part 1/3 - if: github.repository == 'monero-project/monero-gui' runs-on: ubuntu-latest - container: - image: bilelmoussaoui/flatpak-github-actions:kde-5.15-22.08 - options: --privileged strategy: matrix: arch: [x86_64, aarch64] + container: + image: ghcr.io/flathub-infra/flatpak-github-actions:kde-5.15-23.08 + options: --privileged steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - - name: Install deps - run: dnf -y install docker + - name: Install Docker + if: ${{ matrix.arch != 'x86_64' }} + run: | + curl https://download.docker.com/linux/static/stable/x86_64/docker-26.0.0.tgz --output ./docker.tgz + tar xzvf docker.tgz + mv docker/* /usr/bin - name: Setup QEMU - uses: docker/setup-qemu-action@v2 - with: - platforms: arm64 + if: ${{ matrix.arch != 'x86_64' }} + uses: docker/setup-qemu-action@v3.0.0 + + - name: Validate Flatpak manifest + run: flatpak-builder-lint manifest share/org.getmonero.Monero.yaml - name: Build flatpak - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 + uses: flathub-infra/flatpak-github-actions/flatpak-builder@6d0dd363260c9917f0bca469ec21370bb45a5b9f env: FLATPAK_BUILDER_N_JOBS: 3 with: @@ -38,41 +43,44 @@ jobs: arch: ${{ matrix.arch }} cache: false stop-at-module: boost + branch: stable - name: Tar flatpak-builder run: tar -cvf flatpak-builder.tar .flatpak-builder - name: Save flatpak-builder - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: flatpak-builder-${{ matrix.arch }} path: flatpak-builder.tar part2: name: Part 2/3 - if: github.repository == 'monero-project/monero-gui' needs: part1 runs-on: ubuntu-latest - container: - image: bilelmoussaoui/flatpak-github-actions:kde-5.15-22.08 - options: --privileged strategy: matrix: arch: [x86_64, aarch64] + container: + image: ghcr.io/flathub-infra/flatpak-github-actions:kde-5.15-23.08 + options: --privileged steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Install deps - run: dnf -y install docker + - name: Install Docker + if: ${{ matrix.arch != 'x86_64' }} + run: | + curl https://download.docker.com/linux/static/stable/x86_64/docker-26.0.0.tgz --output ./docker.tgz + tar xzvf docker.tgz + mv docker/* /usr/bin - name: Setup QEMU - uses: docker/setup-qemu-action@v2 - with: - platforms: arm64 + if: ${{ matrix.arch != 'x86_64' }} + uses: docker/setup-qemu-action@v3.0.0 - name: Restore flatpak-builder - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: flatpak-builder-${{ matrix.arch }} @@ -80,7 +88,7 @@ jobs: run: tar -xvf flatpak-builder.tar - name: Build flatpak - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 + uses: flathub-infra/flatpak-github-actions/flatpak-builder@6d0dd363260c9917f0bca469ec21370bb45a5b9f env: FLATPAK_BUILDER_N_JOBS: 3 with: @@ -88,71 +96,87 @@ jobs: arch: ${{ matrix.arch }} cache: false stop-at-module: monero-gui + branch: stable - name: Tar flatpak-builder run: tar -cvf flatpak-builder.tar .flatpak-builder - name: Save flatpak-builder - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: flatpak-builder-${{ matrix.arch }} path: flatpak-builder.tar + overwrite: true part3: name: Part 3/3 - if: github.repository == 'monero-project/monero-gui' needs: [part1, part2] runs-on: ubuntu-latest - container: - image: bilelmoussaoui/flatpak-github-actions:kde-5.15-22.08 - options: --privileged strategy: matrix: arch: [x86_64, aarch64] + container: + image: ghcr.io/flathub-infra/flatpak-github-actions:kde-5.15-23.08 + options: --privileged steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive + - name: Install Docker + if: ${{ matrix.arch != 'x86_64' }} + run: | + curl https://download.docker.com/linux/static/stable/x86_64/docker-26.0.0.tgz --output ./docker.tgz + tar xzvf docker.tgz + mv docker/* /usr/bin + + - name: Setup QEMU + if: ${{ matrix.arch != 'x86_64' }} + uses: docker/setup-qemu-action@v3.0.0 + - name: Add version and date run: | sed -i 's//${{ github.event.release.tag_name }}/g' $GITHUB_WORKSPACE/share/org.getmonero.Monero.metainfo.xml sed -i 's//'"$(date '+%F')"'/g' $GITHUB_WORKSPACE/share/org.getmonero.Monero.metainfo.xml - - name: Install deps - run: dnf -y install docker - - - name: Setup QEMU - uses: docker/setup-qemu-action@v2 - with: - platforms: arm64 - - name: Restore flatpak-builder - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: flatpak-builder-${{ matrix.arch }} - name: Untar flatpak-builder run: tar -xvf flatpak-builder.tar + - name: Delete flatpak-builder + uses: geekyeggo/delete-artifact@v4 + with: + name: flatpak-builder-${{ matrix.arch }} + - name: Build flatpak - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 + uses: flathub-infra/flatpak-github-actions/flatpak-builder@6d0dd363260c9917f0bca469ec21370bb45a5b9f env: FLATPAK_BUILDER_N_JOBS: 3 with: manifest-path: share/org.getmonero.Monero.yaml arch: ${{ matrix.arch }} cache: false + branch: stable + mirror-screenshots-url: https://dl.flathub.org/media - - name: Validate AppData - working-directory: flatpak_app/files/share/appdata - run: appstream-util validate org.getmonero.Monero.appdata.xml + - name: Validate AppStream + run: flatpak-builder-lint appstream flatpak_app/files/share/metainfo/org.getmonero.Monero.metainfo.xml - - name: Delete flatpak-builder - uses: geekyeggo/delete-artifact@v2 - with: - name: flatpak-builder-${{ matrix.arch }} + - name: Verify Icon and Metadata in app-info + run: | + test -f flatpak_app/files/share/app-info/icons/flatpak/128x128/org.getmonero.Monero.png || { echo "::error::Missing 128x128 icon in app-info"; exit 1; } + test -f flatpak_app/files/share/app-info/xmls/org.getmonero.Monero.xml.gz || { echo "::error::Missing org.getmonero.Monero.xml.gz in app-info"; exit 1; } + + - name: Validate build directory + run: flatpak-builder-lint builddir flatpak_app + + - name: Validate repository + run: flatpak-builder-lint repo repo - name: Print hashes working-directory: flatpak_app/files/bin @@ -166,9 +190,10 @@ jobs: echo "$ flatpak run --command=sha256sum org.getmonero.Monero /app/bin/monero-wallet-gui" >> $GITHUB_STEP_SUMMARY echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - - name: Publish to Flathub Beta - uses: flatpak/flatpak-github-actions/flat-manager@v6 + - name: Publish to Flathub + uses: flathub-infra/flatpak-github-actions/flat-manager@6d0dd363260c9917f0bca469ec21370bb45a5b9f with: flat-manager-url: https://hub.flathub.org - repository: beta - token: ${{ secrets.FLATHUB_ }} + repository: stable + build-log-url: https://github.com/monero-project/monero-gui/actions/runs/${{ github.run_id }} + token: ${{ secrets.FLATHUB_TOKEN }} diff --git a/share/org.getmonero.Monero.metainfo.xml b/share/org.getmonero.Monero.metainfo.xml index 31bc2fc8eb..f89f30384a 100644 --- a/share/org.getmonero.Monero.metainfo.xml +++ b/share/org.getmonero.Monero.metainfo.xml @@ -4,7 +4,9 @@ CC0-1.0 BSD-3-Clause - The Monero Project + + The Monero Project + Network Qt diff --git a/share/org.getmonero.Monero.yaml b/share/org.getmonero.Monero.yaml index 0d83c8b5eb..568a7d42dd 100644 --- a/share/org.getmonero.Monero.yaml +++ b/share/org.getmonero.Monero.yaml @@ -1,11 +1,11 @@ app-id: org.getmonero.Monero runtime: org.kde.Platform -runtime-version: 5.15-22.08 +runtime-version: 5.15-23.08 sdk: org.kde.Sdk finish-args: - --share=network - --share=ipc - - --socket=x11 + - --socket=fallback-x11 - --socket=wayland - --device=all - --filesystem=~/Monero:create @@ -23,14 +23,10 @@ cleanup: command: monero-wallet-gui modules: - name: protobuf - buildsystem: cmake-ninja - config-opts: - - -DCMAKE_BUILD_TYPE=Release sources: - - type: git - url: https://github.com/protocolbuffers/protobuf - tag: v22.4 - commit: 40e1daca18708c21c7edf07c489a688355bd297b + - type: archive + url: https://github.com/protocolbuffers/protobuf/releases/download/v21.3/protobuf-cpp-3.21.3.tar.gz + sha256: c98a4f17ed57e9e4dafc4a52e76ee012f9a6a13750488b20b4c370a3eb1561fc - name: boost buildsystem: simple @@ -40,22 +36,22 @@ modules: - ./b2 -j$FLATPAK_BUILDER_N_JOBS install variant=release --layout=system sources: - type: archive - url: https://boostorg.jfrog.io/artifactory/main/release/1.82.0/source/boost_1_82_0.tar.gz - sha256: 66a469b6e608a51f8347236f4912e27dc5c60c60d7d53ae9bfe4683316c6f04c + url: https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.tar.gz + sha256: a5800f405508f5df8114558ca9855d2640a2de8f0445f051fa1c7c3383045724 - name: libunbound config-opts: - --with-libunbound-only sources: - type: archive - url: https://nlnetlabs.nl/downloads/unbound/unbound-1.17.1.tar.gz - sha256: ee4085cecce12584e600f3d814a28fa822dfaacec1f94c84bfd67f8a5571a5f4 + url: https://nlnetlabs.nl/downloads/unbound/unbound-1.19.3.tar.gz + sha256: 3ae322be7dc2f831603e4b0391435533ad5861c2322e34a76006a9fb65eb56b9 - name: libsodium sources: - type: archive - url: https://github.com/jedisct1/libsodium/releases/download/1.0.18-RELEASE/libsodium-1.0.18.tar.gz - sha256: 6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1 + url: https://github.com/jedisct1/libsodium/releases/download/1.0.19-RELEASE/libsodium-1.0.19.tar.gz + sha256: 018d79fe0a045cca07331d37bd0cb57b2e838c51bc48fd837a1472e50068bbea - name: libusb sources: @@ -69,8 +65,8 @@ modules: - -DCMAKE_BUILD_TYPE=Release sources: - type: archive - url: https://github.com/libusb/hidapi/archive/hidapi-0.13.1.tar.gz - sha256: 476a2c9a4dc7d1fc97dd223b84338dbea3809a84caea2dcd887d9778725490e3 + url: https://github.com/libusb/hidapi/archive/hidapi-0.14.0.tar.gz + sha256: a5714234abe6e1f53647dd8cba7d69f65f71c558b7896ed218864ffcf405bcbd - name: libzmq config-opts: @@ -78,8 +74,8 @@ modules: - --disable-Werror sources: - type: archive - url: https://github.com/zeromq/libzmq/releases/download/v4.3.4/zeromq-4.3.4.tar.gz - sha256: c593001a89f5a85dd2ddf564805deb860e02471171b3f204944857336295c3e5 + url: https://github.com/zeromq/libzmq/releases/download/v4.3.5/zeromq-4.3.5.tar.gz + sha256: 6653ef5910f17954861fe72332e68b03ca6e4d9c7160eb3a8de5a5a913bfab43 - name: libgss sources: @@ -93,8 +89,8 @@ modules: - -DCMAKE_BUILD_TYPE=Release sources: - type: archive - url: https://github.com/libuv/libuv/archive/v1.44.2.tar.gz - sha256: e6e2ba8b4c349a4182a33370bb9be5e23c51b32efb9b9e209d0e8556b73a48da + url: https://github.com/libuv/libuv/archive/v1.47.0.tar.gz + sha256: d50af7e6d72526db137e66fad812421c8a1cae09d146b0ec2bb9a22c5f23ba93 - name: p2pool buildsystem: cmake-ninja @@ -104,8 +100,8 @@ modules: sources: - type: git url: https://github.com/SChernykh/p2pool - tag: v3.2 - commit: 92827035e07ff15da6b7645a332f3e59aa0ab1c4 + tag: v3.10 + commit: 3797f017e94047a41e5f622e1a299c6f71c37df0 post-install: - install -Dm755 p2pool $FLATPAK_DEST/bin/p2pool @@ -130,4 +126,5 @@ modules: post-install: - install -Dpm644 share/org.getmonero.Monero.desktop $FLATPAK_DEST/share/applications/$FLATPAK_ID.desktop - install -Dpm644 share/org.getmonero.Monero.metainfo.xml $FLATPAK_DEST/share/metainfo/$FLATPAK_ID.metainfo.xml - - for x in 16 24 32 48 64 96 128 256; do install -Dpm644 images/appicons/${x}x${x}.png $FLATPAK_DEST/share/icons/hicolor/${x}x${x}/apps/$FLATPAK_ID.png; done + - for x in 16 24 32 48 64 96 128 256; do install -Dpm644 images/appicons/${x}x${x}.png + $FLATPAK_DEST/share/icons/hicolor/${x}x${x}/apps/$FLATPAK_ID.png; done