-
Notifications
You must be signed in to change notification settings - Fork 3
101 lines (83 loc) · 3.42 KB
/
code-quality.yml
File metadata and controls
101 lines (83 loc) · 3.42 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Code Quality
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
GIT_SUBMODULE_STRATEGY: recursive
permissions:
contents: write
jobs:
clang-tidy:
name: clang-tidy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install \
libc++-dev \
clang \
pkg-config \
libglew-dev \
zlib1g-dev \
libssl-dev \
libcrypt-dev \
libcurl4-openssl-dev \
libgtk-4-dev \
libadwaita-1-dev \
libdbus-1-dev \
libfontconfig-dev \
ninja-build \
libpulse-dev \
- name: clang-tidy verify config
run: bash -c 'OUT=$(clang-tidy --dump-config 2>&1); echo "$OUT"; if echo "$OUT" | grep -q "error:"; then exit -1; fi'
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -GNinja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF -DAUI_IGNORE_OPENSSL=TRUE -DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy -DCMAKE_CXX_FLAGS="-stdlib=libc++ -std=c++20" ${{ matrix.compiler }}
- name: Run tidy
# Build your program with the given configuration
run: cd build && python3 ../.github/tidy-summary.py
valgrind:
name: valgrind
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install \
valgrind \
pkg-config \
libglew-dev \
zlib1g-dev \
libssl-dev \
libcrypt-dev \
libcurl4-openssl-dev \
libgtk-4-dev \
libadwaita-1-dev \
libdbus-1-dev \
libfontconfig-dev \
ninja-build \
libpulse-dev \
- name: Configure CMake asan
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -GNinja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF -DAUI_IGNORE_OPENSSL=TRUE -DAUI_ENABLE_DEATH_TESTS=FALSE
- name: Build project asan
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config Debug
- name: Build AUI tests asan
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config Debug --target Tests
- name: Run AUI tests asan
working-directory: ${{github.workspace}}/build/bin
run: valgrind --suppressions=${{github.workspace}}/valgrind_suppressions.supp --error-exitcode=1 --tool=memcheck --leak-check=full --track-origins=yes --gen-suppressions=all ${{github.workspace}}/build/bin/Tests