forked from organicmaps/organicmaps
-
Notifications
You must be signed in to change notification settings - Fork 0
186 lines (167 loc) · 6.02 KB
/
linux-check.yaml
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
name: Linux Check
on:
workflow_dispatch: # Manual trigger
push:
branches:
- master
pull_request:
paths-ignore:
- .gitignore
- .github/**
- '!.github/workflows/linux-check.yaml' # Run check on self change
- CONTRIBUTORS
- LICENSE
- NOTICE
- README.md
- android/**
- iphone/**
- data/strings/**
- docs/**
- packaging/**
- platform/*apple*
- platform/*_android*
- platform/*_ios*
- platform/*_mac*
- platform/*_win*
- pyhelpers/**
- tools/**
- '!tools/python/test_server/**'
- xcode/**
jobs:
linux-no-unity:
name: Linux no unity build
runs-on: ubuntu-24.04
# Cancels previous jobs if the same branch or PR was updated again.
concurrency:
group: ${{ github.workflow }}-no-unity-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
steps:
- name: Free disk space by removing .NET, Android and Haskell
shell: bash
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
- name: Checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 100 # enough to get all commits for the current day
- name: Parallel submodules checkout
shell: bash
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
- name: Install build tools and dependencies
shell: bash
run: |
sudo apt update -y
sudo apt install -y \
ninja-build \
libgl1-mesa-dev \
libglvnd-dev \
libharfbuzz-dev \
qt6-base-dev \
libqt6svg6-dev \
qt6-positioning-dev \
libqt6positioning6-plugins \
libqt6positioning6
- name: Configure
shell: bash
run: ./configure.sh
- name: Configure ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.workflow }}-no-unity
- name: CMake
shell: bash
env:
CC: clang-18
CXX: clang++-18
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
# -g1 should slightly reduce build time.
run: |
cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS=-g1 -DUNITY_DISABLE=ON
- name: Compile
shell: bash
working-directory: build
run: ninja
linux-matrix:
name: Linux builds and tests
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
compiler: [{ CXX: g++-14, CC: gcc-14 }, { CXX: clang++-18, CC: clang-18 }]
CMAKE_BUILD_TYPE: [Debug, RelWithDebInfo]
# Cancels previous jobs if the same branch or PR was updated again.
concurrency:
group: ${{ github.workflow }}-unity-${{ matrix.compiler.CC }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
steps:
- name: Free disk space by removing .NET, Android and Haskell
shell: bash
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
- name: Checkout sources
uses: actions/checkout@v4
- name: Parallel submodules checkout
shell: bash
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
- name: Install build tools and dependencies
shell: bash
run: |
sudo apt update -y
sudo apt install -y \
ninja-build \
libgl1-mesa-dev \
libglvnd-dev \
libharfbuzz-dev \
qt6-base-dev \
libqt6svg6-dev \
qt6-positioning-dev \
libqt6positioning6-plugins \
libqt6positioning6
- name: Configure
shell: bash
run: ./configure.sh
- name: Configure ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.workflow }}-unity-${{ matrix.compiler.CC }}-${{ matrix.CMAKE_BUILD_TYPE }}
- name: CMake
shell: bash
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
# -g1 should slightly reduce build time.
run: |
echo "Building ${{ matrix.CMAKE_BUILD_TYPE }}"
cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \
-DCMAKE_C_FLAGS=-g1 -DCMAKE_CXX_FLAGS=-g1
- name: Compile
shell: bash
working-directory: build
run: ninja
- name: Tests
shell: bash
working-directory: build
env:
QT_QPA_PLATFORM: "offscreen"
# generator_integration_tests - https://github.com/organicmaps/organicmaps/issues/225
# opening_hours_integration_tests - https://github.com/organicmaps/organicmaps/issues/219
# opening_hours_supported_features_tests - https://github.com/organicmaps/organicmaps/issues/219
# routing_integration_tests - https://github.com/organicmaps/organicmaps/issues/221
# shaders_tests - https://github.com/organicmaps/organicmaps/issues/223
# world_feed_integration_tests - https://github.com/organicmaps/organicmaps/issues/215
CTEST_EXCLUDE_REGEX: "generator_integration_tests|opening_hours_integration_tests|opening_hours_supported_features_tests|routing_benchmarks|routing_integration_tests|routing_quality_tests|search_quality_tests|storage_integration_tests|shaders_tests|world_feed_integration_tests"
run: |
sudo locale-gen en_US
sudo locale-gen en_US.UTF-8
sudo locale-gen es_ES
sudo locale-gen es_ES.UTF-8
sudo locale-gen fr_FR
sudo locale-gen fr_FR.UTF-8
sudo locale-gen ru_RU
sudo locale-gen ru_RU.UTF-8
sudo update-locale
ctest -L "omim-test" -E "$CTEST_EXCLUDE_REGEX" --output-on-failure