-
Notifications
You must be signed in to change notification settings - Fork 441
64 lines (59 loc) · 1.56 KB
/
build_and_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
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
name: Build and Test
on:
pull_request:
branches-ignore:
- 'gh-pages'
push:
branches:
- 'master'
tags:
- v*
permissions:
contents: read
jobs:
check_code_format:
name: Check code formatting
runs-on: 'ubuntu-20.04'
# The code currently doesn't pass formatting.
# Enable this workflow job once it does, to detect regressions.
if: false
steps:
- uses: actions/checkout@v4
- name: Check clang-format (make test-formatting)
run: |
make test-formatting
plain_makefile:
name: Build and test using plain Makefile
runs-on: 'ubuntu-20.04'
steps:
- name: Build environment setup
run: |
echo 'Nothing to do.'
echo 'GitHub runner includes tools we need already.'
- uses: actions/checkout@v4
- name: Build (make all)
run: |
make all
- name: Test (make test)
run: |
make test
cmake_build:
name: Build and test using CMake
runs-on: 'ubuntu-20.04'
steps:
- name: Build environment setup
run: |
echo 'Nothing to do.'
echo 'GitHub runner includes tools we need already.'
- uses: actions/checkout@v4
- name: Configure (cmake)
run: |
cmake -B "${{github.workspace}}/build"
- name: Build (cmake --build)
working-directory: ${{github.workspace}}/build
run: |
cmake --build .
- name: Test (ctest))
working-directory: ${{github.workspace}}/build
run: |
ctest --output-on-failure