-
Notifications
You must be signed in to change notification settings - Fork 174
232 lines (228 loc) · 7.38 KB
/
build.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
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
name: Build Navit Binarys
on: [push, pull_request]
jobs:
sanity_check:
runs-on: ubuntu-latest
container:
image: navit/sanity_check:latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
##- name: run sanity check script
## run: bash scripts/ci_sanity_checks.sh
##- uses: reviewdog/action-suggester@v1
## with:
## github_token: ${{ secrets.github_token }}
## tool_name: Navit sanity Check
## level: error
## fail_on_error: false
# FIXME: deactivated as somethings broken with it
#- name: Run CheckStyle Test
# run: ./gradlew checkstyleMain
#- uses: actions/upload-artifact@v1
# with:
# name: Store checkstyle report
# path: navit/android/checkstyle
build_linux:
runs-on: ubuntu-latest
needs: sanity_check
container:
image: debian:latest
steps:
- uses: actions/checkout@v2
- run: |
apt-get update && apt-get install -y git
- name: Setup requirements
run: |
bash scripts/setup_common_requirements.sh
apt-get install -y libpng-dev libfreetype6-dev libdbus-glib-1-dev libgtk2.0-dev curl
- name: Build for Linux
run: bash scripts/build_linux.sh
- uses: actions/upload-artifact@v2
with:
name: Linux Artifacts
path: linux/_CPack_Packages
- name: Update Navit-Download-Center
run: |
bash scripts/update_download_center.sh
run_doxygen:
runs-on: ubuntu-latest
needs: [build_android, build_wince, build_tomtom_minimal, build_linux, build_tomtom_plugin, build_win32]
container:
image: debian:latest
steps:
- uses: actions/checkout@v2
- name: Install doxygen and other essentials
run: apt-get update && apt-get -y install doxygen ca-certificates git rsync
- name: Run doxygen
run: cd navit && doxygen
- name: Update results to Github
run: bash scripts/update_doxygen.sh
- uses: actions/upload-artifact@v1
with:
path: /root/project/doc
build_sailfish:
runs-on: ubuntu-latest
needs: sanity_check
container:
image: coderus/sailfishos-platform-sdk:4.4.0.64
steps:
- uses: actions/checkout@v1
# TODO currently broken because of USER in Dockerimage and probably because of double containers as well
- name: run build
run: sudo -E bash contrib/sailfish/build_sailfish_ci.sh
env:
VERSION_ID: 4.4.0.64
- uses: actions/upload-artifact@v1
with:
name: Store rpm
path: rpmbuild/RPMS/
build_android:
runs-on: ubuntu-latest
needs: sanity_check
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: if [ "X$UID" == X0 ]; then apt update && apt install -y sudo; fi
- name: Install requirements
run: bash scripts/setup_android.sh
- name: Setup Keystore and Playstore Keys
run: scripts/setup_publish_keys.sh
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Install NDK
run: sdkmanager "ndk;23.0.7599858"
- name: Build and upload Android
run: fastlane github_actions
- name: Run Lint Test
run: |
ln -sf navit/navit.dtd navit.dtd
mkdir test-results
./gradlew lint test
- name: Run Javadoc
run: ./gradlew generateDebugJavadoc
- uses: actions/upload-artifact@v3
with:
name: Store APK
path: build/outputs/apk
- uses: actions/upload-artifact@v3
with:
name: Store logs
path: build/outputs/logs
- uses: actions/upload-artifact@v3
with:
name: Store Javadoc
path: build/outputs/docs/javadoc
- uses: actions/upload-artifact@v3
with:
name: Store Lint reports
path: build/reports
- uses: actions/upload-artifact@v3
with:
name: Android Test-results
path: test-results
- name: Update Navit-Download-Center
run: |
bash scripts/update_download_center.sh
build_win32:
runs-on: ubuntu-latest
needs: sanity_check
container:
image: ubuntu:16.04
steps:
- uses: actions/checkout@v2
- run: |
apt-get update && apt-get install -y git
- name: Prepare the Windows build environment
run: |
apt-get update && xargs -a scripts/setup_14.04_requirements.list apt-get install -y
apt-get install -y software-properties-common
add-apt-repository -y ppa:george-edison55/cmake-3.x
apt-get install -y cmake mingw-w64 mingw-w64-tools default-jdk nsis libsaxonb-java curl
- name: Build for Windows
run: |
bash scripts/build_win32.sh
- uses: actions/upload-artifact@v2
with:
name: Win32
path: win32/navit.exe
- name: Update Navit-Download-Center
run: |
bash scripts/update_download_center.sh
build_wince:
runs-on: ubuntu-latest
needs: sanity_check
container:
image: navit/dockerfiles:wince
steps:
- uses: actions/checkout@v1
- run: |
apt-get update && apt-get install -y git-core
- name: Prepare the WinCE build environment
run: |
bash scripts/setup_wince.sh
- name: Build for Windows CE
run: bash scripts/build_wince.sh
- uses: actions/upload-artifact@v1
with:
path: wince/output
name: WinCE Binary
- name: Update Navit-Download-Center
run: |
bash scripts/update_download_center.sh
build_tomtom_minimal:
runs-on: ubuntu-latest
needs: sanity_check
container:
image: navit/tomtom-ng
steps:
- uses: actions/checkout@v2
- name: Prepare the tomtom build environment
run: |
bash scripts/setup_common_requirements.sh
apt-get install -y xsltproc
- name: Build for Tomtom (minimal)
run: bash scripts/build_tomtom_minimal.sh
- uses: actions/upload-artifact@v2
with:
name: Tomtom Minimal
path: /output
- name: Update Navit-Download-Center
run: |
bash scripts/update_download_center.sh
build_tomtom_plugin:
runs-on: ubuntu-latest
needs: sanity_check
container:
image: navit/tomtom-ng
steps:
- uses: actions/checkout@v2
- name: Prepare the tomtom build environment
run: |
bash scripts/setup_common_requirements.sh
apt-get install -y xsltproc
- name: Build for Tomtom (plugin)
run: |
bash scripts/build_tomtom_plugin.sh
- uses: actions/upload-artifact@v2
with:
name: Tomtom Plugin
path: /output
- name: Update Navit-Download-Center
run: |
bash scripts/update_download_center.sh
merge_trunk_in_master:
runs-on: ubuntu-latest
needs: [build_android, build_wince, build_tomtom_minimal, build_linux, build_tomtom_plugin, build_win32]
if: github.ref == 'trunk'
steps:
- uses: actions/checkout@master
- name: Merge to master branch
uses: devmasx/[email protected]
with:
type: now
target_branch: 'master'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}