Skip to content

Commit

Permalink
Prepare release 4.1.5.2 (#39)
Browse files Browse the repository at this point in the history
* Build prepare

* Fix MacOS

* Separate linux and windows build procedure use existing dockers

* Fix windows build

* Skip android build and windows portable upload

* try fix

* Try fix appimage error on startup

* Partialy revert last prev commit

* Changes linkes for build to main repo and bump version to 4.1.5.2

* Adding support for Ledger Nano S Plus

* Fix app crashing on startup and show history page

* Add electrumx05.firo.org
  • Loading branch information
firstcryptoman authored Feb 24, 2023
1 parent b91695c commit 9787316
Show file tree
Hide file tree
Showing 39 changed files with 481 additions and 343 deletions.
254 changes: 147 additions & 107 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
name: Build release workflow

on:
push:
tags:
- '*'

workflow_dispatch:
inputs:
tag:
description: 'Tag name'
required: true
type: string
target_os:
description: 'Target OS for build'
required: true
type: choice
options:
- all
- linux
- windows
- osx
# - android
jobs:

create_release:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
name: Create github release
outputs:
upload_url: >
Expand All @@ -17,26 +29,27 @@ jobs:
steps:
- name: Try to Get Release
id: get_release
uses: zebra-lucky/actions-js-getRelease@0.0.3
uses: firstcryptoman/actions-js-getRelease@0.0.5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: ${{ github.ref }}
tag: ${{ inputs.tag }}
- name: Create Release
id: create_release
if: ${{ !steps.get_release.outputs.upload_url }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
tag_name: ${{ inputs.tag }}
release_name: ${{ inputs.tag }}
draft: false
prerelease: false

build_osx:
needs: create_release
runs-on: macos-10.15
runs-on: macos-11
if: ${{ inputs.target_os == 'all' || inputs.target_os == 'osx' }}
name: create release for macOS
steps:
- name: Checkout
Expand All @@ -45,7 +58,7 @@ jobs:
id: set_vars
run: |
source ./contrib/dash/travis/electrum_dash_version_env.sh
echo "::set-output name=pkg_ver::$(echo $DASH_ELECTRUM_VERSION)"
echo "pkg_ver=$(echo $DASH_ELECTRUM_VERSION)" >> $GITHUB_OUTPUT
- name: Prepare build
env:
DASH_ELECTRUM_VERSION: ${{ steps.set_vars.outputs.pkg_ver }}
Expand All @@ -57,145 +70,172 @@ jobs:
run: |
./contrib/dash/actions/script-osx.sh
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
uses: firstcryptoman/upload-release-asset@v1.0.7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: dist/Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-macosx.dmg
asset_name: Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-macosx.dmg
asset_content_type: application/apple-diskimage
tag: ${{ inputs.tag }}
asset_path: dist/Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-macosx.dmg
asset_name: Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-macosx.dmg

# build_apk:
# needs: create_release
# runs-on: ubuntu-22.04
# if: ${{ inputs.target_os == 'all' || inputs.target_os == 'android' }}
# strategy:
# matrix:
# arch: ['armeabi-v7a', 'arm64-v8a']
# is_mainnet: [['true', 'Electrum_FIRO'],
# ['false', 'Electrum_FIRO_Testnet']]
# env:
# APP_ANDROID_ARCH: ${{ matrix.arch }}
# ELECTRUM_MAINNET: ${{ matrix.is_mainnet[0] }}
# name: create release for Android
# steps:
# - name: Install apt packages
# run: |
# sudo apt-get update
# sudo apt-get install gettext python3-virtualenv
# - name: Checkout
# uses: actions/checkout@v1
# - name: Set outputs for pkg_ver, apk_ver, vercode, is_release
# id: set_vars
# run: |
# source ./contrib/dash/travis/electrum_dash_version_env.sh
# echo "pkg_ver=$(echo $DASH_ELECTRUM_VERSION)" >> $GITHUB_OUTPUT
# echo "apk_ver=$(echo $DASH_ELECTRUM_APK_VERSION)" >> $GITHUB_OUTPUT
# echo "vercode=$(echo $DASH_ELECTRUM_VERSION_CODE)" >> $GITHUB_OUTPUT
# echo "is_release=$(echo $IS_RELEASE)" >> $GITHUB_OUTPUT
# - name: Prepare build
# if: ${{ steps.set_vars.outputs.is_release || matrix.is_mainnet[0] == 'false' }}
# env:
# DASH_ELECTRUM_VERSION: ${{ steps.set_vars.outputs.pkg_ver }}
# DASH_ELECTRUM_APK_VERSION: ${{ steps.set_vars.outputs.apk_ver }}
# DASH_ELECTRUM_VERSION_CODE: ${{ steps.set_vars.outputs.vercode }}
# IS_RELEASE: ${{ steps.set_vars.outputs.is_release }}
# run: |
# ./contrib/dash/actions/install-linux-apk.sh
# - name: Build apk
# if: ${{ steps.set_vars.outputs.is_release || matrix.is_mainnet[0] == 'false' }}
# env:
# DASH_ELECTRUM_VERSION: ${{ steps.set_vars.outputs.pkg_ver }}
# DASH_ELECTRUM_APK_VERSION: ${{ steps.set_vars.outputs.apk_ver }}
# DASH_ELECTRUM_VERSION_CODE: ${{ steps.set_vars.outputs.vercode }}
# IS_RELEASE: ${{ steps.set_vars.outputs.is_release }}
# run: |
# ./contrib/dash/actions/script-linux-apk.sh
# - name: Upload Release Asset
# if: ${{ steps.set_vars.outputs.is_release || matrix.is_mainnet[0] == 'false' }}
# uses: firstcryptoman/upload-release-asset@v1.0.7
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag: ${{ inputs.tag }}
# asset_path: dist/${{ matrix.is_mainnet[1] }}-${{ steps.set_vars.outputs.apk_ver }}-${{ matrix.arch }}-release-unsigned.apk
# asset_name: ${{ matrix.is_mainnet[1] }}-${{ steps.set_vars.outputs.apk_ver }}-${{ matrix.arch }}-release-unsigned.apk

build_apk:
build_linux:
needs: create_release
runs-on: ubuntu-18.04
strategy:
matrix:
arch: ['armeabi-v7a', 'arm64-v8a']
is_mainnet: [['true', 'Electrum_DASH'],
['false', 'Electrum_DASH_Testnet']]
env:
APP_ANDROID_ARCH: ${{ matrix.arch }}
ELECTRUM_MAINNET: ${{ matrix.is_mainnet[0] }}
name: create release for Android
runs-on: ubuntu-22.04
if: ${{ inputs.target_os == 'all' || inputs.target_os == 'linux' }}
name: create release for Linux
steps:
- name: Install apt packages
run: |
sudo apt-get update
sudo apt-get install gettext python3-virtualenv
- name: Checkout
uses: actions/checkout@v1
- name: Set outputs for pkg_ver, apk_ver, vercode, is_release
- name: Set outputs for pkg_ver
id: set_vars
run: |
source ./contrib/dash/travis/electrum_dash_version_env.sh
echo "::set-output name=pkg_ver::$(echo $DASH_ELECTRUM_VERSION)"
echo "::set-output name=apk_ver::$(echo $DASH_ELECTRUM_APK_VERSION)"
echo "::set-output name=vercode::$(echo $DASH_ELECTRUM_VERSION_CODE)"
echo "::set-output name=is_release::$(echo $IS_RELEASE)"
echo "pkg_ver=$(echo $DASH_ELECTRUM_VERSION)" >> $GITHUB_OUTPUT
- name: Prepare build
if: ${{ steps.set_vars.outputs.is_release || matrix.is_mainnet[0] == 'false' }}
env:
DASH_ELECTRUM_VERSION: ${{ steps.set_vars.outputs.pkg_ver }}
DASH_ELECTRUM_APK_VERSION: ${{ steps.set_vars.outputs.apk_ver }}
DASH_ELECTRUM_VERSION_CODE: ${{ steps.set_vars.outputs.vercode }}
IS_RELEASE: ${{ steps.set_vars.outputs.is_release }}
run: |
./contrib/dash/actions/install-linux-apk.sh
- name: Build apk
if: ${{ steps.set_vars.outputs.is_release || matrix.is_mainnet[0] == 'false' }}
./contrib/dash/actions/install-linux.sh
- name: Build Linux
env:
DASH_ELECTRUM_VERSION: ${{ steps.set_vars.outputs.pkg_ver }}
DASH_ELECTRUM_APK_VERSION: ${{ steps.set_vars.outputs.apk_ver }}
DASH_ELECTRUM_VERSION_CODE: ${{ steps.set_vars.outputs.vercode }}
IS_RELEASE: ${{ steps.set_vars.outputs.is_release }}
run: |
./contrib/dash/actions/script-linux-apk.sh
- name: Upload Release Asset
if: ${{ steps.set_vars.outputs.is_release || matrix.is_mainnet[0] == 'false' }}
uses: actions/upload-release-asset@v1
./contrib/dash/actions/script-linux.sh
- name: Upload sdist tar.gz Release Asset
uses: firstcryptoman/upload-release-asset@v1.0.7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: ${{ inputs.tag }}
asset_path: dist/Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}.tar.gz
asset_name: Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}.tar.gz
- name: Upload sdist zip Release Asset
uses: firstcryptoman/upload-release-asset@v1.0.7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: ${{ inputs.tag }}
asset_path: dist/Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}.zip
asset_name: Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}.zip
- name: Upload AppImage Release Asset
uses: firstcryptoman/upload-release-asset@v1.0.7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: dist/${{ matrix.is_mainnet[1] }}-${{ steps.set_vars.outputs.apk_ver }}-${{ matrix.arch }}-release-unsigned.apk
asset_name: ${{ matrix.is_mainnet[1] }}-${{ steps.set_vars.outputs.apk_ver }}-${{ matrix.arch }}-release-unsigned.apk
asset_content_type: application/vnd.android.package-archive
tag: ${{ inputs.tag }}
asset_path: dist/Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-x86_64.AppImage
asset_name: Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-x86_64.AppImage

build_linux_win:
build_windows:
needs: create_release
runs-on: ubuntu-18.04
name: create release for Linux/Win
runs-on: ubuntu-22.04
if: ${{ inputs.target_os == 'all' || inputs.target_os == 'windows' }}
name: create release for Windows
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set outputs for pkg_ver
id: set_vars
run: |
source ./contrib/dash/travis/electrum_dash_version_env.sh
echo "::set-output name=pkg_ver::$(echo $DASH_ELECTRUM_VERSION)"
echo "pkg_ver=$(echo $DASH_ELECTRUM_VERSION)" >> $GITHUB_OUTPUT
- name: Prepare build
env:
DASH_ELECTRUM_VERSION: ${{ steps.set_vars.outputs.pkg_ver }}
run: |
./contrib/dash/actions/install-linux.sh
- name: Build Linux/Win
./contrib/dash/actions/install-wine.sh
- name: Build Windows
env:
DASH_ELECTRUM_VERSION: ${{ steps.set_vars.outputs.pkg_ver }}
run: |
./contrib/dash/actions/script-linux.sh
- name: Upload sdist tar.gz Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: dist/Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}.tar.gz
asset_name: Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}.tar.gz
asset_content_type: application/gzip
- name: Upload sdist zip Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: dist/Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}.zip
asset_name: Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}.zip
asset_content_type: application/x-zip-compressed
- name: Upload AppImage Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: dist/Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-x86_64.AppImage
asset_name: Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-x86_64.AppImage
asset_content_type: application/octet-stream
./contrib/dash/actions/script-wine.sh
# - name: Upload Windows portable Release Asset
# uses: firstcryptoman/upload-release-asset@v1.0.7
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag: ${{ inputs.tag }}
# asset_path: dist/Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-portable.exe
# asset_name: Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-portable.exe
- name: Upload Win32 Release Asset
uses: actions/upload-release-asset@v1
uses: firstcryptoman/upload-release-asset@v1.0.7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: dist/Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-setup-win32.exe
asset_name: Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-setup-win32.exe
asset_content_type: application/vnd.microsoft.portable-executable
tag: ${{ inputs.tag }}
asset_path: dist/Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-setup-win32.exe
asset_name: Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-setup-win32.exe
- name: Upload Win64 Release Asset
uses: actions/upload-release-asset@v1
uses: firstcryptoman/upload-release-asset@v1.0.7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: dist/Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-setup-win64.exe
asset_name: Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-setup-win64.exe
asset_content_type: application/vnd.microsoft.portable-executable
tag: ${{ inputs.tag }}
asset_path: dist/Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-setup-win64.exe
asset_name: Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-setup-win64.exe

upload_notify_artifact:
runs-on: ubuntu-18.04
if: always()
name: Upload Notify Artifact
steps:
- name: Upload Notify Artifact
uses: zebra-lucky/actions-js-slackJobsStatus@0.0.2
with:
gh_ctx: ${{ toJson(github) }}
# upload_notify_artifact:
# runs-on: ubuntu-18.04
# if: always()
# name: Upload Notify Artifact
# steps:
# - name: Upload Notify Artifact
# uses: zebra-lucky/actions-js-slackJobsStatus@0.0.2
# with:
# gh_ctx: ${{ toJson(github) }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.DS_Store
build/
dist/
electrum_firo/locale/
electrum_dash/locale/
.devlocaltmp/
*_trial_temp
packages
Expand Down
3 changes: 3 additions & 0 deletions contrib/android/docker_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

export DOCKER_IMG_BUILD_ANDROID="electrum-firo-build-kivy:1.0"
7 changes: 4 additions & 3 deletions contrib/build-linux/appimage/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# from https://docs.appimage.org/introduction/concepts.html :
# "[AppImages] should be built on the oldest possible system, allowing them to run on newer system[s]"
FROM ubuntu:16.04@sha256:a4fc0c40360ff2224db3a483e5d80e9164fe3fdce2a8439d2686270643974632
LABEL description="Building Electrum Firo appimage for Linux"

ENV LC_ALL=C.UTF-8 LANG=C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -16,9 +17,9 @@ RUN apt-get update -q && \
libtool=2.4.6-0.1 \
autopoint=0.19.7-2ubuntu3.1 \
xz-utils=5.1.1alpha+20120614-2ubuntu2 \
libssl-dev=1.0.2g-1ubuntu4.19 \
libssl1.0.0=1.0.2g-1ubuntu4.19 \
openssl=1.0.2g-1ubuntu4.19 \
libssl-dev=1.0.2g-1ubuntu4.20 \
libssl1.0.0=1.0.2g-1ubuntu4.20 \
openssl=1.0.2g-1ubuntu4.20 \
zlib1g-dev=1:1.2.8.dfsg-2ubuntu4.3 \
libffi-dev=3.2.1-4 \
libncurses5-dev=6.0+20160213-1ubuntu1 \
Expand Down
2 changes: 1 addition & 1 deletion contrib/build-linux/appimage/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ info "installing electrum and its dependencies."
# hence "--no-binary :all:" flags. However, we specifically allow
# - PyQt5, as it's harder to build from source
# - cryptography, as building it would need openssl 1.1, not available on ubuntu 16.04
"$python" -m pip install --no-dependencies --no-binary :all: --no-warn-script-location \
"$python" -m pip install --no-dependencies --no-warn-script-location \
--cache-dir "$PIP_CACHE_DIR" -r "$CONTRIB/deterministic-build/requirements.txt"
"$python" -m pip install --no-dependencies --no-binary :all: --only-binary PyQt5,PyQt5-Qt5,cryptography --no-warn-script-location \
--cache-dir "$PIP_CACHE_DIR" -r "$CONTRIB/deterministic-build/requirements-binaries.txt"
Expand Down
3 changes: 3 additions & 0 deletions contrib/build-linux/appimage/docker_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

export DOCKER_IMG_BUILD_APPIMAGE="electrum-firo-build-appimage:1.0"
2 changes: 1 addition & 1 deletion contrib/build-linux/sdist/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM ubuntu:20.04
LABEL maintainer "Andriy Khavryuchenko <akhavr@khavr.com>"
LABEL description="Building Electrum Firo sdist for Linux"

ENV LANG="en_US.UTF-8" \
LANGUAGE="en_US.UTF-8" \
Expand Down
Loading

0 comments on commit 9787316

Please sign in to comment.