forked from AlpineMapsOrg/renderer
-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (116 loc) · 3.9 KB
/
linux.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Linux tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
concurrency:
group: linux-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
compiler: [gcc12, clang15, clang17, clang19]
build_type: [Release]
include:
- compiler: gcc12
CC: "/usr/bin/gcc-12"
CXX: "/usr/bin/g++-12"
- compiler: clang15
CC: '/usr/bin/clang-15'
CXX: '/usr/bin/clang++-15'
- compiler: clang17
CC: '/usr/bin/clang-17'
CXX: '/usr/bin/clang++-17'
- compiler: clang19
CC: '/usr/bin/clang-19'
CXX: '/usr/bin/clang++-19'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Install Linux Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential ninja-build lld clang-15 libgl1-mesa-dev libxcb-cursor-dev xorg-dev libxrandr-dev libxcursor-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev libdrm-dev libgbm-dev xvfb libxcb-cursor0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0
- name: Install Clang 15
if: matrix.compiler == 'clang15'
run: |
sudo apt-get install -y clang-15
- name: Install Clang 17
if: matrix.compiler == 'clang17'
run: |
sudo apt-get install -y clang-17
- name: Install Clang 19
if: matrix.compiler == 'clang19'
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x ./llvm.sh
sudo ./llvm.sh 19
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
aqtversion: '==3.1.*'
version: '6.8.1'
host: 'linux'
target: 'desktop'
arch: 'linux_gcc_64'
dir: '${{github.workspace}}/qt'
install-deps: 'true'
modules: 'qtcharts qtpositioning'
cache: true
- name: Debug output
shell: bash
run: |
echo "${{github.workspace}}/qt/Qt/6.8.1":
ls ${{github.workspace}}/qt/Qt/6.8.1
echo "==="
echo "${QT_ROOT_DIR}/lib/cmake/Qt6Linguist:"
ls ${QT_ROOT_DIR}/lib/cmake/Qt6Linguist
echo "==="
- name: Configure
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
CMAKE_PREFIX_PATH: ${{env.QT_ROOT_DIR}}/lib/cmake
run: >
cmake -G Ninja
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}}
-DALP_ENABLE_ASSERTS=ON
-DALP_ENABLE_ADDRESS_SANITIZER=ON
-DALP_ENABLE_APP_SHUTDOWN_AFTER_60S=ON
-DCMAKE_BUILD_TYPE=Debug
-DALP_USE_LLVM_LINKER=ON
-B ./build
- name: Build
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
run: |
cmake --build ./build
- name: Don't close loaded libraries for better sanitizer output
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
run: |
echo "#include <stdio.h>" >> dlclose.c
echo "int dlclose(void*) { return 0; }" >> dlclose.c
$CC --shared dlclose.c -o libdlclose.so
- name: Unittests on Linux
env:
QT_QPA_PLATFORM: offscreen
DISPLAY: :1
LD_PRELOAD: ./libdlclose.so
LSAN_OPTIONS: suppressions=./sanitizer_supressions/linux_leak.supp
ASAN_OPTIONS: verify_asan_link_order=0
# QSG_RENDER_LOOP: basic
run: |
./build/alp_external/radix/unittests/unittests_radix
./build/unittests/nucleus/unittests_nucleus
Xvfb :1 -screen 0 1024x768x16 &
sleep 5
./build/unittests/gl_engine/unittests_gl_engine
# ./build/app/alpineapp # rendering is not starting, and now it crashes on shutdown (qthread destroyed while running). likely due to the fake opengl/offscreen rendering