aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-12-14 23:22:27 +0100
committerSefa Eyeoglu <contact@scrumplex.net>2022-12-14 23:22:27 +0100
commit849b92665e0762a38a7e17403015e2b037318aec (patch)
tree2fbeac111297727aa6613aacc08e80dcec5c3724 /.github
parentfdbd8d9d2b2e04cd68fd800882309b40c05aba2c (diff)
parentd193ed9eebb392b259edb88a227dce4cee773df6 (diff)
downloadPrismLauncher-849b92665e0762a38a7e17403015e2b037318aec.tar.gz
PrismLauncher-849b92665e0762a38a7e17403015e2b037318aec.tar.bz2
PrismLauncher-849b92665e0762a38a7e17403015e2b037318aec.zip
Merge branch 'develop' into remove-updater
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml121
-rw-r--r--.github/workflows/trigger_builds.yml3
-rw-r--r--.github/workflows/trigger_release.yml31
3 files changed, 110 insertions, 45 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index c0e5b50a..1ba5d0e4 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -15,6 +15,9 @@ on:
SPARKLE_ED25519_KEY:
description: Private key for signing Sparkle updates
required: false
+ CACHIX_AUTH_TOKEN:
+ description: Private token for authenticating against Cachix cache
+ required: false
jobs:
build:
@@ -35,17 +38,11 @@ jobs:
qt_tools: ''
- os: windows-2022
- name: "Windows-Legacy"
- msystem: clang32
- qt_ver: 5
-
- - os: windows-2022
- name: "Windows"
+ name: "Windows-MinGW-w64"
msystem: clang64
- qt_ver: 6
- os: windows-2022
- name: "Windows-Legacy-MSVC"
+ name: "Windows-MSVC-Legacy"
msystem: ''
architecture: 'win32'
vcvars_arch: 'amd64_x86'
@@ -64,7 +61,19 @@ jobs:
qt_ver: 6
qt_host: windows
qt_arch: ''
- qt_version: '6.4.1'
+ qt_version: '6.4.0'
+ qt_modules: 'qt5compat qtimageformats'
+ qt_tools: ''
+
+ - 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'
+ qt_version: '6.4.0'
qt_modules: 'qt5compat qtimageformats'
qt_tools: ''
@@ -120,12 +129,12 @@ jobs:
cmake:p
extra-cmake-modules:p
ninja:p
- qt${{ matrix.qt_ver }}-base:p
- qt${{ matrix.qt_ver }}-svg:p
- qt${{ matrix.qt_ver }}-imageformats:p
- quazip-qt${{ matrix.qt_ver }}:p
+ qt6-base:p
+ qt6-svg:p
+ qt6-imageformats:p
+ quazip-qt6:p
ccache:p
- ${{ matrix.qt_ver == 6 && 'qt6-5compat:p' || '' }}
+ qt6-5compat:p
- name: Force newer ccache
if: runner.os == 'Windows' && matrix.msystem == '' && inputs.build_type == 'Debug'
@@ -136,7 +145,7 @@ jobs:
if: (runner.os != 'Windows' || matrix.msystem == '') && inputs.build_type == 'Debug'
uses: hendrikmuhs/ccache-action@v1.2.5
with:
- key: ${{ matrix.os }}-qt${{ matrix.qt_ver }}
+ key: ${{ matrix.os }}-qt${{ matrix.qt_ver }}-${{ matrix.architecture }}
- name: Setup ccache (Windows MinGW-w64)
if: runner.os == 'Windows' && matrix.msystem != '' && inputs.build_type == 'Debug'
@@ -159,9 +168,9 @@ jobs:
uses: actions/cache@v3.0.11
with:
path: '${{ github.workspace }}\.ccache'
- key: ${{ matrix.os }}-qt${{ matrix.qt_ver }}
+ key: ${{ matrix.os }}-mingw-w64
restore-keys: |
- ${{ matrix.os }}-qt${{ matrix.qt_ver }}
+ ${{ matrix.os }}-mingw-w64
- name: Set short version
shell: bash
@@ -185,8 +194,23 @@ jobs:
if: runner.os == 'Linux' && matrix.qt_ver != 6
run: |
sudo apt-get -y install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5core5a libqt5network5 libqt5gui5
-
- - name: Install Qt (macOS, AppImage & Windows MSVC)
+
+ - 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)
if: runner.os == 'Linux' && matrix.qt_ver == 6 || runner.os == 'macOS' || (runner.os == 'Windows' && matrix.msystem == '')
uses: jurplel/install-qt-action@v3
with:
@@ -198,6 +222,13 @@ jobs:
tools: ${{ matrix.qt_tools }}
cache: ${{ inputs.is_qt_cached }}
+ - name: Install MSVC (Windows MSVC)
+ if: runner.os == 'Windows' && matrix.msystem == ''
+ uses: ilammy/msvc-dev-cmd@v1
+ with:
+ vsversion: 2022
+ arch: ${{ matrix.vcvars_arch }}
+
- name: Prepare AppImage (Linux)
if: runner.os == 'Linux' && matrix.qt_ver != 5
run: |
@@ -207,6 +238,11 @@ jobs:
${{ github.workspace }}/.github/scripts/prepare_JREs.sh
+ - 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
+
##
# CONFIGURE
##
@@ -225,12 +261,12 @@ jobs:
if: runner.os == 'Windows' && matrix.msystem != ''
shell: msys2 {0}
run: |
- 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
+ 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
- name: Configure CMake (Windows MSVC)
if: runner.os == 'Windows' && matrix.msystem == ''
run: |
- 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}}
+ 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
# https://github.com/ccache/ccache/wiki/MS-Visual-Studio (I coudn't figure out the compiler prefix)
if ("${{ env.CCACHE_VAR }}")
{
@@ -283,7 +319,7 @@ jobs:
ctest -E "^example64|example$" --test-dir build --output-on-failure
- name: Test (Windows MSVC)
- if: runner.os == 'Windows' && matrix.msystem == ''
+ if: runner.os == 'Windows' && matrix.msystem == '' && matrix.architecture != 'arm64'
run: |
ctest -E "^example64|example$" --test-dir build --output-on-failure -C ${{ inputs.build_type }}
@@ -321,23 +357,12 @@ jobs:
EOF
fi
- - name: Add VC Enviroment Variables
- if: runner.os == 'Windows' && matrix.msystem == ''
- uses: ilammy/msvc-dev-cmd@v1
- with:
- arch: ${{ matrix.vcvars_arch }}
-
- name: Package (Windows MinGW-w64)
if: runner.os == 'Windows' && matrix.msystem != ''
shell: msys2 {0}
run: |
cmake --install ${{ env.BUILD_DIR }}
- cd ${{ env.INSTALL_DIR }}
- if [ "${{ matrix.qt_ver }}" == "5" ]; then
- cp /clang32/bin/libcrypto-1_1.dll /clang32/bin/libssl-1_1.dll ./
- fi
-
- name: Package (Windows MSVC)
if: runner.os == 'Windows' && matrix.msystem == ''
run: |
@@ -526,3 +551,33 @@ jobs:
bundle: "Prism Launcher.flatpak"
manifest-path: flatpak/org.prismlauncher.PrismLauncher.yml
cache-key: flatpak-${{ github.sha }}-x86_64
+
+ 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
diff --git a/.github/workflows/trigger_builds.yml b/.github/workflows/trigger_builds.yml
index 44751fbc..a08193a0 100644
--- a/.github/workflows/trigger_builds.yml
+++ b/.github/workflows/trigger_builds.yml
@@ -8,7 +8,6 @@ on:
- '**.md'
- '**/LICENSE'
- 'flake.lock'
- - '**.nix'
- 'packages/**'
- '.github/ISSUE_TEMPLATE/**'
- '.markdownlint**'
@@ -17,7 +16,6 @@ on:
- '**.md'
- '**/LICENSE'
- 'flake.lock'
- - '**.nix'
- 'packages/**'
- '.github/ISSUE_TEMPLATE/**'
- '.markdownlint**'
@@ -33,3 +31,4 @@ jobs:
is_qt_cached: true
secrets:
SPARKLE_ED25519_KEY: ${{ secrets.SPARKLE_ED25519_KEY }}
+ CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
diff --git a/.github/workflows/trigger_release.yml b/.github/workflows/trigger_release.yml
index 8baa9693..a2f89819 100644
--- a/.github/workflows/trigger_release.yml
+++ b/.github/workflows/trigger_release.yml
@@ -46,15 +46,26 @@ jobs:
tar -czf PrismLauncher-${{ env.VERSION }}.tar.gz PrismLauncher-${{ env.VERSION }}
- for d in PrismLauncher-Windows-*; do
+ for d in PrismLauncher-Windows-MSVC*; do
cd "${d}" || continue
- MSVC="$(echo -n ${d} | grep -o MSVC || true)"
LEGACY="$(echo -n ${d} | grep -o Legacy || true)"
+ ARM64="$(echo -n ${d} | grep -o arm64 || true)"
INST="$(echo -n ${d} | grep -o Setup || true)"
PORT="$(echo -n ${d} | grep -o Portable || true)"
- NAME="PrismLauncher-Windows"
- test -z "${MSVC}" && NAME="${NAME}-MinGW" || NAME="${NAME}-MSVC"
+ NAME="PrismLauncher-Windows-MSVC"
test -z "${LEGACY}" || NAME="${NAME}-Legacy"
+ test -z "${ARM64}" || NAME="${NAME}-arm64"
+ test -z "${PORT}" || NAME="${NAME}-Portable"
+ test -z "${INST}" || mv PrismLauncher-*.exe ../${NAME}-Setup-${{ env.VERSION }}.exe
+ test -n "${INST}" || zip -r -9 "../${NAME}-${{ env.VERSION }}.zip" *
+ cd ..
+ done
+
+ for d in PrismLauncher-Windows-MinGW-w64*; do
+ cd "${d}" || continue
+ INST="$(echo -n ${d} | grep -o Setup || true)"
+ PORT="$(echo -n ${d} | grep -o Portable || true)"
+ NAME="PrismLauncher-Windows-MinGW-w64"
test -z "${PORT}" || NAME="${NAME}-Portable"
test -z "${INST}" || mv PrismLauncher-*.exe ../${NAME}-Setup-${{ env.VERSION }}.exe
test -n "${INST}" || zip -r -9 "../${NAME}-${{ env.VERSION }}.zip" *
@@ -77,15 +88,15 @@ jobs:
PrismLauncher-Linux-${{ env.VERSION }}-x86_64.AppImage
PrismLauncher-Linux-Qt6-${{ env.VERSION }}.tar.gz
PrismLauncher-Linux-Qt6-Portable-${{ env.VERSION }}.tar.gz
- PrismLauncher-Windows-MinGW-Legacy-${{ env.VERSION }}.zip
- PrismLauncher-Windows-MinGW-Legacy-Portable-${{ env.VERSION }}.zip
- PrismLauncher-Windows-MinGW-Legacy-Setup-${{ env.VERSION }}.exe
- PrismLauncher-Windows-MinGW-${{ env.VERSION }}.zip
- PrismLauncher-Windows-MinGW-Portable-${{ env.VERSION }}.zip
- PrismLauncher-Windows-MinGW-Setup-${{ env.VERSION }}.exe
+ PrismLauncher-Windows-MinGW-w64-${{ env.VERSION }}.zip
+ PrismLauncher-Windows-MinGW-w64-Portable-${{ env.VERSION }}.zip
+ PrismLauncher-Windows-MinGW-w64-Setup-${{ env.VERSION }}.exe
PrismLauncher-Windows-MSVC-Legacy-${{ env.VERSION }}.zip
PrismLauncher-Windows-MSVC-Legacy-Portable-${{ env.VERSION }}.zip
PrismLauncher-Windows-MSVC-Legacy-Setup-${{ env.VERSION }}.exe
+ PrismLauncher-Windows-MSVC-arm64-${{ env.VERSION }}.zip
+ PrismLauncher-Windows-MSVC-arm64-Portable-${{ env.VERSION }}.zip
+ PrismLauncher-Windows-MSVC-arm64-Setup-${{ env.VERSION }}.exe
PrismLauncher-Windows-MSVC-${{ env.VERSION }}.zip
PrismLauncher-Windows-MSVC-Portable-${{ env.VERSION }}.zip
PrismLauncher-Windows-MSVC-Setup-${{ env.VERSION }}.exe