更新为最新的cmake内容 #27
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
name: Windows | |
on: | |
# push代码时触发workflow | |
push: | |
branches: | |
- master | |
- main | |
tags: | |
- "*" | |
# 忽略README.md | |
paths-ignore: | |
- '*.md' | |
- 'LICENSE' | |
- 'Doxyfile.in' | |
- '.clang-format' | |
- '.git*' | |
- '.github/workflows/ubuntu.yml' | |
- '.github/workflows/macos.yml' | |
# pull_request时触发workflow | |
pull_request: | |
paths-ignore: | |
- '*.md' | |
- 'LICENSE' | |
- 'Doxyfile.in' | |
- '.clang-format' | |
- '.git*' | |
- '.github/workflows/ubuntu.yml' | |
- '.github/workflows/macos.yml' | |
jobs: | |
build: | |
name: CI | |
# 运行平台, windows-latest目前是windows server 2019 | |
# 参考文档 https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# 矩阵配置 | |
matrix: | |
build_type: [Release] | |
os: [windows-2019] | |
qt_version: [5.15.2,6.3.0] | |
qt_arch: [win64_msvc2019_64] | |
msvc_arch: [x64] | |
qt_arch_install: [msvc2019_64] | |
include: | |
- qt_version: 6.3.0 | |
modules: "qt5compat" | |
env: | |
targetName: exedemo.exe | |
# 步骤 | |
steps: | |
# 拉取代码 | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
# 安装Qt | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{ matrix.qt_version }} | |
arch: ${{ matrix.qt_arch }} | |
modules: ${{ matrix.modules }} | |
- name: Setup VS tools (Windows) | |
uses: egor-tensin/vs-shell@v2 | |
with: | |
arch: x64 | |
- name: ${{ matrix.os }} - ${{ matrix.qt_version }} - Generate Dependencies and Build | |
run: | | |
cmake -S . -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
cmake --build build --config ${{ matrix.build_type }} |