Skip to content

Commit

Permalink
Try to fix mac version
Browse files Browse the repository at this point in the history
  • Loading branch information
firstcryptoman committed Feb 15, 2023
1 parent 6031928 commit 4c418e4
Show file tree
Hide file tree
Showing 10 changed files with 94 additions and 79 deletions.
95 changes: 57 additions & 38 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
name: Build release workflow

on:
push:
tags:
- '*'

workflow_dispatch:
inputs:
# pull_request:
# types: [ opened, synchronize, reopened ]
# push:
# branches:
# - master
tag:
description: 'Tag name'
required: true
type: string
target_os:
description: 'Target OS for build'
required: true
type: choice
options:
- all
- windows_linux
- osx
- android
jobs:

create_release:
Expand All @@ -17,26 +33,27 @@ jobs:
steps:
- name: Try to Get Release
id: get_release
uses: zebra-lucky/[email protected].3
uses: Bertrand256/[email protected].4
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
if: ${{ inputs.target_os == 'all' || inputs.target_os == 'osx' }}
name: create release for macOS
steps:
- name: Checkout
Expand All @@ -45,7 +62,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,23 +74,24 @@ jobs:
run: |
./contrib/dash/actions/script-osx.sh
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
uses: Bertrand256/upload-release-asset@v1.0.3
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_path: dist/Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-macosx.dmg
asset_name: Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-macosx.dmg
asset_content_type: application/apple-diskimage

build_apk:
needs: create_release
runs-on: ubuntu-18.04
if: ${{ inputs.target_os == 'all' || inputs.target_os == 'android' }}
strategy:
matrix:
arch: ['armeabi-v7a', 'arm64-v8a']
is_mainnet: [['true', 'Electrum_DASH'],
['false', 'Electrum_DASH_Testnet']]
is_mainnet: [['true', 'Electrum_FIRO'],
['false', 'Electrum_FIRO_Testnet']]
env:
APP_ANDROID_ARCH: ${{ matrix.arch }}
ELECTRUM_MAINNET: ${{ matrix.is_mainnet[0] }}
Expand All @@ -89,10 +107,10 @@ 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 "::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
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:
Expand All @@ -113,7 +131,7 @@ jobs:
./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
uses: Bertrand256/upload-release-asset@v1.0.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -125,6 +143,7 @@ jobs:
build_linux_win:
needs: create_release
runs-on: ubuntu-18.04
if: ${{ inputs.target_os == 'all' || inputs.target_os == 'windows_linux' }}
name: create release for Linux/Win
steps:
- name: Checkout
Expand All @@ -150,52 +169,52 @@ jobs:
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_path: dist/Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}.tar.gz
asset_name: Firo-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_path: dist/Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}.zip
asset_name: Firo-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_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
asset_content_type: application/octet-stream
- name: Upload Win32 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 }}-setup-win32.exe
asset_name: Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-setup-win32.exe
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
asset_content_type: application/vnd.microsoft.portable-executable
- name: Upload Win64 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 }}-setup-win64.exe
asset_name: Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-setup-win64.exe
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
asset_content_type: application/vnd.microsoft.portable-executable

upload_notify_artifact:
runs-on: ubuntu-18.04
if: always()
name: Upload Notify Artifact
steps:
- name: Upload Notify Artifact
uses: zebra-lucky/[email protected]
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/[email protected]
# with:
# gh_ctx: ${{ toJson(github) }}
2 changes: 1 addition & 1 deletion RELEASE-NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
* The API of several CLI/RPC commands have changed, and several new
commands have been introduced (mainly for LN).
* Distributables:
- Apple. Min macOS version is 10.13.
- Apple. Min macOS version is 10.15.
* Transactions:
- we now grind low R for ECDSA signatures to match bitcoind (#5820)
* Lots and lots of other minor bugfixes and improvements.
Expand Down
4 changes: 2 additions & 2 deletions contrib/dash/actions/install-osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tar -xzvf ${LIBUSB_FILE}
shasum -a256 -s -c ${LIBUSB_FILE}.sha256
pushd libusb-${LIBUSB_VER}
./configure --disable-dependency-tracking --prefix=/opt/libusb
sudo env MACOSX_DEPLOYMENT_TARGET=10.13 make install
sudo env MACOSX_DEPLOYMENT_TARGET=10.15 make install
popd
sudo rm -rf libusb-${LIBUSB_VER}*
cp /opt/libusb/lib/libusb-1.*.dylib .
Expand All @@ -45,7 +45,7 @@ echo 'Do not forget to run "brew install gettext libtool automake pkg-config"'
#if [[ -n $GITHUB_REF ]]; then
echo "Building ZBar dylib..."
rm -f libzbar.0.dylib
export MACOSX_DEPLOYMENT_TARGET=10.13
export MACOSX_DEPLOYMENT_TARGET=10.15
./contrib/make_zbar.sh
rm -rf contrib/zbar/
#fi
2 changes: 1 addition & 1 deletion contrib/dash/actions/script-osx.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -ev

export MACOSX_DEPLOYMENT_TARGET=10.13
export MACOSX_DEPLOYMENT_TARGET=10.15

export PY37BINDIR=/Library/Frameworks/Python.framework/Versions/3.7/bin/
export PATH=$PATH:$PY37BINDIR
Expand Down
2 changes: 1 addition & 1 deletion contrib/dash/travis/before_install-osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ brew install gettext libtool automake pkg-config
if [[ -n $TRAVIS_TAG ]]; then
echo "Building ZBar dylib..."
rm -f libzbar.0.dylib
export MACOSX_DEPLOYMENT_TARGET=10.13
export MACOSX_DEPLOYMENT_TARGET=10.15
./contrib/make_zbar.sh
rm -rf contrib/zbar/
fi
14 changes: 7 additions & 7 deletions contrib/dash/travis/travis-build-linux-apk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ fi

cd build
if [[ -n $TRAVIS_TAG ]]; then
BUILD_REPO_URL=https://github.com/akhavr/electrum-dash.git
git clone --branch $TRAVIS_TAG $BUILD_REPO_URL electrum-dash
BUILD_REPO_URL=https://github.com/firoorg/electrum-firo.git
git clone --branch $TRAVIS_TAG $BUILD_REPO_URL electrum-firo
else
git clone .. electrum-dash
git clone .. electrum-firo
fi


pushd electrum-dash
pushd electrum-firo
./contrib/make_locale
find . -name '*.po' -delete
find . -name '*.pot' -delete
popd

pushd electrum-dash/contrib/android
pushd electrum-firo/contrib/android
python3 -m virtualenv --python=python3 atlas_env
source atlas_env/bin/activate
pip install Kivy Pillow
Expand Down Expand Up @@ -49,10 +49,10 @@ if [[ $ELECTRUM_MAINNET == "false" ]]; then
DOCKER_CMD="$DOCKER_CMD release-testnet"
fi

sudo chown -R 1000 electrum-dash
sudo chown -R 1000 electrum-firo
docker run --rm \
--env APP_ANDROID_ARCH=$APP_ANDROID_ARCH \
--env APK_VERSION_CODE=$DASH_ELECTRUM_VERSION_CODE \
-v $(pwd)/electrum-dash:/home/buildozer/build \
-v $(pwd)/electrum-firo:/home/buildozer/build \
-t zebralucky/electrum-dash-winebuild:Kivy40x bash -c \
"$DOCKER_CMD"
28 changes: 14 additions & 14 deletions contrib/dash/travis/travis-build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ set -ev

cd build
if [[ -n $TRAVIS_TAG ]]; then
BUILD_REPO_URL=https://github.com/akhavr/electrum-dash.git
git clone --branch $TRAVIS_TAG $BUILD_REPO_URL electrum-dash
BUILD_REPO_URL=https://github.com/firoorg/electrum-firo.git
git clone --branch $TRAVIS_TAG $BUILD_REPO_URL electrum-firo
else
git clone .. electrum-dash
git clone .. electrum-firo
fi


mkdir -p electrum-dash/dist
mkdir -p electrum-firo/dist
docker run --rm \
-v $(pwd):/opt \
-w /opt/electrum-dash \
-w /opt/electrum-firo \
-t zebralucky/electrum-dash-winebuild:Linux40x \
/opt/electrum-dash/contrib/build-linux/sdist/build.sh
/opt/electrum-firo/contrib/build-linux/sdist/build.sh


sudo find . -name '*.po' -delete
Expand All @@ -24,13 +24,13 @@ sudo find . -name '*.pot' -delete

docker run --rm \
-v $(pwd):/opt \
-w /opt/electrum-dash/contrib/build-linux/appimage \
-w /opt/electrum-firo/contrib/build-linux/appimage \
-t zebralucky/electrum-dash-winebuild:AppImage40x ./build.sh

BUILD_DIR=/root/build
TOR_PROXY_VERSION=0.4.5.7
TOR_PROXY_PATH=https://github.com/zebra-lucky/tor-proxy/releases/download
TOR_DIST=electrum-dash/dist/tor-proxy-setup.exe
TOR_DIST=electrum-firo/dist/tor-proxy-setup.exe

TOR_FILE=${TOR_PROXY_VERSION}/tor-proxy-${TOR_PROXY_VERSION}-win32-setup.exe
wget -O ${TOR_DIST} ${TOR_PROXY_PATH}/${TOR_FILE}
Expand Down Expand Up @@ -59,10 +59,10 @@ docker run --rm \
-e PYHOME=$PYHOME \
-e BUILD_DIR=$BUILD_DIR \
-v $(pwd):$BUILD_DIR \
-v $(pwd)/electrum-dash/:$WINEPREFIX/drive_c/electrum-dash \
-w $BUILD_DIR/electrum-dash \
-v $(pwd)/electrum-firo/:$WINEPREFIX/drive_c/electrum-firo \
-w $BUILD_DIR/electrum-firo \
-t zebralucky/electrum-dash-winebuild:Wine41x \
$BUILD_DIR/electrum-dash/contrib/build-wine/build.sh
$BUILD_DIR/electrum-firo/contrib/build-wine/build.sh


export WINEARCH=win64
Expand Down Expand Up @@ -91,7 +91,7 @@ docker run --rm \
-e PYHOME=$PYHOME \
-e BUILD_DIR=$BUILD_DIR \
-v $(pwd):$BUILD_DIR \
-v $(pwd)/electrum-dash/:$WINEPREFIX/drive_c/electrum-dash \
-w $BUILD_DIR/electrum-dash \
-v $(pwd)/electrum-firo/:$WINEPREFIX/drive_c/electrum-firo \
-w $BUILD_DIR/electrum-firo \
-t zebralucky/electrum-dash-winebuild:Wine41x \
$BUILD_DIR/electrum-dash/contrib/build-wine/build.sh
$BUILD_DIR/electrum-firo/contrib/build-wine/build.sh
12 changes: 6 additions & 6 deletions contrib/dash/travis/travis-build-osx.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -ev

export MACOSX_DEPLOYMENT_TARGET=10.13
export MACOSX_DEPLOYMENT_TARGET=10.15

export PY37BINDIR=/Library/Frameworks/Python.framework/Versions/3.7/bin/
export PATH=$PATH:$PY37BINDIR
Expand All @@ -11,16 +11,16 @@ echo osx build version is $DASH_ELECTRUM_VERSION

cd build
if [[ -n $TRAVIS_TAG ]]; then
BUILD_REPO_URL=https://github.com/akhavr/electrum-dash.git
git clone --branch $TRAVIS_TAG $BUILD_REPO_URL electrum-dash
BUILD_REPO_URL=https://github.com/firoorg/electrum-firo.git
git clone --branch $TRAVIS_TAG $BUILD_REPO_URL electrum-firo
PIP_CMD="sudo python3 -m pip"
else
git clone .. electrum-dash
git clone .. electrum-firo
python3 -m virtualenv env
source env/bin/activate
PIP_CMD="pip"
fi
cd electrum-dash
cd electrum-firo


$PIP_CMD install --no-dependencies --no-warn-script-location -I \
Expand All @@ -45,7 +45,7 @@ cp contrib/dash/pyi_tctl_runtimehook.py .

pyinstaller --clean \
-y \
--name electrum-dash-$DASH_ELECTRUM_VERSION.bin \
--name electrum-firo-$DASH_ELECTRUM_VERSION.bin \
osx.spec

sudo hdiutil create -fs HFS+ -volname "Firo Electrum" \
Expand Down
Loading

0 comments on commit 4c418e4

Please sign in to comment.