-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9e611a
commit 5390aeb
Showing
1 changed file
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Windows_QWindowKit | ||
|
||
# 运行条件 | ||
on: push | ||
|
||
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 | ||
env: | ||
targetName: QWindowKit | ||
|
||
# 步骤 | ||
steps: | ||
# 拉取代码 | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: Qt6 | ||
submodules: recursive | ||
|
||
# 安装 Ninja | ||
- name: Setup ninja | ||
uses: seanmiddleditch/gha-setup-ninja@master | ||
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 | ||
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 | ||
# 尝试运行 qmcorecmd | ||
- name: Run core cmd | ||
shell: cmd | ||
continue-on-error: false | ||
run: | | ||
cd /D build/_install/bin && qmcorecmd --help | ||
# tag 查询 github-Release | ||
# 上传 artifacts | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: QWindowKit | ||
path: build/_install/bin | ||
|
||
# tag 上传Release | ||
- name: uploadRelease | ||
if: startsWith(github.event.ref, 'refs/tags/') | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: QWindowKit.zip | ||
asset_name: QWindowKit.zip | ||
tag: ${{ github.ref }} | ||
overwrite: true |