forked from lthn/blockchain
170 lines
6.1 KiB
YAML
170 lines
6.1 KiB
YAML
name: "gui-testnet"
|
|
on:
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
push:
|
|
paths-ignore:
|
|
- '**.md'
|
|
pull_request:
|
|
paths-ignore:
|
|
- '**.md'
|
|
|
|
env:
|
|
CCACHE_SETTINGS: |
|
|
ccache --max-size=150M
|
|
ccache --set-config=compression=true
|
|
|
|
jobs:
|
|
linux-amd64:
|
|
runs-on: ubuntu-20.04
|
|
env:
|
|
CCACHE_TEMPDIR: ${{ github.workspace }}/ccache
|
|
steps:
|
|
- name: Cancel Previous Runs
|
|
uses: styfle/cancel-workflow-action@0.9.1
|
|
with:
|
|
access_token: ${{ github.token }}
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: recursive
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: ${{ github.workspace }}/ccache
|
|
key: ccache-${{ runner.os }}-build-testnet-gui
|
|
restore-keys: ccache-${{ runner.os }}-build-testnet-gui
|
|
- name: update apt
|
|
run: sudo apt update
|
|
- name: install dependencies
|
|
run: sudo apt-get install -y qt5-default qtwebengine5-dev libqt5websockets5-dev python-dev autotools-dev libboost-all-dev libicu-dev libbz2-dev git screen checkinstall zlib1g-dev ccache miniupnpc
|
|
- name: build server
|
|
env:
|
|
QT_PREFIX_PATH: /usr/lib/qt5
|
|
run: |
|
|
${{env.CCACHE_SETTINGS}}
|
|
./utils/build/testnet_linux_gui.sh
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: lethean-gui-bundle-linux-testnet-x86_64
|
|
if-no-files-found: error
|
|
path: lethean-gui-bundle-linux-testnet-x86_64.tar.bz2
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: ${{ github.workspace }}/lethean-gui-bundle-linux-testnet-x86_64.tar.bz2
|
|
macos-amd64:
|
|
runs-on: macos-latest
|
|
env:
|
|
CCACHE_TEMPDIR: ${{ github.workspace }}/ccache
|
|
steps:
|
|
- name: Cancel Previous Runs
|
|
uses: styfle/cancel-workflow-action@0.9.1
|
|
with:
|
|
access_token: ${{ github.token }}
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: recursive
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: ${{ github.workspace }}/ccache
|
|
key: ccache-${{ runner.os }}-build-testnet-gui
|
|
restore-keys: ccache-${{ runner.os }}-build-testnet-gui
|
|
- name: install dependencies
|
|
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install openssl boost icu4c ccache miniupnpc qt@5
|
|
- name: build server
|
|
env:
|
|
PKG_CONFIG_PATH: "/usr/local/opt/openssl@3/lib/pkgconfig"
|
|
OPENSSL_ROOT_DIR: "/usr/local/opt/openssl@3"
|
|
ZANO_BOOST_ROOT: "/usr/local/opt/boost"
|
|
ZANO_BOOST_LIBS_PATH: "/usr/local/opt/boost/lib"
|
|
ZANO_QT_PATH: "/usr/local/opt/qt@5"
|
|
CMAKE_OSX_SYSROOT: "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk"
|
|
run: |
|
|
${{env.CCACHE_SETTINGS}}
|
|
export LIBRARY_PATH=${LIBRARY_PATH}:/usr/local/opt/icu4c/lib
|
|
./utils/build/testnet_mac_osx_gui.sh
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: lethean-gui-bundle-macos-testnet-i386
|
|
if-no-files-found: error
|
|
path: lethean-gui-bundle-macos-testnet-i386.tar.bz2
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: ${{ github.workspace }}/lethean-gui-bundle-macos-testnet-i386.tar.bz2
|
|
windows-amd64:
|
|
runs-on: windows-latest
|
|
env:
|
|
CCACHE_TEMPDIR: ${{ github.workspace }}/ccache
|
|
steps:
|
|
- name: Cancel Previous Runs
|
|
uses: styfle/cancel-workflow-action@0.9.1
|
|
with:
|
|
access_token: ${{ github.token }}
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: recursive
|
|
- name: cCache Cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ${{ github.workspace }}/ccache
|
|
key: ccache-${{ runner.os }}-build-testnet-gui
|
|
restore-keys: ccache-${{ runner.os }}-build-testnet-gui
|
|
- name: Eat the Choco
|
|
run: |
|
|
choco install openssl --version 1.1.1.1500 -y
|
|
choco install ccache -y
|
|
choco install zip -y
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v3
|
|
with:
|
|
version: '5.15.2'
|
|
host: 'windows'
|
|
target: 'desktop'
|
|
arch: 'win64_msvc2019_64'
|
|
dir: '${{ github.workspace }}/example/'
|
|
modules: 'qtcharts qtwebengine'
|
|
tools: 'tools_cmake tools_vcredist'
|
|
cache: true
|
|
- name: install msvc toolset
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
- name: Install boost
|
|
uses: MarkusJx/install-boost@v2.4.1
|
|
id: install-boost
|
|
with:
|
|
# REQUIRED: Specify the required boost version
|
|
# A list of supported versions can be found here:
|
|
# https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json
|
|
boost_version: 1.80.0
|
|
platform_version: 2022
|
|
toolset: msvc
|
|
link: static
|
|
- name: Set up Visual Studio shell
|
|
uses: egor-tensin/vs-shell@v2
|
|
with:
|
|
arch: x64
|
|
- name: build server
|
|
env:
|
|
QT_PREFIX_PATH: ${{ github.workspace }}/example/Qt/5.15.2/win64_msvc2019_64
|
|
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
|
|
LOCAL_BOOST_PATH: ${{ steps.install-boost.outputs.BOOST_ROOT }}
|
|
OPENSSL_ROOT_DIR: "C:\\Program Files\\OpenSSL-Win64"
|
|
CCACHE_TEMPDIR: ${{ github.workspace }}/ccache
|
|
run: |
|
|
${{env.CCACHE_SETTINGS}}
|
|
.\utils\build\testnet_windows_gui.bat
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: lethean-gui-bundle-win-testnet-x64
|
|
if-no-files-found: error
|
|
path: ${{ github.workspace }}\lethean-gui-bundle-win-testnet-x64.zip
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: |
|
|
lethean-gui-bundle-win-testnet-*
|