-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (59 loc) · 2.14 KB
/
cmake-multi-platform.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: CMake on multiple platforms
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Format CMake files
id: cmake-format
uses: PuneetMatharu/[email protected]
with:
args: --config-files .cmake-format --in-place
- name: Run clang-format style check for C/C++
uses: DoozyX/[email protected]
with:
clangFormatVersion: 17
inplace: True
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_user_name: cmake-clang-format-bot
commit_message: "Automated commit of cmake-clang-format changes."
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest, build_type: DEV }
- { os: ubuntu-latest, build_type: REL }
- { os: windows-latest, build_type: DEV }
- { os: windows-latest, build_type: REL }
- { os: macos-latest, build_type: DEV }
- { os: macos-latest, build_type: REL }
steps:
- uses: actions/checkout@v3
- name: Configure CMake
working-directory: ${{ github.workspace }}
run: |
cmake --preset "DEFAULT-${{ matrix.build_type }}"
- name: Build
working-directory: ${{ github.workspace }}
run: |
cmake --build --preset "DEFAULT-${{ matrix.build_type }}"
- name: Install
working-directory: ${{ github.workspace }}
run: |
cmake --build --preset "DEFAULT-${{ matrix.build_type }}" --target "install_project"
- name: Execute Test
working-directory: ${{ github.workspace }}/.out/install/DEFAULT-${{ matrix.build_type }}/bin
run: |
./app