vulkan view 1; #33
Workflow file for this run
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: QMake Build | |
on: | |
# push代码时触发workflow | |
push: | |
paths-ignore: # 下列文件的变更不触发部署,可以自行添加 | |
- '.github/workflows/clean_cache.yml' | |
- '.github/workflows/delete_workflow.yml' | |
- '.github/workflows/cmake.yml' | |
- '.github/workflows/readme.yml' | |
- '.github/workflows/toolchain.yml' | |
- 'doc/**' | |
- '.clang-format' | |
- '.gitignore' | |
- 'LICENSE' | |
- 'README*' | |
pull_request: | |
paths-ignore: # 下列文件的变更不触发部署,可以自行添加 | |
- '.github/workflows/clean_cache.yml' | |
- '.github/workflows/delete_workflow.yml' | |
- '.github/workflows/cmake.yml' | |
- '.github/workflows/readme.yml' | |
- '.github/workflows/toolchain.yml' | |
- 'doc/**' | |
- '.clang-format' | |
- '.gitignore' | |
- 'LICENSE' | |
- 'README*' | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- windows-2019 | |
# - macos-latest | |
# - ubuntu-latest | |
qt_ver: | |
- 6.6.1 | |
libs: | |
- breakpad giflib | |
steps: | |
- name: Restore windows vcpkg | |
if: startsWith(matrix.os, 'windows') | |
uses: actions/cache/restore@v3 | |
with: | |
path: C:\vcpkg\installed | |
key: ${{ runner.os }}-vcpkg-installed-${{ matrix.os }} | |
- name: Restore macos or ubuntu vcpkg | |
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu') | |
uses: actions/cache/restore@v3 | |
with: | |
path: /usr/local/share/vcpkg/installed | |
key: ${{ runner.os }}-vcpkg-installed-${{ matrix.os }} | |
- name: Install dependencies on windows | |
if: startsWith(matrix.os, 'windows') | |
run: | | |
choco install ninja | |
ninja --version | |
cmake --version | |
vcpkg install ${{ matrix.libs }} --triplet x64-windows | |
- name: Install dependencies on macos | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
brew install ninja | |
ninja --version | |
cmake --version | |
clang --version | |
vcpkg install ${{ matrix.libs }} --triplet x64-osx | |
- name: Install dependencies on ubuntu | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get install ninja-build | |
ninja --version | |
cmake --version | |
gcc --version | |
vcpkg install ${{ matrix.libs }} --triplet x64-linux | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{ matrix.qt_ver }} | |
install-deps: 'true' | |
modules: 'qt5compat qtnetworkauth qtimageformats' | |
cache: 'true' | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Install Vulkan SDK | |
uses: humbletim/[email protected] | |
with: | |
cache: true | |
- name: msvc-build | |
if: startsWith(matrix.os, 'windows') | |
shell: cmd | |
run: | | |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
qmake | |
nmake | |
- name: build macos or ubuntu | |
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu') | |
run: | | |
qmake | |
make -j4 |