-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (102 loc) · 2.86 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: CMake
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@v4
- name: Install LLVM and Clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16
sudo apt-get -y install clang-tidy-16
- name: Replace clang-tidy
run: sudo cp /usr/bin/clang-tidy-16 /usr/bin/clang-tidy -f
- name: Install GCC 12
run: sudo apt-get -y install gcc-12
- name: Configure GCC
env:
CC: gcc-12
CXX: gcc-12
working-directory: ${{github.workspace}}
run: cmake --preset env-cc-release
- name: Build GCC
env:
CC: gcc-12
CXX: gcc-12
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: cmake --build --preset env-cc-release
- name: Configure Clang
env:
CC: clang-16
CXX: clang-16
working-directory: ${{github.workspace}}
run: |
rm -rf build
cmake --preset env-cc-release
- name: Build Clang
env:
CC: clang-16
CXX: clang-16
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: cmake --build --preset env-cc-release
build-windows:
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@v4
- name: Setup scoop
uses: MinoruSekine/setup-scoop@v2
with:
buckets: extras
scoop_checkup: true
scoop_update: true
update_path: true
- name: Setup MSVC
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64
- name: Configure
working-directory: ${{github.workspace}}
run: cmake --preset msvc-release
- name: Build
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: cmake --build --preset msvc-release
build-macos:
runs-on: macos-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@v4
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "15.0"
- name: Configure
env:
CC: clang-15
CXX: clang-15
working-directory: ${{github.workspace}}
run: cmake --preset env-cc-release
- name: Build
env:
CC: clang-15
CXX: clang-15
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: cmake --build --preset env-cc-release