Merge pull request #991 from throneproj/openssl

ci: build qt with openssl on windows
This commit is contained in:
parhelia512 2025-12-01 11:15:06 +08:00 committed by GitHub
commit dda177ece0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 5 deletions

View File

@ -148,6 +148,12 @@ jobs:
with: with:
path: download-artifact path: download-artifact
# ========================================================================================================= Qt Install # ========================================================================================================= Qt Install
- name: Install OpenSSL (Windows)
if: matrix.platform == 'windows-latest'
shell: bash
run: |
curl -L -o openssl.7z https://github.com/throneproj/env_windows_legacy/releases/download/latest/openssl-${{ matrix.target }}.7z
7z x openssl.7z
- name: Qt static Cache - name: Qt static Cache
id: cache-static-Qt id: cache-static-Qt
if: matrix.platform == 'windows-latest' && matrix.qt_version != '6.2.12' if: matrix.platform == 'windows-latest' && matrix.qt_version != '6.2.12'
@ -156,9 +162,11 @@ jobs:
path: qt6/build path: qt6/build
key: QtStaticCache-${{ matrix.platform }}-${{ matrix.target }}-Qt${{ matrix.qt_version }} key: QtStaticCache-${{ matrix.platform }}-${{ matrix.target }}-Qt${{ matrix.qt_version }}
- name: Install Qt Windows - name: Install Qt Windows
shell: powershell shell: cmd
if: matrix.platform == 'windows-latest' && steps.cache-static-Qt.outputs.cache-hit != 'true' && matrix.qt_version != '6.2.12' if: matrix.platform == 'windows-latest' && steps.cache-static-Qt.outputs.cache-hit != 'true' && matrix.qt_version != '6.2.12'
run: ./script/build_qt_static_windows.bat ${{ matrix.qt_version }} run: |
set "OPENSSL_ROOT_DIR=%cd%\openssl"
./script/build_qt_static_windows.bat ${{ matrix.qt_version }}
- name: Install Qt - name: Install Qt
uses: jurplel/install-qt-action@v4.3.0 uses: jurplel/install-qt-action@v4.3.0
if: matrix.platform != 'windows-latest' if: matrix.platform != 'windows-latest'
@ -173,6 +181,7 @@ jobs:
if: matrix.platform == 'windows-latest' && matrix.qt_version != '6.2.12' if: matrix.platform == 'windows-latest' && matrix.qt_version != '6.2.12'
run: | run: |
export CMAKE_PREFIX_PATH=$PWD/qt6/build/lib/cmake export CMAKE_PREFIX_PATH=$PWD/qt6/build/lib/cmake
export OPENSSL_ROOT_DIR=$PWD/openssl
mkdir build mkdir build
cd build cd build
curl -fLso srslist.h "https://raw.githubusercontent.com/throneproj/routeprofiles/rule-set/srslist.h" curl -fLso srslist.h "https://raw.githubusercontent.com/throneproj/routeprofiles/rule-set/srslist.h"
@ -186,8 +195,6 @@ jobs:
run: | run: |
curl -L -o qt.7z https://github.com/throneproj/env_windows_legacy/releases/download/latest/qt-${{ matrix.target }}.7z curl -L -o qt.7z https://github.com/throneproj/env_windows_legacy/releases/download/latest/qt-${{ matrix.target }}.7z
7z x qt.7z 7z x qt.7z
curl -L -o openssl.7z https://github.com/throneproj/env_windows_legacy/releases/download/latest/openssl-${{ matrix.target }}.7z
7z x openssl.7z
export CMAKE_PREFIX_PATH=$PWD/Qt/lib/cmake export CMAKE_PREFIX_PATH=$PWD/Qt/lib/cmake
export OPENSSL_ROOT_DIR=$PWD/openssl export OPENSSL_ROOT_DIR=$PWD/openssl
mkdir build mkdir build

View File

@ -3,7 +3,7 @@ cd qt6
git switch %1 git switch %1
mkdir build mkdir build
CALL .\configure.bat -release -static -prefix ./build -static-runtime -submodules qtbase,qtimageformats,qtsvg,qttranslations -skip tests -skip examples -gui -widgets -init-submodules CALL .\configure.bat -release -static -prefix ./build -static-runtime -submodules qtbase,qtimageformats,qtsvg,qttranslations -skip tests -skip examples -gui -widgets -init-submodules -no-schannel -openssl-linked -no-dtls -no-ocsp
echo on branch %1 echo on branch %1
echo config complete, building... echo config complete, building...
cmake --build . --parallel cmake --build . --parallel