-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (56 loc) · 1.55 KB
/
trunk.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
name: Trunk
on:
push:
branches: ["trunk"]
pull_request:
branches: ["trunk"]
jobs:
build:
strategy:
matrix:
cmake_build_type: [Asan, MSan, Release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup LLVM toolchain
uses: KyleMayes/install-llvm-action@v2
with:
version: "16.0"
- name: Configure
working-directory: ${{github.workspace}}
run: |
export CXX="/usr/bin/clang++"
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} ..
- name: Build
working-directory: ${{github.workspace}}
run: |
cd build
make filehash
make filehash-test
- name: Unit Test
working-directory: ${{github.workspace}}
run: |
cd build
./filehash-test
- name: Check formatting
working-directory: ${{github.workspace}}
run: |
find src test \( -name "*.hpp" -o -name "*.cpp" \) > build/sources.txt
clang-format \
--Werror \
--dry-run \
--style=file \
--files=build/sources.txt
- name: Check codestyle
working-directory: ${{github.workspace}}
run: |
clang-tidy \
-p ./build/compile_commands.json \
src/*.cpp test/*.cpp
- name: Test Samples
working-directory: ${{github.workspace}}
run: |
sh ./script/test/random.sh
sh ./script/test/validate.sh