Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flatpak: Change the branch to stable #4231

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 76 additions & 48 deletions .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,48 @@ jobs:
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-27.0.3.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

- 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@b6c92176b7f578aedd80cac74cd8f0336f618e89
env:
FLATPAK_BUILDER_N_JOBS: 3
with:
manifest-path: share/org.getmonero.Monero.yaml
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
Expand All @@ -53,106 +60,126 @@ jobs:
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-27.0.3.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

- 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: Build flatpak
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
uses: flathub-infra/flatpak-github-actions/flatpak-builder@b6c92176b7f578aedd80cac74cd8f0336f618e89
env:
FLATPAK_BUILDER_N_JOBS: 3
with:
manifest-path: share/org.getmonero.Monero.yaml
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-27.0.3.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

- name: Add version and date
run: |
sed -i 's/<version>/${{ github.event.release.tag_name }}/g' $GITHUB_WORKSPACE/share/org.getmonero.Monero.metainfo.xml
sed -i 's/<date>/'"$(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@v5
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@b6c92176b7f578aedd80cac74cd8f0336f618e89
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
Expand All @@ -166,9 +193,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 }}
5 changes: 3 additions & 2 deletions share/org.getmonero.Monero.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
<metadata_license>CC0-1.0</metadata_license>
<project_license>BSD-3-Clause</project_license>
<content_rating type="oars-1.1"/>
<developer_name>The Monero Project</developer_name>
<developer id="org.getmonero">
<name>The Monero Project</name>
</developer>
<categories>
<category>Network</category>
<category>Qt</category>
Expand Down Expand Up @@ -51,7 +53,6 @@
<url type="donation">https://getmonero.org/get-started/contributing</url>
<url type="faq">https://getmonero.org/get-started/faq</url>
<url type="help">https://getmonero.org/resources/user-guides</url>
<url type="translate">https://translate.getmonero.org</url>
<url type="contact">https://getmonero.org/community/hangouts</url>
<url type="contribute">https://getmonero.org/get-started/contributing</url>

Expand Down
49 changes: 23 additions & 26 deletions share/org.getmonero.Monero.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -40,46 +36,46 @@ 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.20.0.tar.gz
sha256: 56b4ceed33639522000fd96775576ddf8782bb3617610715d7f1e777c5ec1dbf

- 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.20-RELEASE/libsodium-1.0.20.tar.gz
sha256: ebb65ef6ca439333c2bb41a0c1990587288da07f6c7fd07cb3a18cc18d30ce19

- name: libusb
sources:
- type: archive
url: https://github.com/libusb/libusb/releases/download/v1.0.26/libusb-1.0.26.tar.bz2
sha256: 12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5
url: https://github.com/libusb/libusb/releases/download/v1.0.27/libusb-1.0.27.tar.bz2
sha256: ffaa41d741a8a3bee244ac8e54a72ea05bf2879663c098c82fc5757853441575

- name: hidapi
buildsystem: cmake-ninja
config-opts:
- -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:
- --with-libsodium
- --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:
Expand All @@ -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
Expand All @@ -104,8 +100,8 @@ modules:
sources:
- type: git
url: https://github.com/SChernykh/p2pool
tag: v3.2
commit: 92827035e07ff15da6b7645a332f3e59aa0ab1c4
tag: v4.0
commit: 17de2ff4bc65898b64a72498418df5cf2760ce72
post-install:
- install -Dm755 p2pool $FLATPAK_DEST/bin/p2pool

Expand All @@ -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
Loading