2022-02-12 09:09:36 +05:30
|
|
|
name: Build
|
2022-02-02 11:58:00 +05:30
|
|
|
|
|
|
|
on:
|
2022-02-12 09:09:36 +05:30
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
build_type:
|
|
|
|
description: Type of build (Debug, Release, RelWithDebInfo, MinSizeRel)
|
|
|
|
type: string
|
|
|
|
default: Debug
|
2022-11-10 00:26:38 +05:30
|
|
|
is_qt_cached:
|
|
|
|
description: Enable Qt caching or not
|
|
|
|
type: string
|
|
|
|
default: true
|
2022-05-21 22:53:02 +05:30
|
|
|
secrets:
|
|
|
|
SPARKLE_ED25519_KEY:
|
|
|
|
description: Private key for signing Sparkle updates
|
|
|
|
required: false
|
2022-11-21 04:32:41 +05:30
|
|
|
CACHIX_AUTH_TOKEN:
|
|
|
|
description: Private token for authenticating against Cachix cache
|
|
|
|
required: false
|
2022-02-02 11:58:00 +05:30
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
|
2022-02-20 01:16:43 +05:30
|
|
|
- os: ubuntu-20.04
|
2022-05-17 02:24:32 +05:30
|
|
|
qt_ver: 5
|
2022-02-20 01:16:43 +05:30
|
|
|
|
2022-04-26 21:34:05 +05:30
|
|
|
- os: ubuntu-20.04
|
2022-05-17 02:24:32 +05:30
|
|
|
qt_ver: 6
|
|
|
|
qt_host: linux
|
2022-10-30 19:33:40 +05:30
|
|
|
qt_arch: ''
|
2022-07-17 23:18:10 +05:30
|
|
|
qt_version: '6.2.4'
|
2022-05-17 02:24:32 +05:30
|
|
|
qt_modules: 'qt5compat qtimageformats'
|
2022-10-26 06:14:31 +05:30
|
|
|
qt_tools: ''
|
2022-04-26 21:34:05 +05:30
|
|
|
|
2022-03-17 21:25:45 +05:30
|
|
|
- os: windows-2022
|
2022-11-26 13:11:41 +05:30
|
|
|
name: "Windows-MinGW-w64"
|
2022-10-28 00:35:32 +05:30
|
|
|
msystem: clang64
|
2022-03-21 23:41:55 +05:30
|
|
|
|
2022-10-26 06:14:31 +05:30
|
|
|
- os: windows-2022
|
2022-11-26 13:11:41 +05:30
|
|
|
name: "Windows-MSVC-Legacy"
|
2022-10-26 06:14:31 +05:30
|
|
|
msystem: ''
|
2022-10-30 19:33:40 +05:30
|
|
|
architecture: 'win32'
|
2022-10-31 20:13:14 +05:30
|
|
|
vcvars_arch: 'amd64_x86'
|
2022-10-26 06:14:31 +05:30
|
|
|
qt_ver: 5
|
|
|
|
qt_host: windows
|
2022-10-30 19:33:40 +05:30
|
|
|
qt_arch: 'win32_msvc2019'
|
2022-10-26 06:14:31 +05:30
|
|
|
qt_version: '5.15.2'
|
|
|
|
qt_modules: ''
|
|
|
|
qt_tools: 'tools_openssl_x86'
|
|
|
|
|
|
|
|
- os: windows-2022
|
|
|
|
name: "Windows-MSVC"
|
|
|
|
msystem: ''
|
2022-10-30 19:33:40 +05:30
|
|
|
architecture: 'x64'
|
2022-10-31 20:13:14 +05:30
|
|
|
vcvars_arch: 'amd64'
|
2022-10-26 06:14:31 +05:30
|
|
|
qt_ver: 6
|
|
|
|
qt_host: windows
|
2022-10-30 19:33:40 +05:30
|
|
|
qt_arch: ''
|
2023-01-08 15:04:45 +05:30
|
|
|
qt_version: '6.4.2'
|
2022-10-26 06:14:31 +05:30
|
|
|
qt_modules: 'qt5compat qtimageformats'
|
|
|
|
qt_tools: ''
|
|
|
|
|
2022-11-05 12:55:10 +05:30
|
|
|
- os: windows-2022
|
|
|
|
name: "Windows-MSVC-arm64"
|
|
|
|
msystem: ''
|
|
|
|
architecture: 'arm64'
|
|
|
|
vcvars_arch: 'amd64_arm64'
|
|
|
|
qt_ver: 6
|
|
|
|
qt_host: windows
|
|
|
|
qt_arch: 'win64_msvc2019_arm64'
|
2023-01-08 15:04:45 +05:30
|
|
|
qt_version: '6.4.2'
|
2022-11-05 12:55:10 +05:30
|
|
|
qt_modules: 'qt5compat qtimageformats'
|
|
|
|
qt_tools: ''
|
|
|
|
|
2022-06-12 22:43:19 +05:30
|
|
|
- os: macos-12
|
2022-10-01 12:49:59 +05:30
|
|
|
name: macOS
|
2022-09-13 03:11:13 +05:30
|
|
|
macosx_deployment_target: 10.15
|
2022-05-17 02:24:32 +05:30
|
|
|
qt_ver: 6
|
|
|
|
qt_host: mac
|
2022-10-30 19:33:40 +05:30
|
|
|
qt_arch: ''
|
2022-08-02 13:49:47 +05:30
|
|
|
qt_version: '6.3.0'
|
2022-05-17 02:24:32 +05:30
|
|
|
qt_modules: 'qt5compat qtimageformats'
|
2022-10-26 06:14:31 +05:30
|
|
|
qt_tools: ''
|
2022-02-02 11:58:00 +05:30
|
|
|
|
2022-10-01 12:49:59 +05:30
|
|
|
- os: macos-12
|
|
|
|
name: macOS-Legacy
|
|
|
|
macosx_deployment_target: 10.13
|
|
|
|
qt_ver: 5
|
|
|
|
qt_host: mac
|
|
|
|
qt_version: '5.15.2'
|
|
|
|
qt_modules: ''
|
2022-10-26 06:14:31 +05:30
|
|
|
qt_tools: ''
|
2022-10-01 12:49:59 +05:30
|
|
|
|
2022-02-02 11:58:00 +05:30
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
env:
|
2022-02-07 01:05:50 +05:30
|
|
|
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macosx_deployment_target }}
|
|
|
|
INSTALL_DIR: "install"
|
2022-03-23 18:22:37 +05:30
|
|
|
INSTALL_PORTABLE_DIR: "install-portable"
|
|
|
|
INSTALL_APPIMAGE_DIR: "install-appdir"
|
2022-02-07 01:05:50 +05:30
|
|
|
BUILD_DIR: "build"
|
2022-05-22 13:42:33 +05:30
|
|
|
CCACHE_VAR: ""
|
2022-02-02 11:58:00 +05:30
|
|
|
|
|
|
|
steps:
|
2022-03-23 18:22:37 +05:30
|
|
|
##
|
|
|
|
# PREPARE
|
|
|
|
##
|
2022-02-12 10:00:13 +05:30
|
|
|
- name: Checkout
|
2022-03-23 18:03:18 +05:30
|
|
|
uses: actions/checkout@v3
|
2022-02-12 10:00:13 +05:30
|
|
|
with:
|
|
|
|
submodules: 'true'
|
|
|
|
|
2022-03-17 21:25:45 +05:30
|
|
|
- name: 'Setup MSYS2'
|
2022-10-26 06:14:31 +05:30
|
|
|
if: runner.os == 'Windows' && matrix.msystem != ''
|
2022-03-17 21:25:45 +05:30
|
|
|
uses: msys2/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
msystem: ${{ matrix.msystem }}
|
|
|
|
update: true
|
|
|
|
install: >-
|
|
|
|
git
|
2022-10-23 16:27:29 +05:30
|
|
|
mingw-w64-x86_64-binutils
|
2022-03-17 21:25:45 +05:30
|
|
|
pacboy: >-
|
|
|
|
toolchain:p
|
|
|
|
cmake:p
|
2022-06-12 17:06:55 +05:30
|
|
|
extra-cmake-modules:p
|
2022-03-17 21:25:45 +05:30
|
|
|
ninja:p
|
2022-11-30 18:22:02 +05:30
|
|
|
qt6-base:p
|
|
|
|
qt6-svg:p
|
|
|
|
qt6-imageformats:p
|
|
|
|
quazip-qt6:p
|
2022-04-29 05:04:26 +05:30
|
|
|
ccache:p
|
2022-11-30 18:22:02 +05:30
|
|
|
qt6-5compat:p
|
2022-04-29 05:04:26 +05:30
|
|
|
|
2022-10-26 06:14:31 +05:30
|
|
|
- name: Force newer ccache
|
|
|
|
if: runner.os == 'Windows' && matrix.msystem == '' && inputs.build_type == 'Debug'
|
|
|
|
run: |
|
|
|
|
choco install ccache --version 4.7.1
|
|
|
|
|
2022-04-29 05:04:26 +05:30
|
|
|
- name: Setup ccache
|
2022-10-26 06:14:31 +05:30
|
|
|
if: (runner.os != 'Windows' || matrix.msystem == '') && inputs.build_type == 'Debug'
|
2023-01-09 04:10:41 +05:30
|
|
|
uses: hendrikmuhs/ccache-action@v1.2.6
|
2022-04-29 05:04:26 +05:30
|
|
|
with:
|
2022-11-05 12:55:10 +05:30
|
|
|
key: ${{ matrix.os }}-qt${{ matrix.qt_ver }}-${{ matrix.architecture }}
|
2022-04-29 05:04:26 +05:30
|
|
|
|
2022-10-26 06:14:31 +05:30
|
|
|
- name: Setup ccache (Windows MinGW-w64)
|
|
|
|
if: runner.os == 'Windows' && matrix.msystem != '' && inputs.build_type == 'Debug'
|
2022-04-29 05:04:26 +05:30
|
|
|
shell: msys2 {0}
|
|
|
|
run: |
|
|
|
|
ccache --set-config=cache_dir='${{ github.workspace }}\.ccache'
|
|
|
|
ccache --set-config=max_size='500M'
|
|
|
|
ccache --set-config=compression=true
|
|
|
|
ccache -p # Show config
|
|
|
|
ccache -z # Zero stats
|
|
|
|
|
2022-05-22 13:42:33 +05:30
|
|
|
- name: Use ccache on Debug builds only
|
|
|
|
if: inputs.build_type == 'Debug'
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
echo "CCACHE_VAR=ccache" >> $GITHUB_ENV
|
|
|
|
|
2022-10-26 06:14:31 +05:30
|
|
|
- name: Retrieve ccache cache (Windows MinGW-w64)
|
|
|
|
if: runner.os == 'Windows' && matrix.msystem != '' && inputs.build_type == 'Debug'
|
2023-01-09 13:24:22 +05:30
|
|
|
uses: actions/cache@v3.2.3
|
2022-04-29 05:04:26 +05:30
|
|
|
with:
|
|
|
|
path: '${{ github.workspace }}\.ccache'
|
2022-11-30 18:22:02 +05:30
|
|
|
key: ${{ matrix.os }}-mingw-w64
|
2022-04-29 05:04:26 +05:30
|
|
|
restore-keys: |
|
2022-11-30 18:22:02 +05:30
|
|
|
${{ matrix.os }}-mingw-w64
|
2022-02-12 09:09:36 +05:30
|
|
|
|
2022-03-19 02:58:52 +05:30
|
|
|
- name: Set short version
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
ver_short=`git rev-parse --short HEAD`
|
|
|
|
echo "VERSION=$ver_short" >> $GITHUB_ENV
|
|
|
|
|
2022-05-17 02:24:32 +05:30
|
|
|
- name: Install Dependencies (Linux)
|
|
|
|
if: runner.os == 'Linux'
|
2022-04-17 13:23:30 +05:30
|
|
|
run: |
|
2022-05-17 02:24:32 +05:30
|
|
|
sudo apt-get -y update
|
2022-07-11 14:30:46 +05:30
|
|
|
sudo apt-get -y install ninja-build extra-cmake-modules scdoc
|
2022-05-21 07:27:37 +05:30
|
|
|
|
2022-05-17 02:24:32 +05:30
|
|
|
- name: Install Dependencies (macOS)
|
|
|
|
if: runner.os == 'macOS'
|
2022-04-26 21:34:05 +05:30
|
|
|
run: |
|
2022-05-17 02:24:32 +05:30
|
|
|
brew update
|
|
|
|
brew install ninja extra-cmake-modules
|
2022-02-02 11:58:00 +05:30
|
|
|
|
2022-03-23 18:22:37 +05:30
|
|
|
- name: Install Qt (Linux)
|
2022-07-17 23:18:10 +05:30
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver != 6
|
2022-02-22 20:11:17 +05:30
|
|
|
run: |
|
2022-07-15 12:39:17 +05:30
|
|
|
sudo apt-get -y install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5core5a libqt5network5 libqt5gui5
|
2022-11-05 12:55:10 +05:30
|
|
|
|
|
|
|
- name: Install host Qt (Windows MSVC arm64)
|
|
|
|
if: runner.os == 'Windows' && matrix.architecture == 'arm64'
|
|
|
|
uses: jurplel/install-qt-action@v3
|
|
|
|
with:
|
|
|
|
version: ${{ matrix.qt_version }}
|
|
|
|
host: 'windows'
|
|
|
|
target: 'desktop'
|
|
|
|
arch: ''
|
|
|
|
modules: ${{ matrix.qt_modules }}
|
|
|
|
tools: ${{ matrix.qt_tools }}
|
|
|
|
cache: ${{ inputs.is_qt_cached }}
|
|
|
|
cache-key-prefix: host-qt-arm64-windows
|
|
|
|
dir: ${{ github.workspace }}\HostQt
|
|
|
|
set-env: false
|
|
|
|
|
|
|
|
- name: Install Qt (macOS, Linux, Qt 6 & Windows MSVC)
|
2022-10-26 06:14:31 +05:30
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver == 6 || runner.os == 'macOS' || (runner.os == 'Windows' && matrix.msystem == '')
|
2022-09-06 18:50:46 +05:30
|
|
|
uses: jurplel/install-qt-action@v3
|
2022-05-17 02:24:32 +05:30
|
|
|
with:
|
|
|
|
version: ${{ matrix.qt_version }}
|
|
|
|
host: ${{ matrix.qt_host }}
|
|
|
|
target: 'desktop'
|
2022-10-30 19:33:40 +05:30
|
|
|
arch: ${{ matrix.qt_arch }}
|
2022-05-17 02:24:32 +05:30
|
|
|
modules: ${{ matrix.qt_modules }}
|
2022-10-26 06:14:31 +05:30
|
|
|
tools: ${{ matrix.qt_tools }}
|
2022-11-10 00:26:38 +05:30
|
|
|
cache: ${{ inputs.is_qt_cached }}
|
2022-02-02 11:58:00 +05:30
|
|
|
|
2022-11-05 12:55:10 +05:30
|
|
|
- name: Install MSVC (Windows MSVC)
|
|
|
|
if: runner.os == 'Windows' && matrix.msystem == ''
|
|
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
with:
|
|
|
|
vsversion: 2022
|
|
|
|
arch: ${{ matrix.vcvars_arch }}
|
|
|
|
|
2022-03-23 18:22:37 +05:30
|
|
|
- name: Prepare AppImage (Linux)
|
2022-07-17 23:18:10 +05:30
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver != 5
|
2022-02-07 17:49:58 +05:30
|
|
|
run: |
|
|
|
|
wget "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
|
|
|
|
wget "https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage"
|
|
|
|
wget "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage"
|
|
|
|
|
|
|
|
${{ github.workspace }}/.github/scripts/prepare_JREs.sh
|
|
|
|
|
2022-11-05 12:55:10 +05:30
|
|
|
- name: Add QT_HOST_PATH var (Windows MSVC arm64)
|
|
|
|
if: runner.os == 'Windows' && matrix.architecture == 'arm64'
|
|
|
|
run: |
|
|
|
|
echo "QT_HOST_PATH=${{ github.workspace }}\HostQt\Qt\${{ matrix.qt_version }}\msvc2019_64" >> $env:GITHUB_ENV
|
|
|
|
|
2022-03-23 18:22:37 +05:30
|
|
|
##
|
|
|
|
# CONFIGURE
|
|
|
|
##
|
|
|
|
|
|
|
|
- name: Configure CMake (macOS)
|
2022-10-01 12:49:59 +05:30
|
|
|
if: runner.os == 'macOS' && matrix.qt_ver == 6
|
2022-03-17 21:25:45 +05:30
|
|
|
run: |
|
2022-10-01 12:49:59 +05:30
|
|
|
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=${{ matrix.name }} -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DLauncher_QT_VERSION_MAJOR=${{ matrix.qt_ver }} -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -G Ninja
|
|
|
|
|
|
|
|
- name: Configure CMake (macOS-Legacy)
|
|
|
|
if: runner.os == 'macOS' && matrix.qt_ver == 5
|
|
|
|
run: |
|
2022-10-14 17:42:51 +05:30
|
|
|
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=${{ matrix.name }} -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DLauncher_QT_VERSION_MAJOR=${{ matrix.qt_ver }} -DMACOSX_SPARKLE_UPDATE_PUBLIC_KEY="" -DMACOSX_SPARKLE_UPDATE_FEED_URL="" -G Ninja
|
2022-03-17 21:25:45 +05:30
|
|
|
|
2022-10-26 06:14:31 +05:30
|
|
|
- name: Configure CMake (Windows MinGW-w64)
|
|
|
|
if: runner.os == 'Windows' && matrix.msystem != ''
|
2022-03-17 21:25:45 +05:30
|
|
|
shell: msys2 {0}
|
2022-02-07 01:05:50 +05:30
|
|
|
run: |
|
2022-11-30 18:22:02 +05:30
|
|
|
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=${{ matrix.name }} -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DLauncher_QT_VERSION_MAJOR=6 -DCMAKE_OBJDUMP=/mingw64/bin/objdump.exe -G Ninja
|
2022-03-21 23:59:33 +05:30
|
|
|
|
2022-10-26 06:14:31 +05:30
|
|
|
- name: Configure CMake (Windows MSVC)
|
|
|
|
if: runner.os == 'Windows' && matrix.msystem == ''
|
|
|
|
run: |
|
2022-11-24 00:23:55 +05:30
|
|
|
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=${{ matrix.name }} -DLauncher_QT_VERSION_MAJOR=${{ matrix.qt_ver }} -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDLL" -A${{ matrix.architecture}} -DLauncher_FORCE_BUNDLED_LIBS=ON
|
2022-10-28 16:21:55 +05:30
|
|
|
# https://github.com/ccache/ccache/wiki/MS-Visual-Studio (I coudn't figure out the compiler prefix)
|
|
|
|
if ("${{ env.CCACHE_VAR }}")
|
|
|
|
{
|
|
|
|
Copy-Item C:/ProgramData/chocolatey/lib/ccache/tools/ccache-4.7.1-windows-x86_64/ccache.exe -Destination C:/ProgramData/chocolatey/lib/ccache/tools/ccache-4.7.1-windows-x86_64/cl.exe
|
|
|
|
echo "CLToolExe=cl.exe" >> $env:GITHUB_ENV
|
|
|
|
echo "CLToolPath=C:/ProgramData/chocolatey/lib/ccache/tools/ccache-4.7.1-windows-x86_64/" >> $env:GITHUB_ENV
|
|
|
|
echo "TrackFileAccess=false" >> $env:GITHUB_ENV
|
|
|
|
}
|
|
|
|
# Needed for ccache, but also speeds up compile
|
|
|
|
echo "UseMultiToolTask=true" >> $env:GITHUB_ENV
|
2022-10-26 06:14:31 +05:30
|
|
|
|
2022-03-23 18:22:37 +05:30
|
|
|
- name: Configure CMake (Linux)
|
|
|
|
if: runner.os == 'Linux'
|
2022-03-21 23:59:33 +05:30
|
|
|
run: |
|
2022-05-17 02:24:32 +05:30
|
|
|
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=Linux -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DLauncher_QT_VERSION_MAJOR=${{ matrix.qt_ver }} -G Ninja
|
2022-02-07 01:05:50 +05:30
|
|
|
|
2022-03-23 18:22:37 +05:30
|
|
|
##
|
|
|
|
# BUILD
|
|
|
|
##
|
2022-03-25 17:43:50 +05:30
|
|
|
|
2022-02-02 11:58:00 +05:30
|
|
|
- name: Build
|
2022-10-28 16:21:55 +05:30
|
|
|
if: runner.os != 'Windows'
|
2022-03-17 21:25:45 +05:30
|
|
|
run: |
|
|
|
|
cmake --build ${{ env.BUILD_DIR }}
|
|
|
|
|
2022-10-26 06:14:31 +05:30
|
|
|
- name: Build (Windows MinGW-w64)
|
|
|
|
if: runner.os == 'Windows' && matrix.msystem != ''
|
2022-03-17 21:25:45 +05:30
|
|
|
shell: msys2 {0}
|
2022-02-02 11:58:00 +05:30
|
|
|
run: |
|
2022-02-07 01:05:50 +05:30
|
|
|
cmake --build ${{ env.BUILD_DIR }}
|
2022-02-02 11:58:00 +05:30
|
|
|
|
2022-10-28 16:21:55 +05:30
|
|
|
- name: Build (Windows MSVC)
|
|
|
|
if: runner.os == 'Windows' && matrix.msystem == ''
|
|
|
|
run: |
|
|
|
|
cmake --build ${{ env.BUILD_DIR }} --config ${{ inputs.build_type }}
|
|
|
|
|
2022-06-04 17:55:01 +05:30
|
|
|
##
|
|
|
|
# TEST
|
|
|
|
##
|
|
|
|
|
|
|
|
- name: Test
|
2022-10-28 16:21:55 +05:30
|
|
|
if: runner.os != 'Windows'
|
2022-06-04 17:55:01 +05:30
|
|
|
run: |
|
2022-10-26 06:14:30 +05:30
|
|
|
ctest -E "^example64|example$" --test-dir build --output-on-failure
|
2022-06-04 17:55:01 +05:30
|
|
|
|
2022-10-26 06:14:31 +05:30
|
|
|
- name: Test (Windows MinGW-w64)
|
|
|
|
if: runner.os == 'Windows' && matrix.msystem != ''
|
2022-06-04 17:55:01 +05:30
|
|
|
shell: msys2 {0}
|
|
|
|
run: |
|
2022-10-26 06:14:30 +05:30
|
|
|
ctest -E "^example64|example$" --test-dir build --output-on-failure
|
2022-06-04 17:55:01 +05:30
|
|
|
|
2022-10-28 16:21:55 +05:30
|
|
|
- name: Test (Windows MSVC)
|
2022-11-05 12:55:10 +05:30
|
|
|
if: runner.os == 'Windows' && matrix.msystem == '' && matrix.architecture != 'arm64'
|
2022-10-28 16:21:55 +05:30
|
|
|
run: |
|
|
|
|
ctest -E "^example64|example$" --test-dir build --output-on-failure -C ${{ inputs.build_type }}
|
|
|
|
|
2022-03-23 18:22:37 +05:30
|
|
|
##
|
|
|
|
# PACKAGE BUILDS
|
|
|
|
##
|
|
|
|
|
|
|
|
- name: Package (macOS)
|
|
|
|
if: runner.os == 'macOS'
|
2022-03-17 21:25:45 +05:30
|
|
|
run: |
|
|
|
|
cmake --install ${{ env.BUILD_DIR }}
|
|
|
|
|
2022-03-23 18:22:37 +05:30
|
|
|
cd ${{ env.INSTALL_DIR }}
|
2022-10-25 13:04:07 +05:30
|
|
|
chmod +x "PrismLauncher.app/Contents/MacOS/prismlauncher"
|
|
|
|
sudo codesign --sign - --deep --force --entitlements "../program_info/App.entitlements" --options runtime "PrismLauncher.app/Contents/MacOS/prismlauncher"
|
|
|
|
mv "PrismLauncher.app" "Prism Launcher.app"
|
2022-10-18 13:43:44 +05:30
|
|
|
tar -czf ../PrismLauncher.tar.gz *
|
2022-03-23 18:22:37 +05:30
|
|
|
|
2022-05-21 07:27:37 +05:30
|
|
|
- name: Make Sparkle signature (macOS)
|
2022-10-14 17:42:51 +05:30
|
|
|
if: matrix.name == 'macOS'
|
2022-05-21 07:27:37 +05:30
|
|
|
run: |
|
|
|
|
if [ '${{ secrets.SPARKLE_ED25519_KEY }}' != '' ]; then
|
|
|
|
echo '${{ secrets.SPARKLE_ED25519_KEY }}' > ed25519-priv.pem
|
2023-01-10 19:30:39 +05:30
|
|
|
signature=$(openssl pkeyutl -sign -rawin -in ${{ github.workspace }}/PrismLauncher.tar.gz -inkey ed25519-priv.pem | openssl base64 | tr -d \\n)
|
2022-05-21 07:27:37 +05:30
|
|
|
rm ed25519-priv.pem
|
|
|
|
cat >> $GITHUB_STEP_SUMMARY << EOF
|
2022-05-21 22:53:02 +05:30
|
|
|
### Artifact Information :information_source:
|
|
|
|
- :memo: Sparkle Signature (ed25519): \`$signature\`
|
2022-05-21 07:27:37 +05:30
|
|
|
EOF
|
|
|
|
else
|
|
|
|
cat >> $GITHUB_STEP_SUMMARY << EOF
|
2022-05-21 22:53:02 +05:30
|
|
|
### Artifact Information :information_source:
|
|
|
|
- :warning: Sparkle Signature (ed25519): No private key available (likely a pull request or fork)
|
2022-05-21 07:27:37 +05:30
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
2022-10-26 06:14:31 +05:30
|
|
|
- name: Package (Windows MinGW-w64)
|
|
|
|
if: runner.os == 'Windows' && matrix.msystem != ''
|
2022-03-17 21:25:45 +05:30
|
|
|
shell: msys2 {0}
|
2022-02-07 01:05:50 +05:30
|
|
|
run: |
|
|
|
|
cmake --install ${{ env.BUILD_DIR }}
|
|
|
|
|
2022-10-26 06:14:31 +05:30
|
|
|
- name: Package (Windows MSVC)
|
|
|
|
if: runner.os == 'Windows' && matrix.msystem == ''
|
|
|
|
run: |
|
2022-10-28 16:21:55 +05:30
|
|
|
cmake --install ${{ env.BUILD_DIR }} --config ${{ inputs.build_type }}
|
2022-10-26 06:14:31 +05:30
|
|
|
|
|
|
|
cd ${{ env.INSTALL_DIR }}
|
|
|
|
if ("${{ matrix.qt_ver }}" -eq "5")
|
|
|
|
{
|
|
|
|
Copy-Item D:/a/PrismLauncher/Qt/Tools/OpenSSL/Win_x86/bin/libcrypto-1_1.dll -Destination libcrypto-1_1.dll
|
|
|
|
Copy-Item D:/a/PrismLauncher/Qt/Tools/OpenSSL/Win_x86/bin/libssl-1_1.dll -Destination libssl-1_1.dll
|
|
|
|
}
|
|
|
|
|
|
|
|
- name: Package (Windows MinGW-w64, portable)
|
|
|
|
if: runner.os == 'Windows' && matrix.msystem != ''
|
2022-03-23 18:22:37 +05:30
|
|
|
shell: msys2 {0}
|
2022-02-02 11:58:00 +05:30
|
|
|
run: |
|
2022-03-23 18:22:37 +05:30
|
|
|
cp -r ${{ env.INSTALL_DIR }} ${{ env.INSTALL_PORTABLE_DIR }} # cmake install on Windows is slow, let's just copy instead
|
|
|
|
cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_PORTABLE_DIR }} --component portable
|
2022-02-07 01:05:50 +05:30
|
|
|
|
2022-10-26 06:14:31 +05:30
|
|
|
- name: Package (Windows MSVC, portable)
|
|
|
|
if: runner.os == 'Windows' && matrix.msystem == ''
|
|
|
|
run: |
|
|
|
|
cp -r ${{ env.INSTALL_DIR }} ${{ env.INSTALL_PORTABLE_DIR }} # cmake install on Windows is slow, let's just copy instead
|
|
|
|
cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_PORTABLE_DIR }} --component portable
|
|
|
|
|
2022-05-15 05:21:23 +05:30
|
|
|
- name: Package (Windows, installer)
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
run: |
|
2022-05-21 02:42:08 +05:30
|
|
|
cd ${{ env.INSTALL_DIR }}
|
2022-05-30 03:07:45 +05:30
|
|
|
makensis -NOCD "${{ github.workspace }}/${{ env.BUILD_DIR }}/program_info/win_install.nsi"
|
2022-05-15 05:21:23 +05:30
|
|
|
|
2022-03-23 18:22:37 +05:30
|
|
|
- name: Package (Linux)
|
2022-07-17 23:18:10 +05:30
|
|
|
if: runner.os == 'Linux'
|
2022-03-25 17:43:50 +05:30
|
|
|
run: |
|
2022-03-23 18:22:37 +05:30
|
|
|
cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_DIR }}
|
|
|
|
|
|
|
|
cd ${{ env.INSTALL_DIR }}
|
2022-10-18 13:43:44 +05:30
|
|
|
tar --owner root --group root -czf ../PrismLauncher.tar.gz *
|
2022-03-23 18:22:37 +05:30
|
|
|
|
|
|
|
- name: Package (Linux, portable)
|
2022-07-17 23:18:10 +05:30
|
|
|
if: runner.os == 'Linux'
|
2022-03-23 18:22:37 +05:30
|
|
|
run: |
|
|
|
|
cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_PORTABLE_DIR }}
|
|
|
|
cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_PORTABLE_DIR }} --component portable
|
|
|
|
|
|
|
|
cd ${{ env.INSTALL_PORTABLE_DIR }}
|
2022-10-18 13:43:44 +05:30
|
|
|
tar -czf ../PrismLauncher-portable.tar.gz *
|
2022-03-25 17:43:50 +05:30
|
|
|
|
2022-03-23 18:22:37 +05:30
|
|
|
- name: Package AppImage (Linux)
|
2022-07-17 23:18:10 +05:30
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver != 5
|
2022-02-07 01:05:50 +05:30
|
|
|
shell: bash
|
|
|
|
run: |
|
2022-03-23 18:22:37 +05:30
|
|
|
cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_APPIMAGE_DIR }}/usr
|
|
|
|
|
2022-10-18 13:43:44 +05:30
|
|
|
export OUTPUT="PrismLauncher-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage"
|
2022-02-07 18:41:42 +05:30
|
|
|
|
2022-02-07 01:05:50 +05:30
|
|
|
chmod +x linuxdeploy-*.AppImage
|
2022-02-07 18:41:42 +05:30
|
|
|
|
2022-03-23 18:22:37 +05:30
|
|
|
mkdir -p ${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib/jvm/java-{8,17}-openjdk
|
2022-05-17 02:24:32 +05:30
|
|
|
mkdir -p ${{ env.INSTALL_APPIMAGE_DIR }}/usr/plugins/iconengines
|
2022-02-07 18:41:42 +05:30
|
|
|
|
2022-03-23 18:22:37 +05:30
|
|
|
cp -r ${{ github.workspace }}/JREs/jre8/* ${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib/jvm/java-8-openjdk
|
2022-02-07 18:41:42 +05:30
|
|
|
|
2022-03-23 18:22:37 +05:30
|
|
|
cp -r ${{ github.workspace }}/JREs/jre17/* ${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib/jvm/java-17-openjdk
|
2022-02-07 18:41:42 +05:30
|
|
|
|
2022-10-18 13:43:44 +05:30
|
|
|
cp -r /home/runner/work/PrismLauncher/Qt/${{ matrix.qt_version }}/gcc_64/plugins/iconengines/* ${{ env.INSTALL_APPIMAGE_DIR }}/usr/plugins/iconengines
|
2022-08-01 13:00:26 +05:30
|
|
|
|
|
|
|
cp /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 ${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib/
|
|
|
|
cp /usr/lib/x86_64-linux-gnu/libssl.so.1.1 ${{ env.INSTALL_APPIMAGE_DIR }}//usr/lib/
|
2022-05-17 02:24:32 +05:30
|
|
|
|
2022-03-23 18:22:37 +05:30
|
|
|
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib"
|
|
|
|
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib/jvm/java-8-openjdk/lib/amd64/server"
|
|
|
|
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib/jvm/java-8-openjdk/lib/amd64"
|
|
|
|
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib/jvm/java-17-openjdk/lib/server"
|
|
|
|
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib/jvm/java-17-openjdk/lib"
|
|
|
|
export LD_LIBRARY_PATH
|
2022-02-07 01:05:50 +05:30
|
|
|
|
2022-10-18 13:43:44 +05:30
|
|
|
./linuxdeploy-x86_64.AppImage --appdir ${{ env.INSTALL_APPIMAGE_DIR }} --output appimage --plugin qt -i ${{ env.INSTALL_APPIMAGE_DIR }}/usr/share/icons/hicolor/scalable/apps/org.prismlauncher.PrismLauncher.svg
|
2022-02-02 11:58:00 +05:30
|
|
|
|
2022-03-23 18:22:37 +05:30
|
|
|
##
|
|
|
|
# UPLOAD BUILDS
|
|
|
|
##
|
2022-02-02 11:58:00 +05:30
|
|
|
|
2022-03-23 18:22:37 +05:30
|
|
|
- name: Upload binary tarball (macOS)
|
2022-02-02 11:58:00 +05:30
|
|
|
if: runner.os == 'macOS'
|
2022-03-23 18:22:37 +05:30
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-10-18 13:43:44 +05:30
|
|
|
name: PrismLauncher-${{ matrix.name }}-${{ env.VERSION }}-${{ inputs.build_type }}
|
|
|
|
path: PrismLauncher.tar.gz
|
2022-02-02 11:58:00 +05:30
|
|
|
|
2022-03-23 18:22:37 +05:30
|
|
|
- name: Upload binary zip (Windows)
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-10-18 13:43:44 +05:30
|
|
|
name: PrismLauncher-${{ matrix.name }}-${{ env.VERSION }}-${{ inputs.build_type }}
|
2022-03-23 18:22:37 +05:30
|
|
|
path: ${{ env.INSTALL_DIR }}/**
|
2022-02-20 01:16:43 +05:30
|
|
|
|
2022-03-23 18:22:37 +05:30
|
|
|
- name: Upload binary zip (Windows, portable)
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-10-18 13:43:44 +05:30
|
|
|
name: PrismLauncher-${{ matrix.name }}-Portable-${{ env.VERSION }}-${{ inputs.build_type }}
|
2022-03-23 18:22:37 +05:30
|
|
|
path: ${{ env.INSTALL_PORTABLE_DIR }}/**
|
2022-03-25 17:43:50 +05:30
|
|
|
|
2022-05-15 05:21:23 +05:30
|
|
|
- name: Upload installer (Windows)
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-10-18 13:43:44 +05:30
|
|
|
name: PrismLauncher-${{ matrix.name }}-Setup-${{ env.VERSION }}-${{ inputs.build_type }}
|
|
|
|
path: PrismLauncher-Setup.exe
|
2022-05-15 05:21:23 +05:30
|
|
|
|
2022-07-17 23:18:10 +05:30
|
|
|
- name: Upload binary tarball (Linux, Qt 5)
|
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver != 6
|
2022-03-23 18:03:18 +05:30
|
|
|
uses: actions/upload-artifact@v3
|
2022-02-20 01:16:43 +05:30
|
|
|
with:
|
2022-10-18 13:43:44 +05:30
|
|
|
name: PrismLauncher-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}
|
|
|
|
path: PrismLauncher.tar.gz
|
2022-02-20 01:16:43 +05:30
|
|
|
|
2022-07-17 23:18:10 +05:30
|
|
|
- name: Upload binary tarball (Linux, portable, Qt 5)
|
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver != 6
|
2022-03-25 17:43:50 +05:30
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-10-18 13:43:44 +05:30
|
|
|
name: PrismLauncher-${{ runner.os }}-Portable-${{ env.VERSION }}-${{ inputs.build_type }}
|
|
|
|
path: PrismLauncher-portable.tar.gz
|
2022-03-25 17:43:50 +05:30
|
|
|
|
2022-07-17 23:18:10 +05:30
|
|
|
- name: Upload binary tarball (Linux, Qt 6)
|
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver !=5
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-10-18 13:43:44 +05:30
|
|
|
name: PrismLauncher-${{ runner.os }}-Qt6-${{ env.VERSION }}-${{ inputs.build_type }}
|
|
|
|
path: PrismLauncher.tar.gz
|
2022-07-17 23:18:10 +05:30
|
|
|
|
|
|
|
- name: Upload binary tarball (Linux, portable, Qt 6)
|
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver != 5
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-10-18 13:43:44 +05:30
|
|
|
name: PrismLauncher-${{ runner.os }}-Qt6-Portable-${{ env.VERSION }}-${{ inputs.build_type }}
|
|
|
|
path: PrismLauncher-portable.tar.gz
|
2022-07-17 23:18:10 +05:30
|
|
|
|
2022-03-23 18:22:37 +05:30
|
|
|
- name: Upload AppImage (Linux)
|
2022-07-17 23:18:10 +05:30
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver != 5
|
2022-03-23 18:03:18 +05:30
|
|
|
uses: actions/upload-artifact@v3
|
2022-02-07 01:05:50 +05:30
|
|
|
with:
|
2022-10-18 13:43:44 +05:30
|
|
|
name: PrismLauncher-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage
|
|
|
|
path: PrismLauncher-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage
|
2022-10-26 16:41:19 +05:30
|
|
|
snap:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-11-19 21:44:19 +05:30
|
|
|
if: inputs.build_type == 'Debug'
|
2022-10-26 16:41:19 +05:30
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: 'true'
|
|
|
|
- name: Set short version
|
|
|
|
shell: bash
|
2022-11-14 21:59:41 +05:30
|
|
|
if: inputs.build_type == 'Debug'
|
2022-10-26 16:41:19 +05:30
|
|
|
run: |
|
|
|
|
ver_short=`git rev-parse --short HEAD`
|
|
|
|
echo "VERSION=$ver_short" >> $GITHUB_ENV
|
|
|
|
- name: Package Snap (Linux)
|
|
|
|
id: snapcraft
|
2022-11-14 21:59:41 +05:30
|
|
|
if: inputs.build_type == 'Debug'
|
2022-10-26 16:41:19 +05:30
|
|
|
uses: snapcore/action-build@v1
|
|
|
|
- name: Upload Snap (Linux)
|
2022-11-14 21:59:41 +05:30
|
|
|
if: inputs.build_type == 'Debug'
|
2022-10-26 16:41:19 +05:30
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: prismlauncher_${{ env.VERSION }}_amd64.snap
|
|
|
|
path: ${{ steps.snapcraft.outputs.snap }}
|
2022-11-14 21:59:41 +05:30
|
|
|
|
|
|
|
flatpak:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: bilelmoussaoui/flatpak-github-actions:kde-5.15-22.08
|
|
|
|
options: --privileged
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
if: inputs.build_type == 'Debug'
|
|
|
|
with:
|
|
|
|
submodules: 'true'
|
|
|
|
- name: Build Flatpak (Linux)
|
|
|
|
if: inputs.build_type == 'Debug'
|
2022-12-24 21:50:44 +05:30
|
|
|
uses: flatpak/flatpak-github-actions/flatpak-builder@v5
|
2022-11-14 21:59:41 +05:30
|
|
|
with:
|
|
|
|
bundle: "Prism Launcher.flatpak"
|
|
|
|
manifest-path: flatpak/org.prismlauncher.PrismLauncher.yml
|
2022-11-21 04:32:41 +05:30
|
|
|
|
|
|
|
nix:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
package:
|
|
|
|
- prismlauncher
|
|
|
|
- prismlauncher-qt5
|
|
|
|
steps:
|
|
|
|
- name: Clone repository
|
|
|
|
if: inputs.build_type == 'Debug'
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: 'true'
|
|
|
|
- name: Install nix
|
|
|
|
if: inputs.build_type == 'Debug'
|
|
|
|
uses: cachix/install-nix-action@v18
|
|
|
|
with:
|
|
|
|
install_url: https://nixos.org/nix/install
|
|
|
|
extra_nix_config: |
|
|
|
|
auto-optimise-store = true
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
- uses: cachix/cachix-action@v12
|
|
|
|
if: inputs.build_type == 'Debug'
|
|
|
|
with:
|
|
|
|
name: prismlauncher
|
|
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
|
|
- name: Build
|
|
|
|
if: inputs.build_type == 'Debug'
|
|
|
|
run: nix build .#${{ matrix.package }} --print-build-logs
|