-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (83 loc) · 2.35 KB
/
ci.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: ci
on:
- push
- pull_request
- workflow_dispatch
jobs:
build:
name: ${{ matrix.os }} ${{ matrix.compiler }} ${{ matrix.build_type }}
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
runs-on: ${{ matrix.os }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- macos-13
- windows-2022
compiler:
- llvm
- gcc
build_type:
- Debug
- Release
exclude:
- os: windows-2022
compiler: gcc
- os: macos-13
compiler: gcc
include:
- os: windows-2022
compiler: msvc
build_type: Debug
- os: windows-2022
compiler: msvc
build_type: Release
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Cpp Environment
uses: aminya/setup-cpp@v1
with:
compiler: ${{ matrix.compiler }}
vcvarsall: ${{ contains(matrix.os, 'windows') }}
cmake: true
ninja: true
vcpkg: true
- name: CMake Configure
env:
VCPKG_ROOT: '~/vcpkg'
shell: bash
run: |
if [ "${{ runner.os }}" == "Windows" ]; then
cmake --preset=Windows-${{ matrix.compiler }}-${{ matrix.build_type }}
else
cmake --preset=${{ matrix.compiler }}-${{ matrix.build_type }}
fi
- name: CMake Build
shell: bash
run: |
if [ "${{ runner.os }}" == "Windows" ]; then
cmake --build --preset=Windows-${{ matrix.compiler }}-${{ matrix.build_type }}
else
cmake --build --preset=${{ matrix.compiler }}-${{ matrix.build_type }}
fi
format:
name: Formatting
runs-on: ubuntu-22.04
env:
CLANG_FORMAT_VERSION: 17
strategy:
fail-fast: false
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Clang-Format
uses: aminya/setup-cpp@v1
with:
clangformat: ${{ env.CLANG_FORMAT_VERSION }}
- name: Format Code
run: cmake -DCLANG_FORMAT_EXECUTABLE=clang-format-${{ env.CLANG_FORMAT_VERSION }} -P cmake/Format.cmake
- name: Check Formatting
run: git diff --color --exit-code