-
Notifications
You must be signed in to change notification settings - Fork 10
185 lines (150 loc) · 6.45 KB
/
main.yaml
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# Continuous Integration tests
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
pull_request:
branches: [main]
# Ensure that only one instance of the workflow is run at a time for each branch/tag.
# Jobs currently running on the branch/tag will be cancelled when new commits are pushed.
# See https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency.
concurrency:
# `github.workflow` is the workflow name, `github.ref` is the current branch/tag identifier
group: ${{ format('{0}:{1}', github.workflow, github.ref) }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-linux:
name: Linux GCC
strategy:
matrix:
container: ['gcc:5', 'gcc:7', 'gcc:9', 'gcc:10', 'gcc:11', 'gcc:12', 'gcc:13']
# The type of runner that the job will run on
runs-on: ubuntu-latest
continue-on-error: true
# Use the container for this specific version of gcc
container: ${{ matrix.container }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Code
uses: actions/checkout@v3
# Download and install cmake
- name: Install CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.27.1
ninjaVersion: 1.11.1
- name: Configure CMake
run: |
cmake -E make_directory build
cmake -S . -B build -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCI_BUILD=ON
- name: Build
timeout-minutes: 30
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build build --config Release --parallel 2
- name: Test
timeout-minutes: 5
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
build/tests/test_nuclear
for f in build/tests/individual/*; do echo "Testing $f"; ./$f; done
build-osx:
name: MacOS Clang
# The type of runner that the job will run on
runs-on: macos-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Code
uses: actions/checkout@v3
- name: Configure CMake
run: |
cmake -E make_directory build
cmake -S . -B build -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release
- name: Build
timeout-minutes: 30
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build build --config Release --parallel 2
- name: Test
timeout-minutes: 5
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
build/tests/test_nuclear
for f in build/tests/individual/*; do echo "Testing $f"; ./$f; done
build-windows:
name: Windows MSVC
# The type of runner that the job will run on
runs-on: windows-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Code
uses: actions/checkout@v3
- name: Configure CMake
run: |
cmake -E make_directory build
cmake -S . -B build -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release
- name: Build
timeout-minutes: 30
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build build --config Release --parallel 2
- name: Test
timeout-minutes: 5
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
build/tests/Release/test_nuclear.exe
for f in build/tests/individual/Release/*; do echo "Testing $f"; ./$f; done
shell: bash
check-clang-tidy-linux:
name: Clang-Tidy Linux
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Install clang-tidy-15
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" | sudo tee /etc/apt/sources.list.d/llvm-15
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" | sudo tee -a /etc/apt/sources.list.d/llvm-15
sudo apt-get update
sudo apt-get install -y clang-tidy-15
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Code
uses: actions/checkout@v3
# Download and install cmake
- name: Install CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.27.1
ninjaVersion: 1.11.1
- name: Configure CMake
run: |
cmake -E make_directory build
cmake -S . -B build -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCI_BUILD=ON -DENABLE_CLANG_TIDY=ON
- name: Build
timeout-minutes: 30
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build build --config Release --parallel 2
check-clang-tidy-msvc:
name: Clang-Tidy MSVC
# The type of runner that the job will run on
runs-on: windows-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Code
uses: actions/checkout@v3
- name: Configure CMake
run: |
cmake -E make_directory build
cmake -S . -B build -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCI_BUILD=ON -DENABLE_CLANG_TIDY=ON
- name: Build
timeout-minutes: 30
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build build --config Release --parallel 2