Merge flatpak and appimage builders
This commit is contained in:
parent
31ae8d3579
commit
d26a045863
|
@ -1,68 +0,0 @@
|
||||||
name: Build and Release AppImage / Linux
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build_appimage:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: env
|
|
||||||
run: |
|
|
||||||
cat build.env >> $GITHUB_ENV
|
|
||||||
echo $PWD/flutter/bin >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- name: appimage tool
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y binutils coreutils desktop-file-utils fakeroot fuse libgdk-pixbuf2.0-dev patchelf python3-pip python3-setuptools squashfs-tools strace util-linux zsync
|
|
||||||
sudo wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool
|
|
||||||
sudo chmod +x /usr/local/bin/appimagetool
|
|
||||||
sudo pip3 install appimage-builder
|
|
||||||
|
|
||||||
- name: params
|
|
||||||
run: |
|
|
||||||
mkdir $HOME/.zcash-params
|
|
||||||
curl https://download.z.cash/downloads/sapling-output.params --output $HOME/.zcash-params/sapling-output.params
|
|
||||||
curl https://download.z.cash/downloads/sapling-spend.params --output $HOME/.zcash-params/sapling-spend.params
|
|
||||||
|
|
||||||
- name: wget flutter
|
|
||||||
run: |
|
|
||||||
git clone -b "${{ env.FLUTTER_VERSION }}" --depth 1 https://github.com/flutter/flutter.git flutter
|
|
||||||
echo $PATH
|
|
||||||
flutter doctor -v
|
|
||||||
|
|
||||||
- name: Build dylib
|
|
||||||
run: |
|
|
||||||
cargo install cargo-make
|
|
||||||
cargo make flatpak
|
|
||||||
|
|
||||||
- name: install deps
|
|
||||||
run: |
|
|
||||||
sudo apt-get install -y libunwind-dev
|
|
||||||
sudo apt-get install -y clang cmake ninja-build libgtk-3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsecret-1-dev libjsoncpp-dev
|
|
||||||
|
|
||||||
- name: Build flutter
|
|
||||||
run: |
|
|
||||||
flutter pub get
|
|
||||||
flutter pub run build_runner build
|
|
||||||
(cd packages/warp_api_ffi;flutter pub get;flutter pub run build_runner build)
|
|
||||||
flutter build linux
|
|
||||||
|
|
||||||
- name: appimage
|
|
||||||
run: |
|
|
||||||
(cd misc;appimage-builder --recipe AppImageBuilder.yml;ls)
|
|
||||||
|
|
||||||
- name: Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
./misc/Ywallet-latest-x86_64.AppImage
|
|
|
@ -1,37 +0,0 @@
|
||||||
name: Build and Release Flatpak
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build_flatpak:
|
|
||||||
name: Build flatpak
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: env
|
|
||||||
run: |
|
|
||||||
cat build.env >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
id: buildx
|
|
||||||
uses: docker/setup-buildx-action@v1
|
|
||||||
|
|
||||||
- name: Build flatpak
|
|
||||||
run: |
|
|
||||||
./build-scripts/build-flatpak.sh "${{ env.FLUTTER_VERSION }}"
|
|
||||||
|
|
||||||
- name: Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
./ywallet.flatpak
|
|
||||||
./zwallet.tgz
|
|
||||||
./libwarp_api_ffi.so
|
|
|
@ -1,4 +1,4 @@
|
||||||
name: Build only Linux
|
name: Build and Release Linux AppImage/Flatpak
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
@ -7,8 +7,8 @@ on:
|
||||||
- "v*"
|
- "v*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_flatpak:
|
build:
|
||||||
name: Build flatpak
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -18,7 +18,26 @@ jobs:
|
||||||
- name: env
|
- name: env
|
||||||
run: |
|
run: |
|
||||||
cat build.env >> $GITHUB_ENV
|
cat build.env >> $GITHUB_ENV
|
||||||
|
echo $PWD/flutter/bin >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
|
run: ./build-scripts/build-linux.sh "${{ env.FLUTTER_VERSION }}"
|
||||||
|
|
||||||
|
- name: appimage
|
||||||
|
run: ./build-scripts/build-appimage.sh
|
||||||
|
|
||||||
|
- name: Flatpak
|
||||||
run: |
|
run: |
|
||||||
./build-scripts/build-linux2.sh "${{ env.FLUTTER_VERSION }}" "/root"
|
docker build -f docker/Dockerfile-flatpak -t zwallet_flatpak_sh .
|
||||||
|
docker run --privileged --name zwallet_flatpak_bin zwallet_flatpak_sh
|
||||||
|
docker cp zwallet_flatpak_bin:/root/misc/ywallet.flatpak .
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
./misc/Ywallet-latest-x86_64.AppImage
|
||||||
|
./ywallet.flatpak
|
||||||
|
./zwallet.tgz
|
||||||
|
./libwarp_api_ffi.so
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
sudo apt-get install -y binutils coreutils desktop-file-utils fakeroot fuse libgdk-pixbuf2.0-dev patchelf python3-pip python3-setuptools squashfs-tools strace util-linux zsync
|
||||||
|
sudo wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool
|
||||||
|
sudo chmod +x /usr/local/bin/appimagetool
|
||||||
|
sudo pip3 install appimage-builder
|
||||||
|
|
||||||
|
pushd misc
|
||||||
|
appimage-builder --recipe AppImageBuilder.yml
|
||||||
|
popd
|
|
@ -1,9 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
docker rm zwallet_flatpak_sh
|
flatpak-builder --user --install --force-clean build-dir me.hanh.zwallet.Ywallet.yml
|
||||||
docker rm zwallet_flatpak_bin
|
flatpak build-export /root/repo build-dir
|
||||||
docker build -f docker/Dockerfile-flatpak -t zwallet_flatpak_sh --build-arg FLUTTER_VERSION=$1 .
|
flatpak build-bundle /root/repo ywallet.flatpak me.hanh.zwallet.Ywallet
|
||||||
docker run --privileged --name zwallet_flatpak_bin zwallet_flatpak_sh
|
|
||||||
docker cp zwallet_flatpak_bin:/root/misc/ywallet.flatpak .
|
|
||||||
docker cp zwallet_flatpak_bin:/root/misc/root/zwallet.tgz .
|
|
||||||
docker cp zwallet_flatpak_bin:/root/misc/root/libwarp_api_ffi.so .
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
flatpak-builder --user --install --force-clean build-dir me.hanh.zwallet.Ywallet.yml
|
|
||||||
flatpak build-export /root/repo build-dir
|
|
||||||
flatpak build-bundle /root/repo ywallet.flatpak me.hanh.zwallet.Ywallet
|
|
|
@ -1,8 +1,26 @@
|
||||||
# apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev
|
FLUTTER_VERSION=$1
|
||||||
git config --global --add safe.directory /flutter
|
|
||||||
flutter config --enable-linux-desktop
|
mkdir -p $HOME/.zcash-params
|
||||||
|
curl https://download.z.cash/downloads/sapling-output.params --output $HOME/.zcash-params/sapling-output.params
|
||||||
|
curl https://download.z.cash/downloads/sapling-spend.params --output $HOME/.zcash-params/sapling-spend.params
|
||||||
|
|
||||||
|
git clone -b "$FLUTTER_VERSION" --depth 1 https://github.com/flutter/flutter.git flutter
|
||||||
|
flutter doctor -v
|
||||||
|
|
||||||
|
sed -e 's/rlib/cdylib/' < native/zcash-sync/Cargo.toml >/tmp/out.toml
|
||||||
|
mv /tmp/out.toml native/zcash-sync/Cargo.toml
|
||||||
|
|
||||||
|
cargo b -r --features=dart_ffi
|
||||||
|
|
||||||
|
sudo apt-get install -y libunwind-dev
|
||||||
|
sudo apt-get install -y clang cmake ninja-build libgtk-3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsecret-1-dev libjsoncpp-dev
|
||||||
|
|
||||||
flutter pub get
|
flutter pub get
|
||||||
flutter pub run build_runner build
|
flutter pub run build_runner build
|
||||||
cargo make flatpak
|
|
||||||
(cd packages/warp_api_ffi;flutter pub get;flutter pub run build_runner build)
|
(cd packages/warp_api_ffi;flutter pub get;flutter pub run build_runner build)
|
||||||
flutter build linux
|
flutter build linux
|
||||||
|
|
||||||
|
pushd build/linux/x64/release/bundle
|
||||||
|
tar cvzf $OLDPWD/zwallet.tgz *
|
||||||
|
popd
|
||||||
|
cp target/release/libwarp_api_ffi.so .
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
FLUTTER_VERSION=$1
|
|
||||||
HOME=$2
|
|
||||||
|
|
||||||
mkdir -p $HOME/.zcash-params
|
|
||||||
curl https://download.z.cash/downloads/sapling-output.params --output $HOME/.zcash-params/sapling-output.params
|
|
||||||
curl https://download.z.cash/downloads/sapling-spend.params --output $HOME/.zcash-params/sapling-spend.params
|
|
||||||
|
|
||||||
git clone -b "$FLUTTER_VERSION" --depth 1 https://github.com/flutter/flutter.git flutter
|
|
||||||
flutter doctor -v
|
|
||||||
|
|
||||||
cargo install cargo-make
|
|
||||||
cargo make flatpak
|
|
||||||
|
|
||||||
sudo apt-get install -y libunwind-dev
|
|
||||||
sudo apt-get install -y clang cmake ninja-build libgtk-3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsecret-1-dev libjsoncpp-dev
|
|
||||||
|
|
||||||
flutter pub get
|
|
||||||
flutter pub run build_runner build
|
|
||||||
(cd packages/warp_api_ffi;flutter pub get;flutter pub run build_runner build)
|
|
||||||
flutter build linux
|
|
|
@ -7,3 +7,4 @@ RUN apt-get install -yq curl gnupg2 flatpak flatpak-builder
|
||||||
|
|
||||||
RUN flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
RUN flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||||
RUN flatpak install -y flathub org.freedesktop.Platform//22.08 org.freedesktop.Sdk//22.08
|
RUN flatpak install -y flathub org.freedesktop.Platform//22.08 org.freedesktop.Sdk//22.08
|
||||||
|
RUN flatpak install -y flathub org.gnome.Platform//43 org.gnome.Sdk//43
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
#syntax=docker/dockerfile:1.2
|
|
||||||
FROM mcr.microsoft.com/windows/server:ltsc2022
|
|
||||||
|
|
||||||
SHELL ["cmd", "/S", "/C"]
|
|
||||||
|
|
||||||
ADD https://aka.ms/vs/16/release/vs_buildtools.exe /vs_buildtools.exe
|
|
||||||
|
|
||||||
RUN vs_buildtools.exe --quiet --wait --norestart --nocache \
|
|
||||||
--installPath C:\BuildTools \
|
|
||||||
--add Microsoft.Component.MSBuild \
|
|
||||||
--add Microsoft.VisualStudio.Component.Windows10SDK.18362 \
|
|
||||||
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 \
|
|
||||||
|| IF "%ERRORLEVEL%"=="3010" EXIT 0
|
|
||||||
|
|
|
@ -1,38 +1,15 @@
|
||||||
#syntax=docker/dockerfile:1.2
|
#syntax=docker/dockerfile:1.2
|
||||||
FROM ubuntu:focal AS builder
|
|
||||||
ARG FLUTTER_VERSION
|
|
||||||
ENV PATH $PATH:/flutter/bin:/root/.cargo/bin
|
|
||||||
ENV HOME /root
|
|
||||||
|
|
||||||
RUN apt-get update
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
|
|
||||||
RUN apt-get install -y git curl unzip
|
|
||||||
RUN apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libgdk-pixbuf2.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsecret-1-dev libjsoncpp-dev
|
|
||||||
|
|
||||||
RUN mkdir -p /root/.zcash-params
|
|
||||||
RUN curl https://download.z.cash/downloads/sapling-output.params --output /root/.zcash-params/sapling-output.params
|
|
||||||
RUN curl https://download.z.cash/downloads/sapling-spend.params --output /root/.zcash-params/sapling-spend.params
|
|
||||||
|
|
||||||
RUN curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh -s -- -y
|
|
||||||
RUN rustup install stable
|
|
||||||
RUN cargo install cargo-make
|
|
||||||
|
|
||||||
RUN git clone -b $FLUTTER_VERSION --depth 1 https://github.com/flutter/flutter.git /flutter
|
|
||||||
RUN flutter doctor -v
|
|
||||||
|
|
||||||
COPY . /zwallet
|
|
||||||
|
|
||||||
RUN cd /zwallet && ./build-scripts/build-linux.sh
|
|
||||||
RUN cd /zwallet/build/linux/x64/release/bundle && tar cvzf /zwallet.tgz *
|
|
||||||
|
|
||||||
FROM hhanh00/zwallet_builder_flatpak
|
FROM hhanh00/zwallet_builder_flatpak
|
||||||
|
|
||||||
COPY . /root
|
RUN mkdir -p /root/misc
|
||||||
RUN mkdir /root/misc/root
|
COPY misc /root/misc
|
||||||
COPY --from=builder /zwallet.tgz /root/misc/root/
|
COPY build-scripts/build-flatpak.sh /root/misc
|
||||||
COPY --from=builder /zwallet/target/release/libwarp_api_ffi.so /root/misc/root/
|
COPY assets/icon.png /root/misc
|
||||||
|
|
||||||
|
COPY zwallet.tgz /root/misc/root/
|
||||||
|
COPY libwarp_api_ffi.so /root/misc/root/
|
||||||
|
|
||||||
RUN mkdir /root/repo
|
RUN mkdir /root/repo
|
||||||
|
|
||||||
WORKDIR /root/misc
|
WORKDIR /root/misc
|
||||||
ENTRYPOINT ["/root/build-scripts/build-flatpak2.sh"]
|
ENTRYPOINT ["/root/misc/build-flatpak.sh"]
|
||||||
|
|
|
@ -4,7 +4,7 @@ script:
|
||||||
- rm -rf AppDir
|
- rm -rf AppDir
|
||||||
- mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
|
- mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
|
||||||
- cp ../assets/icon.png AppDir/usr/share/icons/hicolor/256x256/apps/ywallet.png
|
- cp ../assets/icon.png AppDir/usr/share/icons/hicolor/256x256/apps/ywallet.png
|
||||||
- cp -r ../build/linux/x64/release/bundle/* AppDir
|
- tar xf ../zwallet.tgz -C AppDir
|
||||||
- cp ../target/release/libwarp_api_ffi.so AppDir/lib
|
- cp ../target/release/libwarp_api_ffi.so AppDir/lib
|
||||||
AppDir:
|
AppDir:
|
||||||
path: AppDir
|
path: AppDir
|
||||||
|
@ -23,7 +23,6 @@ AppDir:
|
||||||
include:
|
include:
|
||||||
- libgtk-3-0
|
- libgtk-3-0
|
||||||
- libgstreamer1.0 libgstreamer-plugins-base1.0
|
- libgstreamer1.0 libgstreamer-plugins-base1.0
|
||||||
- libjsoncpp25 libsecret-1-0
|
|
||||||
exclude:
|
exclude:
|
||||||
- humanity-icon-theme
|
- humanity-icon-theme
|
||||||
- hicolor-icon-theme
|
- hicolor-icon-theme
|
||||||
|
|
|
@ -9,7 +9,6 @@ finish-args:
|
||||||
- --socket=fallback-x11
|
- --socket=fallback-x11
|
||||||
- --socket=wayland
|
- --socket=wayland
|
||||||
- --device=dri
|
- --device=dri
|
||||||
- --filesystem=xdg-data/databases:create
|
|
||||||
modules:
|
modules:
|
||||||
- name: zwallet_build
|
- name: zwallet_build
|
||||||
sources:
|
sources:
|
||||||
|
@ -33,7 +32,7 @@ modules:
|
||||||
- type: file
|
- type: file
|
||||||
path: ywallet.metainfo.xml
|
path: ywallet.metainfo.xml
|
||||||
- type: file
|
- type: file
|
||||||
path: ../assets/icon.png
|
path: icon.png
|
||||||
buildsystem: simple
|
buildsystem: simple
|
||||||
build-commands:
|
build-commands:
|
||||||
- install -Dp -m 644 icon.png /app/share/icons/hicolor/256x256/apps/me.hanh.zwallet.Ywallet.png
|
- install -Dp -m 644 icon.png /app/share/icons/hicolor/256x256/apps/me.hanh.zwallet.Ywallet.png
|
||||||
|
|
Loading…
Reference in New Issue