2022-02-12 03:39:36 +00:00
|
|
|
name: Build
|
2022-02-02 06:28:00 +00:00
|
|
|
|
|
|
|
on:
|
2022-02-12 03:39:36 +00:00
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
build_type:
|
|
|
|
description: Type of build (Debug, Release, RelWithDebInfo, MinSizeRel)
|
|
|
|
type: string
|
|
|
|
default: Debug
|
2022-05-21 18:23:02 +01:00
|
|
|
secrets:
|
|
|
|
SPARKLE_ED25519_KEY:
|
|
|
|
description: Private key for signing Sparkle updates
|
|
|
|
required: false
|
2022-02-02 06:28:00 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
|
2022-02-19 19:46:43 +00:00
|
|
|
- os: ubuntu-20.04
|
2022-05-16 21:54:32 +01:00
|
|
|
qt_ver: 5
|
2022-02-19 19:46:43 +00:00
|
|
|
|
2022-04-26 17:04:05 +01:00
|
|
|
- os: ubuntu-20.04
|
2022-05-16 21:54:32 +01:00
|
|
|
qt_ver: 6
|
|
|
|
qt_host: linux
|
2022-07-17 18:48:10 +01:00
|
|
|
qt_version: '6.2.4'
|
2022-05-16 21:54:32 +01:00
|
|
|
qt_modules: 'qt5compat qtimageformats'
|
2022-04-26 17:04:05 +01:00
|
|
|
|
2022-02-02 06:28:00 +00:00
|
|
|
- os: windows-2022
|
2022-07-09 17:56:32 +01:00
|
|
|
name: "Windows-Legacy"
|
2022-10-28 06:54:17 +01:00
|
|
|
msystem: clang32
|
2022-05-16 21:54:32 +01:00
|
|
|
qt_ver: 5
|
2022-03-17 15:55:45 +00:00
|
|
|
|
|
|
|
- os: windows-2022
|
2022-07-09 17:56:32 +01:00
|
|
|
name: "Windows"
|
2022-10-28 06:54:17 +01:00
|
|
|
msystem: clang32
|
2022-07-09 07:59:43 +01:00
|
|
|
qt_ver: 6
|
2022-03-21 18:11:55 +00:00
|
|
|
|
2022-06-12 18:13:19 +01:00
|
|
|
- os: macos-12
|
2022-10-01 08:19:59 +01:00
|
|
|
name: macOS
|
2022-09-12 22:41:13 +01:00
|
|
|
macosx_deployment_target: 10.15
|
2022-05-16 21:54:32 +01:00
|
|
|
qt_ver: 6
|
|
|
|
qt_host: mac
|
2022-08-02 09:19:47 +01:00
|
|
|
qt_version: '6.3.0'
|
2022-05-16 21:54:32 +01:00
|
|
|
qt_modules: 'qt5compat qtimageformats'
|
2022-02-02 06:28:00 +00:00
|
|
|
|
2022-10-01 08:19:59 +01:00
|
|
|
- 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-02-02 06:28:00 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
env:
|
2022-02-06 19:35:50 +00:00
|
|
|
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macosx_deployment_target }}
|
|
|
|
INSTALL_DIR: "install"
|
2022-03-23 12:52:37 +00:00
|
|
|
INSTALL_PORTABLE_DIR: "install-portable"
|
|
|
|
INSTALL_APPIMAGE_DIR: "install-appdir"
|
2022-02-06 19:35:50 +00:00
|
|
|
BUILD_DIR: "build"
|
2022-05-22 09:12:33 +01:00
|
|
|
CCACHE_VAR: ""
|
2022-02-02 06:28:00 +00:00
|
|
|
|
|
|
|
steps:
|
2022-03-23 12:52:37 +00:00
|
|
|
##
|
|
|
|
# PREPARE
|
|
|
|
##
|
2022-02-12 04:30:13 +00:00
|
|
|
- name: Checkout
|
2022-03-23 12:33:18 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-02-12 04:30:13 +00:00
|
|
|
with:
|
|
|
|
submodules: 'true'
|
|
|
|
|
2022-10-02 11:20:28 +01:00
|
|
|
- name: Initialize CodeQL
|
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver == 6
|
|
|
|
uses: github/codeql-action/init@v2
|
|
|
|
with:
|
2022-10-02 14:30:38 +01:00
|
|
|
config-file: ./.github/codeql/codeql-config.yml
|
2022-10-02 14:11:06 +01:00
|
|
|
queries: security-and-quality
|
2022-10-02 11:20:28 +01:00
|
|
|
languages: cpp, java
|
|
|
|
|
2022-03-17 15:55:45 +00:00
|
|
|
- name: 'Setup MSYS2'
|
2022-02-10 15:28:31 +00:00
|
|
|
if: runner.os == 'Windows'
|
2022-03-17 15:55:45 +00:00
|
|
|
uses: msys2/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
msystem: ${{ matrix.msystem }}
|
|
|
|
update: true
|
|
|
|
install: >-
|
|
|
|
git
|
2022-10-28 06:54:17 +01:00
|
|
|
mingw-w64-x86_64-binutils
|
2022-03-17 15:55:45 +00:00
|
|
|
pacboy: >-
|
|
|
|
toolchain:p
|
|
|
|
cmake:p
|
2022-06-12 12:36:55 +01:00
|
|
|
extra-cmake-modules:p
|
2022-03-17 15:55:45 +00:00
|
|
|
ninja:p
|
2022-07-09 12:33:10 +01:00
|
|
|
qt${{ matrix.qt_ver }}-base:p
|
|
|
|
qt${{ matrix.qt_ver }}-svg:p
|
|
|
|
qt${{ matrix.qt_ver }}-imageformats:p
|
2022-07-09 12:57:34 +01:00
|
|
|
quazip-qt${{ matrix.qt_ver }}:p
|
2022-04-29 00:34:26 +01:00
|
|
|
ccache:p
|
2022-07-09 12:33:10 +01:00
|
|
|
${{ matrix.qt_ver == 6 && 'qt6-5compat:p' || '' }}
|
2022-04-29 00:34:26 +01:00
|
|
|
|
|
|
|
- name: Setup ccache
|
2022-04-30 16:12:11 +01:00
|
|
|
if: runner.os != 'Windows' && inputs.build_type == 'Debug'
|
2022-10-21 17:43:09 +01:00
|
|
|
uses: hendrikmuhs/ccache-action@v1.2.3
|
2022-04-29 00:34:26 +01:00
|
|
|
with:
|
2022-07-17 18:48:10 +01:00
|
|
|
key: ${{ matrix.os }}-qt${{ matrix.qt_ver }}
|
2022-04-29 00:34:26 +01:00
|
|
|
|
|
|
|
- name: Setup ccache (Windows)
|
2022-04-30 16:12:11 +01:00
|
|
|
if: runner.os == 'Windows' && inputs.build_type == 'Debug'
|
2022-04-29 00:34:26 +01:00
|
|
|
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 09:12:33 +01:00
|
|
|
- name: Use ccache on Debug builds only
|
|
|
|
if: inputs.build_type == 'Debug'
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
echo "CCACHE_VAR=ccache" >> $GITHUB_ENV
|
|
|
|
|
2022-04-29 00:34:26 +01:00
|
|
|
- name: Retrieve ccache cache (Windows)
|
2022-04-30 16:12:11 +01:00
|
|
|
if: runner.os == 'Windows' && inputs.build_type == 'Debug'
|
2022-10-21 17:42:48 +01:00
|
|
|
uses: actions/cache@v3.0.11
|
2022-04-29 00:34:26 +01:00
|
|
|
with:
|
|
|
|
path: '${{ github.workspace }}\.ccache'
|
2022-07-17 18:48:10 +01:00
|
|
|
key: ${{ matrix.os }}-qt${{ matrix.qt_ver }}
|
2022-04-29 00:34:26 +01:00
|
|
|
restore-keys: |
|
2022-07-17 18:48:10 +01:00
|
|
|
${{ matrix.os }}-qt${{ matrix.qt_ver }}
|
2022-02-12 03:39:36 +00:00
|
|
|
|
2022-03-18 21:28:52 +00:00
|
|
|
- name: Set short version
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
ver_short=`git rev-parse --short HEAD`
|
|
|
|
echo "VERSION=$ver_short" >> $GITHUB_ENV
|
|
|
|
|
2022-05-16 21:54:32 +01:00
|
|
|
- name: Install Dependencies (Linux)
|
|
|
|
if: runner.os == 'Linux'
|
2022-04-17 08:53:30 +01:00
|
|
|
run: |
|
2022-05-16 21:54:32 +01:00
|
|
|
sudo apt-get -y update
|
2022-07-11 10:00:46 +01:00
|
|
|
sudo apt-get -y install ninja-build extra-cmake-modules scdoc
|
2022-05-21 02:57:37 +01:00
|
|
|
|
2022-05-16 21:54:32 +01:00
|
|
|
- name: Install Dependencies (macOS)
|
|
|
|
if: runner.os == 'macOS'
|
2022-04-26 17:04:05 +01:00
|
|
|
run: |
|
2022-05-16 21:54:32 +01:00
|
|
|
brew update
|
|
|
|
brew install ninja extra-cmake-modules
|
2022-02-02 06:28:00 +00:00
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
- name: Install Qt (Linux)
|
2022-07-17 18:48:10 +01:00
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver != 6
|
2022-02-22 14:41:17 +00:00
|
|
|
run: |
|
2022-07-15 08:09:17 +01:00
|
|
|
sudo apt-get -y install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5core5a libqt5network5 libqt5gui5
|
2022-07-15 18:10:12 +01:00
|
|
|
|
2022-05-16 21:54:32 +01:00
|
|
|
- name: Install Qt (macOS and AppImage)
|
2022-10-01 08:19:59 +01:00
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver == 6 || runner.os == 'macOS'
|
2022-09-06 14:20:46 +01:00
|
|
|
uses: jurplel/install-qt-action@v3
|
2022-05-16 21:54:32 +01:00
|
|
|
with:
|
|
|
|
version: ${{ matrix.qt_version }}
|
|
|
|
host: ${{ matrix.qt_host }}
|
|
|
|
target: 'desktop'
|
|
|
|
modules: ${{ matrix.qt_modules }}
|
2022-09-06 14:20:46 +01:00
|
|
|
cache: true
|
|
|
|
cache-key-prefix: ${{ matrix.qt_host }}-${{ matrix.qt_version }}-"${{ matrix.qt_modules }}"-qt_cache
|
2022-02-02 06:28:00 +00:00
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
- name: Prepare AppImage (Linux)
|
2022-07-17 18:48:10 +01:00
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver != 5
|
2022-02-07 12:19:58 +00:00
|
|
|
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-03-23 12:52:37 +00:00
|
|
|
##
|
|
|
|
# CONFIGURE
|
|
|
|
##
|
|
|
|
|
|
|
|
- name: Configure CMake (macOS)
|
2022-10-01 08:19:59 +01:00
|
|
|
if: runner.os == 'macOS' && matrix.qt_ver == 6
|
2022-03-17 15:55:45 +00:00
|
|
|
run: |
|
2022-10-01 08:19:59 +01:00
|
|
|
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 13:12:51 +01:00
|
|
|
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 15:55:45 +00:00
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
- name: Configure CMake (Windows)
|
|
|
|
if: runner.os == 'Windows'
|
2022-03-17 15:55:45 +00:00
|
|
|
shell: msys2 {0}
|
2022-02-06 19:35:50 +00:00
|
|
|
run: |
|
2022-10-28 06:54:17 +01:00
|
|
|
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_OBJDUMP=/mingw64/bin/objdump.exe -G Ninja
|
2022-03-21 18:29:33 +00:00
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
- name: Configure CMake (Linux)
|
|
|
|
if: runner.os == 'Linux'
|
2022-03-21 18:29:33 +00:00
|
|
|
run: |
|
2022-05-16 21:54:32 +01:00
|
|
|
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-06 19:35:50 +00:00
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
##
|
|
|
|
# BUILD
|
|
|
|
##
|
2022-03-25 12:13:50 +00:00
|
|
|
|
2022-02-02 06:28:00 +00:00
|
|
|
- name: Build
|
2022-03-17 15:55:45 +00:00
|
|
|
if: runner.os != 'Windows'
|
|
|
|
run: |
|
|
|
|
cmake --build ${{ env.BUILD_DIR }}
|
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
- name: Build (Windows)
|
2022-03-21 18:29:33 +00:00
|
|
|
if: runner.os == 'Windows'
|
2022-03-17 15:55:45 +00:00
|
|
|
shell: msys2 {0}
|
2022-02-02 06:28:00 +00:00
|
|
|
run: |
|
2022-02-06 19:35:50 +00:00
|
|
|
cmake --build ${{ env.BUILD_DIR }}
|
2022-02-02 06:28:00 +00:00
|
|
|
|
2022-06-04 13:25:01 +01:00
|
|
|
##
|
|
|
|
# TEST
|
|
|
|
##
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
if: runner.os != 'Windows'
|
|
|
|
run: |
|
|
|
|
ctest --test-dir build --output-on-failure
|
|
|
|
|
|
|
|
- name: Test (Windows)
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
shell: msys2 {0}
|
|
|
|
run: |
|
|
|
|
ctest --test-dir build --output-on-failure
|
|
|
|
|
2022-10-02 11:20:28 +01:00
|
|
|
##
|
|
|
|
# CODE SCAN
|
|
|
|
##
|
|
|
|
|
|
|
|
- name: Perform CodeQL Analysis
|
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver == 6
|
|
|
|
uses: github/codeql-action/analyze@v2
|
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
##
|
|
|
|
# PACKAGE BUILDS
|
|
|
|
##
|
|
|
|
|
|
|
|
- name: Package (macOS)
|
|
|
|
if: runner.os == 'macOS'
|
2022-03-17 15:55:45 +00:00
|
|
|
run: |
|
|
|
|
cmake --install ${{ env.BUILD_DIR }}
|
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
cd ${{ env.INSTALL_DIR }}
|
2022-10-18 09:13:44 +01:00
|
|
|
chmod +x "PrismLauncher.app/Contents/MacOS/prismlauncher"
|
|
|
|
sudo codesign --sign - --deep --force --entitlements "../program_info/App.entitlements" --options runtime "PrismLauncher.app/Contents/MacOS/prismlauncher"
|
2022-10-25 19:15:31 +01:00
|
|
|
mv "PrismLauncher.app" "Prism Launcher.app"
|
2022-10-18 09:13:44 +01:00
|
|
|
tar -czf ../PrismLauncher.tar.gz *
|
2022-03-23 12:52:37 +00:00
|
|
|
|
2022-05-21 02:57:37 +01:00
|
|
|
- name: Make Sparkle signature (macOS)
|
2022-10-14 13:12:51 +01:00
|
|
|
if: matrix.name == 'macOS'
|
2022-05-21 02:57:37 +01:00
|
|
|
run: |
|
|
|
|
if [ '${{ secrets.SPARKLE_ED25519_KEY }}' != '' ]; then
|
|
|
|
brew install openssl@3
|
|
|
|
echo '${{ secrets.SPARKLE_ED25519_KEY }}' > ed25519-priv.pem
|
2022-10-18 09:13:44 +01:00
|
|
|
signature=$(/usr/local/opt/openssl@3/bin/openssl pkeyutl -sign -rawin -in ${{ github.workspace }}/PrismLauncher.tar.gz -inkey ed25519-priv.pem | openssl base64 | tr -d \\n)
|
2022-05-21 02:57:37 +01:00
|
|
|
rm ed25519-priv.pem
|
|
|
|
cat >> $GITHUB_STEP_SUMMARY << EOF
|
2022-05-21 18:23:02 +01:00
|
|
|
### Artifact Information :information_source:
|
|
|
|
- :memo: Sparkle Signature (ed25519): \`$signature\`
|
2022-05-21 02:57:37 +01:00
|
|
|
EOF
|
|
|
|
else
|
|
|
|
cat >> $GITHUB_STEP_SUMMARY << EOF
|
2022-05-21 18:23:02 +01:00
|
|
|
### Artifact Information :information_source:
|
|
|
|
- :warning: Sparkle Signature (ed25519): No private key available (likely a pull request or fork)
|
2022-05-21 02:57:37 +01:00
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
- name: Package (Windows)
|
2022-03-17 15:55:45 +00:00
|
|
|
if: runner.os == 'Windows'
|
|
|
|
shell: msys2 {0}
|
2022-02-06 19:35:50 +00:00
|
|
|
run: |
|
|
|
|
cmake --install ${{ env.BUILD_DIR }}
|
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
cd ${{ env.INSTALL_DIR }}
|
2022-09-12 11:57:18 +01:00
|
|
|
if [ "${{ matrix.qt_ver }}" == "5" ]; then
|
2022-10-28 06:54:17 +01:00
|
|
|
cp /clang32/bin/libcrypto-1_1.dll /clang32/bin/libssl-1_1.dll ./
|
2022-03-23 12:52:37 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
- name: Package (Windows, portable)
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
shell: msys2 {0}
|
2022-02-02 06:28:00 +00:00
|
|
|
run: |
|
2022-03-23 12:52:37 +00:00
|
|
|
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-06 19:35:50 +00:00
|
|
|
|
2022-05-15 00:51:23 +01:00
|
|
|
- name: Package (Windows, installer)
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
run: |
|
2022-05-20 22:12:08 +01:00
|
|
|
cd ${{ env.INSTALL_DIR }}
|
2022-05-29 22:37:45 +01:00
|
|
|
makensis -NOCD "${{ github.workspace }}/${{ env.BUILD_DIR }}/program_info/win_install.nsi"
|
2022-05-15 00:51:23 +01:00
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
- name: Package (Linux)
|
2022-07-17 18:48:10 +01:00
|
|
|
if: runner.os == 'Linux'
|
2022-03-25 12:13:50 +00:00
|
|
|
run: |
|
2022-03-23 12:52:37 +00:00
|
|
|
cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_DIR }}
|
|
|
|
|
|
|
|
cd ${{ env.INSTALL_DIR }}
|
2022-10-18 09:13:44 +01:00
|
|
|
tar --owner root --group root -czf ../PrismLauncher.tar.gz *
|
2022-03-23 12:52:37 +00:00
|
|
|
|
|
|
|
- name: Package (Linux, portable)
|
2022-07-17 18:48:10 +01:00
|
|
|
if: runner.os == 'Linux'
|
2022-03-23 12:52:37 +00:00
|
|
|
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 09:13:44 +01:00
|
|
|
tar -czf ../PrismLauncher-portable.tar.gz *
|
2022-03-25 12:13:50 +00:00
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
- name: Package AppImage (Linux)
|
2022-07-17 18:48:10 +01:00
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver != 5
|
2022-02-06 19:35:50 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2022-03-23 12:52:37 +00:00
|
|
|
cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_APPIMAGE_DIR }}/usr
|
|
|
|
|
2022-10-18 09:13:44 +01:00
|
|
|
export OUTPUT="PrismLauncher-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage"
|
2022-02-07 13:11:42 +00:00
|
|
|
|
2022-02-06 19:35:50 +00:00
|
|
|
chmod +x linuxdeploy-*.AppImage
|
2022-02-07 13:11:42 +00:00
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
mkdir -p ${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib/jvm/java-{8,17}-openjdk
|
2022-05-16 21:54:32 +01:00
|
|
|
mkdir -p ${{ env.INSTALL_APPIMAGE_DIR }}/usr/plugins/iconengines
|
2022-02-07 13:11:42 +00:00
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
cp -r ${{ github.workspace }}/JREs/jre8/* ${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib/jvm/java-8-openjdk
|
2022-02-07 13:11:42 +00:00
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
cp -r ${{ github.workspace }}/JREs/jre17/* ${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib/jvm/java-17-openjdk
|
2022-02-07 13:11:42 +00:00
|
|
|
|
2022-10-18 09:13:44 +01:00
|
|
|
cp -r /home/runner/work/PrismLauncher/Qt/${{ matrix.qt_version }}/gcc_64/plugins/iconengines/* ${{ env.INSTALL_APPIMAGE_DIR }}/usr/plugins/iconengines
|
2022-08-01 08:30:26 +01:00
|
|
|
|
|
|
|
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-16 21:54:32 +01:00
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
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-06 19:35:50 +00:00
|
|
|
|
2022-10-18 09:13:44 +01:00
|
|
|
./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 06:28:00 +00:00
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
##
|
|
|
|
# UPLOAD BUILDS
|
|
|
|
##
|
2022-02-02 06:28:00 +00:00
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
- name: Upload binary tarball (macOS)
|
2022-02-02 06:28:00 +00:00
|
|
|
if: runner.os == 'macOS'
|
2022-03-23 12:52:37 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-10-18 09:13:44 +01:00
|
|
|
name: PrismLauncher-${{ matrix.name }}-${{ env.VERSION }}-${{ inputs.build_type }}
|
|
|
|
path: PrismLauncher.tar.gz
|
2022-02-02 06:28:00 +00:00
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
- name: Upload binary zip (Windows)
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-10-18 09:13:44 +01:00
|
|
|
name: PrismLauncher-${{ matrix.name }}-${{ env.VERSION }}-${{ inputs.build_type }}
|
2022-03-23 12:52:37 +00:00
|
|
|
path: ${{ env.INSTALL_DIR }}/**
|
2022-02-19 19:46:43 +00:00
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
- name: Upload binary zip (Windows, portable)
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-10-18 09:13:44 +01:00
|
|
|
name: PrismLauncher-${{ matrix.name }}-Portable-${{ env.VERSION }}-${{ inputs.build_type }}
|
2022-03-23 12:52:37 +00:00
|
|
|
path: ${{ env.INSTALL_PORTABLE_DIR }}/**
|
2022-03-25 12:13:50 +00:00
|
|
|
|
2022-05-15 00:51:23 +01:00
|
|
|
- name: Upload installer (Windows)
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-10-18 09:13:44 +01:00
|
|
|
name: PrismLauncher-${{ matrix.name }}-Setup-${{ env.VERSION }}-${{ inputs.build_type }}
|
|
|
|
path: PrismLauncher-Setup.exe
|
2022-05-15 00:51:23 +01:00
|
|
|
|
2022-07-17 18:48:10 +01:00
|
|
|
- name: Upload binary tarball (Linux, Qt 5)
|
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver != 6
|
2022-03-23 12:33:18 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-02-19 19:46:43 +00:00
|
|
|
with:
|
2022-10-18 09:13:44 +01:00
|
|
|
name: PrismLauncher-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}
|
|
|
|
path: PrismLauncher.tar.gz
|
2022-02-19 19:46:43 +00:00
|
|
|
|
2022-07-17 18:48:10 +01:00
|
|
|
- name: Upload binary tarball (Linux, portable, Qt 5)
|
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver != 6
|
2022-03-25 12:13:50 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-10-18 09:13:44 +01:00
|
|
|
name: PrismLauncher-${{ runner.os }}-Portable-${{ env.VERSION }}-${{ inputs.build_type }}
|
|
|
|
path: PrismLauncher-portable.tar.gz
|
2022-03-25 12:13:50 +00:00
|
|
|
|
2022-07-17 18:48:10 +01:00
|
|
|
- name: Upload binary tarball (Linux, Qt 6)
|
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver !=5
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-10-18 09:13:44 +01:00
|
|
|
name: PrismLauncher-${{ runner.os }}-Qt6-${{ env.VERSION }}-${{ inputs.build_type }}
|
|
|
|
path: PrismLauncher.tar.gz
|
2022-07-17 18:48:10 +01:00
|
|
|
|
|
|
|
- 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 09:13:44 +01:00
|
|
|
name: PrismLauncher-${{ runner.os }}-Qt6-Portable-${{ env.VERSION }}-${{ inputs.build_type }}
|
|
|
|
path: PrismLauncher-portable.tar.gz
|
2022-07-17 18:48:10 +01:00
|
|
|
|
2022-03-23 12:52:37 +00:00
|
|
|
- name: Upload AppImage (Linux)
|
2022-07-17 18:48:10 +01:00
|
|
|
if: runner.os == 'Linux' && matrix.qt_ver != 5
|
2022-03-23 12:33:18 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-02-06 19:35:50 +00:00
|
|
|
with:
|
2022-10-18 09:13:44 +01:00
|
|
|
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-02-06 19:35:50 +00:00
|
|
|
|
2022-03-17 15:55:45 +00:00
|
|
|
|