-
Notifications
You must be signed in to change notification settings - Fork 79
80 lines (77 loc) · 2.91 KB
/
build_and test_on_ubuntu_20_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
name: Ubuntu 20.04
on:
pull_request:
branches:
- master
push:
branches:
- master
paths-ignore:
- '.github/workflows/**'
jobs:
build_gcc_meson:
name: gcc and meson
runs-on: ubuntu-20.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 and Co
run: sudo apt-get -y install gcc-10 g++-10 libtbb-dev ccache libtool pkg-config
- name: Install meson and ninja via pip
run: "pip install meson ninja"
- name: Install libosmscout dependencies
run: "sudo apt-get update && sudo apt-get install -y
libxml2-dev
libprotobuf-dev protobuf-compiler
libagg-dev
libfreetype6-dev libcairo2-dev libpangocairo-1.0-0 libpango1.0-dev
qt5-default qtdeclarative5-dev libqt5svg5-dev qtlocation5-dev qtpositioning5-dev qttools5-dev-tools
qttools5-dev qtmultimedia5-dev
libglm-dev libglew-dev freeglut3 freeglut3-dev
libmarisa-dev"
- name: Configure build project
run: meson setup --buildtype debugoptimized --unity on debug
env:
CXX: g++-10
CC: gcc-10
- name: Build project
run: ninja -C debug
- name: Run tests
run: meson test -C debug --print-errorlogs
build_gcc_cmake:
name: gcc and cmake
runs-on: ubuntu-20.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-10 g++-10 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
libagg-dev
libfreetype6-dev libcairo2-dev libpangocairo-1.0-0 libpango1.0-dev
qt5-default qtdeclarative5-dev libqt5svg5-dev qtlocation5-dev qtpositioning5-dev qttools5-dev-tools
qttools5-dev qtmultimedia5-dev
libglm-dev libglew-dev freeglut3 freeglut3-dev libglfw3-dev libxrandr-dev libxcursor-dev libxinerama-dev libxi-dev libxxf86vm-dev
xvfb
libmarisa-dev"
- name: Configure build project
run: cmake -B build -DCMAKE_UNITY_BUILD=ON -Wno-dev -G "Ninja"
env:
CXX: g++-10
CC: gcc-10
- name: Build project
run: cmake --build build
- name: Install project
run: sudo cmake --install build
- name: Run tests
run: xvfb-run ctest -j 2 --output-on-failure
env:
QT_QPA_PLATFORM: offscreen
working-directory: build