-
Notifications
You must be signed in to change notification settings - Fork 12
49 lines (44 loc) · 1.2 KB
/
build_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
# SPDX-License-Identifier: Apache-2.0
name: Ubuntu Build & Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Ubuntu
run: ./scripts/setup-ubuntu.sh
- name: Check License Header
uses: apache/skywalking-eyes/header@v0.4.0
- name: Formatting Cmake files
run: ./scripts/run-cmake-format.sh
- name: Formatting Clang files
run: ./scripts/run-clang-format.sh
- name: Checking formatting
run: git diff --exit-code
- name: Checking code style
run: ./scripts/run-clang-tidy.sh
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Ubuntu
run: |
./scripts/setup-ubuntu.sh
mkdir build
- name: Run cmake
run: |
cmake --version
cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Debug -DBUILD_TZ_LIB=ON
- name: Build
run: ninja -C build
- name: Test
run: ctest --test-dir build --output-on-failure --timeout 30