-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1 KB
/
test.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
# Run unit tests using CTest
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
checkout-and-check-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build & Test & Format
uses: ashutoshvarma/action-cmake-build@master
with:
build-dir: ${{ runner.workspace }}/build
# will set the CC & CXX for cmake
cc: gcc
cxx: g++
build-type: RelWithDebInfo
# Extra options pass to cmake while configuring project
run-test: true
ctest-options: --test-dir test --output-on-failure
- uses: DoozyX/[email protected]
with:
source: '.'
extensions: 'h,cpp'
clangFormatVersion: 14
inplace: True
- uses: EndBug/add-and-commit@v4
with:
author_name: Clang Robot
author_email: [email protected]
message: 'Committing clang-format changes'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}