diff --git a/.github/workflows/windows_qwindowkit.yml b/.github/workflows/windows_qwindowkit.yml index e4b7e1c..ad8e46b 100644 --- a/.github/workflows/windows_qwindowkit.yml +++ b/.github/workflows/windows_qwindowkit.yml @@ -7,6 +7,17 @@ jobs: Windows_QWindowKit: name: Build runs-on: windows-2022 + strategy: + matrix: + include: + # - qt_arch: win64_mingw + # qt_ver: 6.5.2 + # qt_tools: "tools_mingw,9.0.0-1-202203221220,qt.tools.win64_mingw900" + # qt_tools_mingw_install: mingw900_64 + - qt_arch: win64_mingw + qt_ver: 6.6.0 + qt_tools: "tools_mingw,9.0.0-1-202203221220,qt.tools.win64_mingw900" + qt_tools_mingw_install: mingw900_64 # 步骤 steps: @@ -22,13 +33,37 @@ jobs: with: version: 1.10.2 + # 安装 Qt6 + - name: Install Qt + # 使用外部 action。这个action 专门用来安装 Qt + uses: jurplel/install-qt-action@v2 + with: + # Version of Qt to install + version: ${{ matrix.qt_ver }} + # Target platform for build + # target: ${{ matrix.qt_target }} + arch: ${{ matrix.qt_arch }} + cached: 'false' + aqtversion: '==2.0.5' + + # 配置 Qt6 + - name: Qt6 environment configuration + if: ${{ startsWith( matrix.qt_ver, 6 ) }} + shell: pwsh + run: | + Write-Output "${{ env.Qt6_DIR }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + Write-Output "${{ env.Qt6_DIR }}/../../Tools/${{ matrix.qt_tools_mingw_install }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + + # 编译 QWindowKit - name: Compile QWindowKit id: build-QWindowKit shell: cmd continue-on-error: true + env: + Qt_SDK: D:\a\QWindowKit\Qt\${{ matrix.qt_ver }}\mingw_64 run: | - cmake -B build -DCMAKE_INSTALL_PREFIX=D:\a\QWindowKit\build\install -DQWINDOWKIT_BUILD_STATIC=ON -DQWINDOWKIT_BUILD_QUICK=OFF -DQWINDOWKIT_BUILD_STYLESUPPORT=ON -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja + cmake -B build -DCMAKE_INSTALL_PREFIX=D:\a\QWindowKit\build\install -DCMAKE_PREFIX_PATH=${env:Qt_SDK} -DQWINDOWKIT_BUILD_STATIC=ON -DQWINDOWKIT_BUILD_QUICK=OFF -DQWINDOWKIT_BUILD_STYLESUPPORT=ON -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja # 尝试运行 qmcorecmd - name: Run core cmd