Skip to content

[workflow]:优化; #50

[workflow]:优化;

[workflow]:优化; #50

Workflow file for this run

name: QMake Build
on:
push:
paths-ignore: # 下列文件的变更不触发部署,可以自行添加
- '**/picture/**'
- 'cmake/**'
- 'packaging/**'
- '.clang-*'
- '.gitignore'
- 'CMake*'
- 'LICENSE'
- 'README*'
pull_request:
paths-ignore: # 下列文件的变更不触发部署,可以自行添加
- '**/picture/**'
- 'cmake/**'
- 'packaging/**'
- '.clang-*'
- '.gitignore'
- 'CMake*'
- 'LICENSE'
- 'README*'
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-2019
- macos-latest
- ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/install-dependencies
with:
os_name: ${{ matrix.os }}
- name: mkdir build
shell: bash
run: |
mkdir build
- 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 ./../.
.\..\jom\jom.exe
working-directory: build
- name: ubuntu-build
if: startsWith(matrix.os, 'ubuntu')
shell: bash
run: |
qmake ./../.
make -j $(nproc)
working-directory: build
- name: macos-build
if: startsWith(matrix.os, 'macos')
shell: bash
run: |
qmake ./../.
make -j $(sysctl -n hw.ncpu)
working-directory: build