CI: Update Qt setup on Windows (#4654)
* use new internal caching * Update desktop-build.yml * Update desktop-build.yml * Update desktop-build.yml * use newest patch version jurplel/install-qt-action#version * python not needed * Update desktop-build.yml * Update desktop-build.yml * Update desktop-build.yml * Update desktop-build.yml * Update desktop-build.yml * install openssl via tools * add $RUNNER_WORKSPACE location Source: https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/environment-variables-full-list-github-actions * Update FindWin32SslRuntime.cmake * Update FindWin32SslRuntime.cmake * Update FindWin32SslRuntime.cmake * Update FindWin32SslRuntime.cmake * Delete download_openssl.sh * cleanup * [skip ci] improve short-circuit evaluation comment * restructure
This commit is contained in:
parent
2f100f2ba3
commit
54b7943d17
3 changed files with 24 additions and 62 deletions
|
@ -1,35 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Read arguments
|
||||
while [[ $# != 0 ]]; do
|
||||
case "$1" in
|
||||
'--')
|
||||
shift
|
||||
;;
|
||||
'--arch')
|
||||
shift
|
||||
if [[ $# == 0 ]]; then
|
||||
echo "::error file=$0::--arch expects an argument"
|
||||
exit 3
|
||||
fi
|
||||
OS_ARCH="$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "::error file=$0::unrecognized option: $1"
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
set -e
|
||||
|
||||
OPEN_SSL_VERSION="1.1.1n"
|
||||
DEST_PATH="C:\OpenSSL-Win$OS_ARCH"
|
||||
|
||||
curl -JLSs "https://github.com/CristiFati/Prebuilt-Binaries/raw/master/OpenSSL/v1.1.1/OpenSSL-$OPEN_SSL_VERSION-Win-pc0$OS_ARCH.zip" -o OpenSSL.zip
|
||||
unzip -q "OpenSSL.zip"
|
||||
rm "OpenSSL.zip"
|
||||
mv "OpenSSL\OpenSSL\\$OPEN_SSL_VERSION" "$DEST_PATH"
|
||||
rm -r "OpenSSL"
|
||||
echo "Installed OpenSSL v$OPEN_SSL_VERSION to $DEST_PATH"
|
44
.github/workflows/desktop-build.yml
vendored
44
.github/workflows/desktop-build.yml
vendored
|
@ -288,25 +288,28 @@ jobs:
|
|||
matrix:
|
||||
include:
|
||||
- target: Win-32bit
|
||||
arch: 32
|
||||
vcpkg_default_triplet: x86
|
||||
qt_version: '5.15.2'
|
||||
bit: 32
|
||||
arch: x86
|
||||
cmake_generator_platform: Win32
|
||||
qt_version: 5.15.*
|
||||
qt_arch: msvc2019
|
||||
qt_tools: "tools_openssl_x86"
|
||||
|
||||
- target: Win7+-64bit
|
||||
arch: 64
|
||||
vcpkg_default_triplet: x64
|
||||
qt_version: '5.15.2'
|
||||
bit: 64
|
||||
arch: x64
|
||||
cmake_generator_platform: x64
|
||||
qt_version: 5.15.*
|
||||
qt_arch: msvc2019_64
|
||||
qt_tools: "tools_openssl_x64"
|
||||
|
||||
- target: Win10+-64bit
|
||||
arch: 64
|
||||
vcpkg_default_triplet: x64
|
||||
qt_version: '6.3.0'
|
||||
bit: 64
|
||||
arch: x64
|
||||
cmake_generator_platform: x64
|
||||
qt_version: 6.3.*
|
||||
qt_arch: msvc2019_64
|
||||
qt_tools: "tools_openssl_x64"
|
||||
qt_modules: "qt5compat qtmultimedia qtwebsockets"
|
||||
|
||||
name: ${{matrix.target}}
|
||||
|
@ -325,34 +328,25 @@ jobs:
|
|||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Restore Qt ${{matrix.qt_version}} for ${{matrix.target}} from cache
|
||||
id: cache-qt
|
||||
uses: actions/cache@v1 # Intentionally v1, based on jurplel documentation
|
||||
with:
|
||||
key: QtCache-${{matrix.qt_version}}-${{matrix.target}}
|
||||
path: '${{github.workspace}}/../Qt'
|
||||
|
||||
- name: Install Qt ${{matrix.qt_version}} for ${{matrix.target}}
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
cached: ${{steps.cache-qt.outputs.cache-hit}}
|
||||
cache: true
|
||||
setup-python: false
|
||||
version: ${{matrix.qt_version}}
|
||||
arch: win${{matrix.arch}}_${{matrix.qt_arch}}
|
||||
arch: win${{matrix.bit}}_${{matrix.qt_arch}}
|
||||
tools: ${{matrix.qt_tools}}
|
||||
modules: ${{matrix.qt_modules}}
|
||||
|
||||
- name: Run vcpkg
|
||||
uses: lukka/run-vcpkg@v10.2
|
||||
with:
|
||||
runVcpkgInstall: true
|
||||
appendedCacheKey: ${{matrix.arch}}-bit
|
||||
appendedCacheKey: ${{matrix.bit}}-bit
|
||||
env:
|
||||
VCPKG_DEFAULT_TRIPLET: '${{matrix.vcpkg_default_triplet}}-windows'
|
||||
VCPKG_DEFAULT_TRIPLET: '${{matrix.arch}}-windows'
|
||||
VCPKG_DISABLE_METRICS: 1
|
||||
|
||||
- name: Install OpenSSL ${{matrix.arch}}-bit
|
||||
shell: bash
|
||||
run: .ci/download_openssl.sh --arch ${{matrix.arch}}
|
||||
|
||||
- name: Build Cockatrice
|
||||
id: build
|
||||
shell: bash
|
||||
|
@ -360,7 +354,7 @@ jobs:
|
|||
PACKAGE_SUFFIX: '-${{matrix.target}}'
|
||||
CMAKE_GENERATOR: '${{env.CMAKE_GENERATOR}}'
|
||||
CMAKE_GENERATOR_PLATFORM: '${{matrix.cmake_generator_platform}}'
|
||||
QTDIR: '${{github.workspace}}\Qt\${{matrix.qt_version}}\win${{matrix.arch}}_${{matrix.qt_arch}}'
|
||||
QTDIR: '${{github.workspace}}\Qt\${{matrix.qt_version}}\win${{matrix.bit}}_${{matrix.qt_arch}}'
|
||||
run: .ci/compile.sh --server --release --test --package --parallel 2
|
||||
|
||||
- name: Upload artifact
|
||||
|
|
|
@ -8,8 +8,10 @@ endif()
|
|||
if("${CMAKE_GENERATOR_PLATFORM}" STREQUAL "x64")
|
||||
message(STATUS "Looking for OpenSSL for ${CMAKE_GENERATOR_PLATFORM}")
|
||||
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
|
||||
set(_OPENSSL_ROOT_PATHS "$ENV{VCPKG_PACKAGES_DIR}/x64-windows/bin" "C:/OpenSSL-Win64/bin" "C:/OpenSSL-Win64"
|
||||
set(_OPENSSL_ROOT_PATHS
|
||||
"$ENV{VCPKG_PACKAGES_DIR}/x64-windows/bin" "C:/OpenSSL-Win64/bin" "C:/OpenSSL-Win64"
|
||||
"C:/Tools/vcpkg/installed/x64-windows/bin" "${_programfiles}/OpenSSL-Win64"
|
||||
"D:/a/Cockatrice/Qt/Tools/OpenSSL/Win_x64/bin"
|
||||
)
|
||||
unset(_programfiles)
|
||||
elseif("${CMAKE_GENERATOR_PLATFORM}" STREQUAL "Win32")
|
||||
|
@ -23,6 +25,7 @@ elseif("${CMAKE_GENERATOR_PLATFORM}" STREQUAL "Win32")
|
|||
"C:/Tools/vcpkg/installed/x86-windows/bin"
|
||||
"${_programfiles}/OpenSSL"
|
||||
"${_programfiles}/OpenSSL-Win32"
|
||||
"D:/a/Cockatrice/Qt/Tools/OpenSSL/Win_x86/bin"
|
||||
)
|
||||
unset(_programfiles)
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue