-
Notifications
You must be signed in to change notification settings - Fork 27
105 lines (100 loc) · 3.06 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
99
100
101
102
103
104
105
name: ci
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
code-style:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install clang-format-18
run: |
sudo apt-get update
sudo apt-get install clang-format-18
sudo ln -s -f /usr/bin/clang-format-18 /usr/bin/clang-format
clang-format --version
- name: Check code style
run: |
cmake -B build .
cmake --build build -- check-format
windows:
needs: code-style
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner:
- windows-2019
- windows-2022
arch:
- amd64
- x86
- amd64_arm64
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Build
shell: cmd
run: |
cmake -GNinja -B build .
cmake --build build -- all
- name: Test
if: ${{ matrix.arch != 'amd64_arm64' }}
shell: cmd
run: |
cmake --build build -- check
macos:
needs: code-style
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner:
- macos-12
- macos-13
- macos-14
arch:
- x86_64
- arm64
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
run: |
cmake -DCMAKE_OSX_ARCHITECTURES=${{matrix.arch}} -B build .
cmake --build build -- all
- name: Test
if: ${{ matrix.runner == 'macos-14' || matrix.arch != 'arm64' }}
run: |
cmake --build build -- check
linux:
needs: code-style
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
run: |
cmake -B build .
cmake --build build -- all
- name: Test
run: |
cmake --build build -- check