mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-17 04:27:45 -07:00
Merge 9ba86203ec into 5ffe344779
This commit is contained in:
commit
4a735f53f1
2 changed files with 11 additions and 69 deletions
|
|
@ -1,49 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# This script is used to resolve the latest patch version of Qt using aqtinstall.
|
|
||||||
# It interprets wildcards to get the latest patch version. E.g. "6.6.*" -> "6.6.3".
|
|
||||||
|
|
||||||
# This script is meant to be used by the ci enironment.
|
|
||||||
# It uses the runner's GITHUB_OUTPUT env variable.
|
|
||||||
|
|
||||||
# Usage example: .ci/resolve_latest_aqt_qt_version.sh "6.6.*"
|
|
||||||
|
|
||||||
qt_spec=$1
|
|
||||||
if [[ ! $qt_spec ]]; then
|
|
||||||
echo "usage: $0 [version]"
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If version is already specific (no wildcard), use it as-is
|
|
||||||
if [[ $qt_spec != *"*" ]]; then
|
|
||||||
echo "version $qt_spec is already resolved"
|
|
||||||
echo "version=$qt_spec" >> "$GITHUB_OUTPUT"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! hash aqt; then
|
|
||||||
echo "aqt could not be found, has aqtinstall been installed?"
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Resolve latest patch
|
|
||||||
if [[ $RUNNER_OS == macOS ]]; then
|
|
||||||
if ! qt_resolved=$(aqt list-qt mac desktop --spec "$qt_spec" --latest-version); then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
elif [[ $RUNNER_OS == Windows ]]; then
|
|
||||||
if ! qt_resolved=$(aqt list-qt windows desktop --spec "$qt_spec" --latest-version); then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "aqt command for $RUNNER_OS not defined."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "resolved $qt_spec to $qt_resolved"
|
|
||||||
if [[ ! $qt_resolved ]]; then
|
|
||||||
echo "Error: Could not resolve Qt version for $qt_spec"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "version=$qt_resolved" >> "$GITHUB_OUTPUT"
|
|
||||||
31
.github/workflows/desktop-build.yml
vendored
31
.github/workflows/desktop-build.yml
vendored
|
|
@ -273,7 +273,7 @@ jobs:
|
||||||
make_package: 1
|
make_package: 1
|
||||||
override_target: 13
|
override_target: 13
|
||||||
package_suffix: "-macOS13_Intel"
|
package_suffix: "-macOS13_Intel"
|
||||||
qt_version: 6.11.0
|
qt_version: 6.11.*
|
||||||
qt_arch: clang_64
|
qt_arch: clang_64
|
||||||
qt_modules: qtimageformats qtmultimedia qtwebsockets
|
qt_modules: qtimageformats qtmultimedia qtwebsockets
|
||||||
soc: Intel
|
soc: Intel
|
||||||
|
|
@ -289,7 +289,7 @@ jobs:
|
||||||
cmake_generator: Ninja
|
cmake_generator: Ninja
|
||||||
make_package: 1
|
make_package: 1
|
||||||
package_suffix: "-macOS14"
|
package_suffix: "-macOS14"
|
||||||
qt_version: 6.11.0
|
qt_version: 6.11.*
|
||||||
qt_arch: clang_64
|
qt_arch: clang_64
|
||||||
qt_modules: qtimageformats qtmultimedia qtwebsockets
|
qt_modules: qtimageformats qtmultimedia qtwebsockets
|
||||||
soc: Apple
|
soc: Apple
|
||||||
|
|
@ -305,7 +305,7 @@ jobs:
|
||||||
cmake_generator: Ninja
|
cmake_generator: Ninja
|
||||||
make_package: 1
|
make_package: 1
|
||||||
package_suffix: "-macOS15"
|
package_suffix: "-macOS15"
|
||||||
qt_version: 6.11.0
|
qt_version: 6.11.*
|
||||||
qt_arch: clang_64
|
qt_arch: clang_64
|
||||||
qt_modules: qtimageformats qtmultimedia qtwebsockets
|
qt_modules: qtimageformats qtmultimedia qtwebsockets
|
||||||
soc: Apple
|
soc: Apple
|
||||||
|
|
@ -319,7 +319,7 @@ jobs:
|
||||||
|
|
||||||
ccache_eviction_age: 7d
|
ccache_eviction_age: 7d
|
||||||
cmake_generator: Ninja
|
cmake_generator: Ninja
|
||||||
qt_version: 6.11.0
|
qt_version: 6.11.*
|
||||||
qt_arch: clang_64
|
qt_arch: clang_64
|
||||||
qt_modules: qtimageformats qtmultimedia qtwebsockets
|
qt_modules: qtimageformats qtmultimedia qtwebsockets
|
||||||
soc: Apple
|
soc: Apple
|
||||||
|
|
@ -335,7 +335,7 @@ jobs:
|
||||||
cmake_generator_platform: x64
|
cmake_generator_platform: x64
|
||||||
make_package: 1
|
make_package: 1
|
||||||
package_suffix: "-Win10"
|
package_suffix: "-Win10"
|
||||||
qt_version: 6.11.0
|
qt_version: 6.11.*
|
||||||
qt_arch: win64_msvc2022_64
|
qt_arch: win64_msvc2022_64
|
||||||
qt_modules: qtimageformats qtmultimedia qtwebsockets
|
qt_modules: qtimageformats qtmultimedia qtwebsockets
|
||||||
type: Release
|
type: Release
|
||||||
|
|
@ -376,26 +376,17 @@ jobs:
|
||||||
path: ${{ env.CCACHE_DIR }}
|
path: ${{ env.CCACHE_DIR }}
|
||||||
restore-keys: ccache-${{ matrix.runner }}-${{ matrix.soc }}-${{ matrix.type }}-
|
restore-keys: ccache-${{ matrix.runner }}-${{ matrix.soc }}-${{ matrix.type }}-
|
||||||
|
|
||||||
- name: "Install aqtinstall"
|
- name: "[macOS] Restore thin Qt ${{ matrix.qt_version }} libraries"
|
||||||
run: pipx install aqtinstall
|
|
||||||
|
|
||||||
# Resolve given wildcard versions (e.g. Qt 6.6.*) to latest version via aqtinstall to avoid stale caches on new releases
|
|
||||||
- name: "Resolve latest Qt patch version"
|
|
||||||
id: resolve_qt_version
|
|
||||||
shell: bash
|
|
||||||
run: .ci/resolve_latest_aqt_qt_version.sh "${{ matrix.qt_version }}"
|
|
||||||
|
|
||||||
- name: "[macOS] Restore thin Qt ${{ steps.resolve_qt_version.outputs.version }} libraries"
|
|
||||||
if: matrix.os == 'macOS'
|
if: matrix.os == 'macOS'
|
||||||
id: restore_qt
|
id: restore_qt
|
||||||
uses: actions/cache/restore@v5
|
uses: actions/cache/restore@v5
|
||||||
with:
|
with:
|
||||||
key: thin-qt-macos-${{ matrix.soc }}-${{ steps.resolve_qt_version.outputs.version }}
|
key: thin-qt-macos-${{ matrix.soc }}-${{ matrix.qt_version }}
|
||||||
path: ${{ github.workspace }}/Qt
|
path: ${{ github.workspace }}/Qt
|
||||||
|
|
||||||
# Using jurplel/install-qt-action to install Qt without using brew
|
# Using jurplel/install-qt-action to install Qt without using brew
|
||||||
# Qt build using vcpkg either just fails or takes too long to build
|
# Qt build using vcpkg either just fails or takes too long to build
|
||||||
- name: "[macOS] Install fat Qt ${{ steps.resolve_qt_version.outputs.version }}"
|
- name: "[macOS] Install fat Qt ${{ matrix.qt_version }}"
|
||||||
if: matrix.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true'
|
if: matrix.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true'
|
||||||
uses: jurplel/install-qt-action@v4
|
uses: jurplel/install-qt-action@v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -403,7 +394,7 @@ jobs:
|
||||||
cache: false
|
cache: false
|
||||||
dir: ${{ github.workspace }}
|
dir: ${{ github.workspace }}
|
||||||
modules: ${{ matrix.qt_modules }}
|
modules: ${{ matrix.qt_modules }}
|
||||||
version: ${{ steps.resolve_qt_version.outputs.version }}
|
version: ${{ matrix.qt_version }}
|
||||||
|
|
||||||
- name: "[macOS] Create thin Qt libraries"
|
- name: "[macOS] Create thin Qt libraries"
|
||||||
if: matrix.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true'
|
if: matrix.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true'
|
||||||
|
|
@ -413,7 +404,7 @@ jobs:
|
||||||
if: matrix.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true'
|
if: matrix.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true'
|
||||||
uses: actions/cache/save@v5
|
uses: actions/cache/save@v5
|
||||||
with:
|
with:
|
||||||
key: thin-qt-macos-${{ matrix.soc }}-${{ steps.resolve_qt_version.outputs.version }}
|
key: thin-qt-macos-${{ matrix.soc }}-${{ matrix.qt_version }}
|
||||||
path: ${{ github.workspace }}/Qt
|
path: ${{ github.workspace }}/Qt
|
||||||
|
|
||||||
- name: "[Windows] Install Qt ${{ matrix.qt_version }}"
|
- name: "[Windows] Install Qt ${{ matrix.qt_version }}"
|
||||||
|
|
@ -425,7 +416,7 @@ jobs:
|
||||||
arch: ${{ matrix.qt_arch }}
|
arch: ${{ matrix.qt_arch }}
|
||||||
cache: true
|
cache: true
|
||||||
modules: ${{ matrix.qt_modules }}
|
modules: ${{ matrix.qt_modules }}
|
||||||
version: ${{ steps.resolve_qt_version.outputs.version }}
|
version: ${{ matrix.qt_version }}
|
||||||
|
|
||||||
- name: "[Windows] Install NSIS"
|
- name: "[Windows] Install NSIS"
|
||||||
if: matrix.os == 'Windows'
|
if: matrix.os == 'Windows'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue