11name : CMake Build
22
3- on :
3+ on :
44 push :
5- paths-ignore :
6- - ' **/picture/**'
7- - ' packaging/**'
8- - ' .clang-*'
9- - ' .gitignore'
10- - ' LICENSE'
11- - ' *.pro'
12- - ' README*'
5+ paths-ignore :
6+ - ' docs/**'
7+ - ' packaging/**'
8+ - ' qmake/**'
9+ - ' translations/**'
10+ - ' **/*.md'
11+ - ' **/*.txt'
12+ - ' **/.clang-*'
13+ - ' **/.gitignore'
14+ - ' **/*.pri'
15+ - ' **/LICENSE*'
16+ - ' **/*.pro'
17+ - ' **/README*'
1318 pull_request :
14- paths-ignore :
15- - ' **/picture/**'
16- - ' packaging/**'
17- - ' .clang-*'
18- - ' .gitignore'
19- - ' LICENSE'
20- - ' *.pro'
21- - ' README*'
19+ paths-ignore :
20+ - ' docs/**'
21+ - ' packaging/**'
22+ - ' qmake/**'
23+ - ' translations/**'
24+ - ' **/*.md'
25+ - ' **/*.txt'
26+ - ' **/.clang-*'
27+ - ' **/.gitignore'
28+ - ' **/*.pri'
29+ - ' **/LICENSE*'
30+ - ' **/*.pro'
31+ - ' **/README*'
32+
33+ env :
34+ MACOSX_DEPLOYMENT_TARGET : ' 13.0'
35+ MACOSX_BUILD_ARCHS : ' x86_64;arm64'
36+ BUILD_DIR : build
37+ BUILD_TYPE : RelWithDebInfo
2238
2339jobs :
2440 build :
3147 - windows-latest
3248 - macos-latest
3349 - ubuntu-latest
34- build_type :
35- - " RelWithDebInfo"
3650 generators :
3751 - " Ninja"
3852
@@ -44,23 +58,36 @@ jobs:
4458 - uses : ./.github/actions/install-dependencies
4559
4660 - name : Configure and build windows
47- if : startsWith(matrix .os, 'windows')
61+ if : runner .os == 'Windows'
4862 shell : pwsh
4963 run : |
5064 .\packaging\windows\Enter-VsDevShell.ps1
5165 cmake `
5266 -S . `
53- -B ./build `
54- -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} `
67+ -B "${{ env.BUILD_DIR }}" `
68+ -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
69+ -G "${{ matrix.generators }}"
70+ cmake --build "${{ env.BUILD_DIR }}" --config ${{ env.BUILD_TYPE }}
71+
72+ - name : Configure and build ubuntu
73+ if : runner.os == 'Linux'
74+ shell : bash
75+ run : |
76+ cmake \
77+ -S . \
78+ -B "${{ env.BUILD_DIR }}" \
79+ -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
5580 -G "${{ matrix.generators }}"
56- cmake --build ./build --config ${{ matrix.build_type }}
57- - name : Configure and build on ubuntu or macos
58- if : startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
81+ cmake --build "${{ env.BUILD_DIR }}" --config ${{ env.BUILD_TYPE }}
82+
83+ - name : Configure and build macos
84+ if : runner.os == 'macOS'
5985 shell : bash
6086 run : |
6187 cmake \
6288 -S . \
63- -B ./build \
64- -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
89+ -B "${{ env.BUILD_DIR }}" \
90+ -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
91+ -DCMAKE_OSX_ARCHITECTURES="${{ env.MACOSX_BUILD_ARCHS }}" \
6592 -G "${{ matrix.generators }}"
66- cmake --build ./build --config ${{ matrix.build_type }}
93+ cmake --build "${{ env.BUILD_DIR }}" --config ${{ env.BUILD_TYPE }}
0 commit comments