-
Notifications
You must be signed in to change notification settings - Fork 79
61 lines (47 loc) · 1.44 KB
/
build.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
name: build
permissions:
contents: read
on:
push:
paths-ignore:
- '**/*.md'
pull_request:
paths-ignore:
- '**/*.md'
branches:
- main
env:
BUILD_TYPE: RelWithDebInfo
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Check Tabs
run: |
if git grep -n $'\t' *.cpp *.c *.hpp *.h; then echo 'Please replace tabs with spaces in source files.'; false; fi
- name: Check Whitespace
run: |
if git grep -n '[[:blank:]]$' *.cpp *.c *.hpp *.h; then echo 'Please remove trailing whitespace from source files.'; false; fi
build:
needs: check
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Create Build Directory
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Run CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake -DENABLE_CLILOADER=1 -DCMAKE_BUILD_TYPE=$BUILD_TYPE $GITHUB_WORKSPACE
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --parallel 4 --config $BUILD_TYPE
#- name: Test
# working-directory: ${{runner.workspace}}/build
# shell: bash
# run: ctest -C $BUILD_TYPE