forked from Framstag/libosmscout
-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (114 loc) · 4.53 KB
/
sanitize_on_ubuntu_22_04.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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Sanitize
on:
pull_request:
branches:
- master
push:
branches:
- master
paths-ignore:
- '.github/workflows/**'
jobs:
sanitize_clang:
name: clang
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update package list
run: sudo apt-get update
- name: Install software-properties-common
run: sudo apt-get install software-properties-common
- name: Install clang compiler, cmake and ninja
run: sudo apt-get -y install clang libc++-dev ccache libtool pkg-config cmake ninja-build
- name: Install libosmscout dependencies
run: "sudo apt-get install -y
libxml2-dev
libprotobuf-dev protobuf-compiler
libglm-dev libglew-dev libglut-dev libglfw3-dev libxrandr-dev libxcursor-dev libxinerama-dev libxi-dev libxxf86vm-dev
libmarisa-dev
xvfb"
- name: Configure build project
run: "cmake -B build
-DCMAKE_BUILD_TYPE=Debug
-DOSMSCOUT_BUILD_DOC_API=OFF
-DOSMSCOUT_BUILD_WEBPAGE=OFF
-DOSMSCOUT_BUILD_TOOL_OSMSCOUT2=OFF
-DOSMSCOUT_BUILD_TOOL_OSMSCOUTOPENGL=OFF
-DOSMSCOUT_BUILD_DEMOS=OFF
-DOSMSCOUT_BUILD_TOOL_STYLEEDITOR=OFF
-DOSMSCOUT_BUILD_BINDING_JAVA=OFF
-DOSMSCOUT_DEBUG_LABEL_LAYOUTER=ON
-DOSMSCOUT_DEBUG_GROUNDTILES=ON
-DOSMSCOUT_DEBUG_COASTLINE=ON
-DOSMSCOUT_DEBUG_TILING=ON
-DOSMSCOUT_DEBUG_ROUTING=ON -DCMAKE_CXX_FLAGS=\"-fsanitize=address -fsanitize=undefined\"
-DCMAKE_EXE_LINKER_FLAGS=\"-fsanitize=address -fsanitize=undefined\"
-DCMAKE_UNITY_BUILD=ON -Wno-dev -G \"Ninja\""
env:
CXX: clang++
CC: clang
- name: Build project
run: cmake --build build
- name: Install project
run: sudo cmake --install build
- name: Run tests
run: ctest -j 2 --output-on-failure --exclude-regex "PerformanceTest"
working-directory: build
- name: Run PerformanceTest tests
# UI libraries leaks memory on exit, lets ignore it...
run: xvfb-run ctest -j 2 --output-on-failure --tests-regex "PerformanceTest"
env:
ASAN_OPTIONS: detect_leaks=0
working-directory: build
sanitize_gcc:
name: gcc
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install software-properties-common
run: sudo apt-get install software-properties-common
- name: Install gcc compiler, cmake and ninja
run: sudo apt-get -y install gcc g++ libtbb-dev ccache libtool pkg-config cmake ninja-build
- name: Install libosmscout dependencies
run: "sudo apt-get update && sudo apt-get install -y
libxml2-dev
libprotobuf-dev protobuf-compiler
libmarisa-dev
libglm-dev libglew-dev libglut-dev libglfw3-dev libxrandr-dev libxcursor-dev libxinerama-dev libxi-dev libxxf86vm-dev
xvfb"
- name: Configure build project
run: "cmake -B build
-DCMAKE_BUILD_TYPE=Debug
-DOSMSCOUT_BUILD_DOC_API=OFF
-DOSMSCOUT_BUILD_WEBPAGE=OFF
-DOSMSCOUT_BUILD_TOOL_OSMSCOUT2=OFF
-DOSMSCOUT_BUILD_TOOL_OSMSCOUTOPENGL=OFF
-DOSMSCOUT_BUILD_DEMOS=OFF
-DOSMSCOUT_BUILD_TOOL_STYLEEDITOR=OFF
-DOSMSCOUT_BUILD_BINDING_JAVA=OFF
-DOSMSCOUT_DEBUG_LABEL_LAYOUTER=ON
-DOSMSCOUT_DEBUG_GROUNDTILES=ON
-DOSMSCOUT_DEBUG_COASTLINE=ON
-DOSMSCOUT_DEBUG_TILING=ON
-DOSMSCOUT_DEBUG_ROUTING=ON
-DCMAKE_CXX_FLAGS=\"-fsanitize=address -fsanitize=undefined\"
-DCMAKE_EXE_LINKER_FLAGS=\"-fsanitize=address -fsanitize=undefined\"
-DCMAKE_UNITY_BUILD=ON -Wno-dev -G \"Ninja\""
env:
CXX: g++
CC: gcc
- name: Build project
run: cmake --build build
- name: Install project
run: sudo cmake --install build
- name: Run tests
run: ctest -j 2 --output-on-failure --exclude-regex "PerformanceTest"
working-directory: build
- name: Run PerformanceTest tests
# UI libraries leaks memory on exit, lets ignore it...
run: xvfb-run ctest -j 2 --output-on-failure --tests-regex "PerformanceTest"
env:
ASAN_OPTIONS: detect_leaks=0
working-directory: build