mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-22 03:29:30 +00:00
flatpak: Add workflow
This commit is contained in:
parent
f650e96363
commit
7765b8b462
4 changed files with 378 additions and 0 deletions
170
.github/workflows/flatpak.yml
vendored
Normal file
170
.github/workflows/flatpak.yml
vendored
Normal file
|
@ -0,0 +1,170 @@
|
|||
name: Flatpak
|
||||
|
||||
on:
|
||||
push
|
||||
|
||||
jobs:
|
||||
part1:
|
||||
name: Part 1/3
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: bilelmoussaoui/flatpak-github-actions:kde-5.15-22.08
|
||||
options: --privileged
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [x86_64, aarch64]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install deps
|
||||
run: dnf -y install docker
|
||||
|
||||
- name: Setup QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
with:
|
||||
platforms: arm64
|
||||
|
||||
- name: Build flatpak
|
||||
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||
env:
|
||||
FLATPAK_BUILDER_N_JOBS: 3
|
||||
with:
|
||||
manifest-path: share/org.getmonero.Monero.yaml
|
||||
arch: ${{ matrix.arch }}
|
||||
cache: false
|
||||
stop-at-module: boost
|
||||
|
||||
- name: Tar flatpak-builder
|
||||
run: tar -cvf flatpak-builder.tar .flatpak-builder
|
||||
|
||||
- name: Save flatpak-builder
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: flatpak-builder-${{ matrix.arch }}
|
||||
path: flatpak-builder.tar
|
||||
|
||||
part2:
|
||||
name: Part 2/3
|
||||
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]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- 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
|
||||
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
|
||||
env:
|
||||
FLATPAK_BUILDER_N_JOBS: 3
|
||||
with:
|
||||
manifest-path: share/org.getmonero.Monero.yaml
|
||||
arch: ${{ matrix.arch }}
|
||||
cache: false
|
||||
stop-at-module: monero-gui
|
||||
|
||||
- name: Tar flatpak-builder
|
||||
run: tar -cvf flatpak-builder.tar .flatpak-builder
|
||||
|
||||
- name: Save flatpak-builder
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: flatpak-builder-${{ matrix.arch }}
|
||||
path: flatpak-builder.tar
|
||||
|
||||
part3:
|
||||
name: Part 3/3
|
||||
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]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- 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
|
||||
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
|
||||
env:
|
||||
FLATPAK_BUILDER_N_JOBS: 3
|
||||
with:
|
||||
manifest-path: share/org.getmonero.Monero.yaml
|
||||
arch: ${{ matrix.arch }}
|
||||
cache: false
|
||||
|
||||
- name: Validate AppData
|
||||
working-directory: flatpak_app/files/share/appdata
|
||||
run: appstream-util validate org.getmonero.Monero.appdata.xml
|
||||
|
||||
- name: Delete flatpak-builder
|
||||
uses: geekyeggo/delete-artifact@v2
|
||||
with:
|
||||
name: flatpak-builder-${{ matrix.arch }}
|
||||
|
||||
- name: Print hashes
|
||||
working-directory: flatpak_app/files/bin
|
||||
run: |
|
||||
echo "Hashes of the ${{ matrix.arch }} binaries:" >> $GITHUB_STEP_SUMMARY
|
||||
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
||||
for bin in monero-blockchain-ancestry monero-blockchain-depth monero-blockchain-export monero-blockchain-import monero-blockchain-mark-spent-outputs monero-blockchain-prune monero-blockchain-prune-known-spent-data monero-blockchain-stats monero-blockchain-usage monerod monero-gen-ssl-cert monero-gen-trusted-multisig monero-wallet-cli monero-wallet-gui monero-wallet-rpc p2pool; do sha256sum $bin; done >> $GITHUB_STEP_SUMMARY
|
||||
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
||||
echo "An example command to check hashes:" >> $GITHUB_STEP_SUMMARY
|
||||
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
||||
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
|
||||
with:
|
||||
flat-manager-url: https://hub.flathub.org
|
||||
repository: beta
|
||||
token: ${{ secrets.FLATHUB_ }}
|
10
share/org.getmonero.Monero.desktop
Normal file
10
share/org.getmonero.Monero.desktop
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Desktop Entry]
|
||||
Name=Monero GUI
|
||||
GenericName=Monero-GUI
|
||||
Comment=Monero GUI
|
||||
Exec=monero-wallet-gui
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Categories=Network;Qt;Finance;Office;
|
||||
Icon=org.getmonero.Monero
|
||||
StartupNotify=true
|
65
share/org.getmonero.Monero.metainfo.xml
Normal file
65
share/org.getmonero.Monero.metainfo.xml
Normal file
|
@ -0,0 +1,65 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>org.getmonero.Monero</id>
|
||||
<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>
|
||||
<categories>
|
||||
<category>Network</category>
|
||||
<category>Qt</category>
|
||||
<category>Finance</category>
|
||||
<category>Office</category>
|
||||
</categories>
|
||||
<name>Monero GUI</name>
|
||||
<summary>Monero: the secure, private, untraceable cryptocurrency</summary>
|
||||
|
||||
<description>
|
||||
<p>Monero is a private, secure, untraceable, decentralised digital currency. You
|
||||
are your bank, you control your funds, and nobody can trace your transfers
|
||||
unless you allow them to do so.</p>
|
||||
|
||||
<p>Privacy: Monero uses a cryptographically sound system to allow you to send
|
||||
and receive funds without your transactions being easily revealed on the
|
||||
blockchain (the ledger of transactions that everyone has). This ensures that
|
||||
your purchases, receipts, and all transfers remain absolutely private by
|
||||
default.</p>
|
||||
|
||||
<p>Security: Using the power of a distributed peer-to-peer consensus network,
|
||||
every transaction on the network is cryptographically secured. Individual
|
||||
wallets have a 25 word mnemonic seed that is only displayed once, and can be
|
||||
written down to backup the wallet. Wallet files are encrypted with a passphrase
|
||||
to ensure they are useless if stolen.</p>
|
||||
|
||||
<p>Untraceability: By taking advantage of ring signatures, a special property of
|
||||
a certain type of cryptography, Monero is able to ensure that transactions are
|
||||
not only untraceable, but have an optional measure of ambiguity that ensures
|
||||
that transactions cannot easily be tied back to an individual user or computer.</p>
|
||||
</description>
|
||||
|
||||
<launchable type="desktop-id">org.getmonero.Monero.desktop</launchable>
|
||||
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<caption>A screenshot of the Monero GUI wallet</caption>
|
||||
<image>https://raw.githubusercontent.com/monero-project/monero-site/master/img/downloads/gui.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
|
||||
<url type="homepage">https://getmonero.org</url>
|
||||
<url type="bugtracker">https://github.com/monero-project/monero-gui/issues</url>
|
||||
<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>
|
||||
|
||||
<releases>
|
||||
<release version="<version>" date="<date>"/>
|
||||
</releases>
|
||||
|
||||
<custom>
|
||||
<value key="flathub::manifest">https://github.com/monero-project/monero-gui/tree/master/share/org.getmonero.Monero.yaml</value>
|
||||
</custom>
|
||||
</component>
|
133
share/org.getmonero.Monero.yaml
Normal file
133
share/org.getmonero.Monero.yaml
Normal file
|
@ -0,0 +1,133 @@
|
|||
app-id: org.getmonero.Monero
|
||||
runtime: org.kde.Platform
|
||||
runtime-version: 5.15-22.08
|
||||
sdk: org.kde.Sdk
|
||||
finish-args:
|
||||
- --share=network
|
||||
- --share=ipc
|
||||
- --socket=x11
|
||||
- --socket=wayland
|
||||
- --device=all
|
||||
- --filesystem=~/Monero:create
|
||||
- --persist=.bitmonero
|
||||
|
||||
cleanup:
|
||||
- /include
|
||||
- /etc
|
||||
- /share/man
|
||||
- /lib/pkgconfig
|
||||
- /lib/cmake
|
||||
- '*.a'
|
||||
- '*.la'
|
||||
|
||||
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
|
||||
|
||||
- name: boost
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- ./bootstrap.sh --prefix=$FLATPAK_DEST --with-libraries=chrono,date_time,filesystem,locale,program_options,regex,serialization,system,thread
|
||||
- ./b2 headers
|
||||
- ./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
|
||||
|
||||
- name: libunbound
|
||||
config-opts:
|
||||
- --with-libunbound-only
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://nlnetlabs.nl/downloads/unbound/unbound-1.17.1.tar.gz
|
||||
sha256: ee4085cecce12584e600f3d814a28fa822dfaacec1f94c84bfd67f8a5571a5f4
|
||||
|
||||
- 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
|
||||
|
||||
- name: libusb
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/libusb/libusb/releases/download/v1.0.26/libusb-1.0.26.tar.bz2
|
||||
sha256: 12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5
|
||||
|
||||
- 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
|
||||
|
||||
- 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
|
||||
|
||||
- name: libgss
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://ftp.gnu.org/gnu/gss/gss-1.0.4.tar.gz
|
||||
sha256: ecceabdef4cae3fce7218b2ecb83eb4227dba44b53b61b8c2b2e88ae02419c73
|
||||
|
||||
- name: libuv
|
||||
buildsystem: cmake-ninja
|
||||
config-opts:
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/libuv/libuv/archive/v1.44.2.tar.gz
|
||||
sha256: e6e2ba8b4c349a4182a33370bb9be5e23c51b32efb9b9e209d0e8556b73a48da
|
||||
|
||||
- name: p2pool
|
||||
buildsystem: cmake-ninja
|
||||
config-opts:
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DWITH_LTO=OFF
|
||||
sources:
|
||||
- type: git
|
||||
url: https://github.com/SChernykh/p2pool
|
||||
tag: v3.2
|
||||
commit: 92827035e07ff15da6b7645a332f3e59aa0ab1c4
|
||||
post-install:
|
||||
- install -Dm755 p2pool $FLATPAK_DEST/bin/p2pool
|
||||
|
||||
- name: monero-gui
|
||||
buildsystem: cmake-ninja
|
||||
config-opts:
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DWITH_DESKTOP_ENTRY=OFF
|
||||
- -DWITH_UPDATER=OFF
|
||||
build-options:
|
||||
arch:
|
||||
aarch64:
|
||||
config-opts:
|
||||
- -DARCH=armv8-a
|
||||
- -DBUILD_TAG=linux-armv8
|
||||
x86_64:
|
||||
config-opts:
|
||||
- -DARCH=default
|
||||
sources:
|
||||
- type: dir
|
||||
path: ../
|
||||
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
|
Loading…
Reference in a new issue