-
Notifications
You must be signed in to change notification settings - Fork 1.8k
89 lines (76 loc) · 2.76 KB
/
cmake.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
name: CMake Build Matrix
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
BUILD_TYPE: Debug
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu 22.04 GCC",
os: "ubuntu-22.04",
cc: "/usr/bin/gcc",
cxx: "/usr/bin/g++",
format: "/usr/bin/clang-format-14",
tidy: "/usr/bin/clang-tidy-14",
}
- {
name: "Ubuntu 22.04 Clang",
os: "ubuntu-22.04",
cc: "/usr/bin/clang-14",
cxx: "/usr/bin/clang++-14",
format: "/usr/bin/clang-format-14",
tidy: "/usr/bin/clang-tidy-14",
}
- {
name: "macOS 12 (Monterey) AppleClang",
os: macos-12,
cc: "/usr/bin/clang",
cxx: "/usr/bin/clang++",
format: "/usr/local/opt/llvm@14/bin/clang-format",
tidy: "/usr/local/opt/llvm@14/bin/clang-tidy",
}
steps:
- uses: actions/checkout@v2
- name: Print env
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
- name: Install Dependencies (Ubuntu)
if: runner.os == 'Linux'
working-directory: ${{github.workspace}}
run: sudo bash ./build_support/packages.sh -y
- name: Install Dependencies (OSX)
if: runner.os == 'macOS'
working-directory: ${{github.workspace}}
run: bash ./build_support/packages.sh -y
- name: Configure CMake
run: CC=${{matrix.config.cc}} CXX=${{matrix.config.cxx}} cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCLANG_FORMAT_BIN=${{matrix.config.format}} -DCLANG_TIDY_BIN=${{matrix.config.tidy}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Check Format
working-directory: ${{github.workspace}}/build
run: make check-format
- name: Check Lint
working-directory: ${{github.workspace}}/build
run: make check-lint
- name: Check Clang Tidy
working-directory: ${{github.workspace}}/build
run: make check-clang-tidy
- name: Check Tests (Ubuntu)
if: runner.os == 'Linux'
working-directory: ${{github.workspace}}/build
run: make build-tests && make check-public-ci-tests
- name: Check Tests (OSX)
if: runner.os == 'macOS'
working-directory: ${{github.workspace}}/build
# Disable container overflow checks on OSX
run: make build-tests && make check-public-ci-tests