forked from heremaps/gluecodium
-
Notifications
You must be signed in to change notification settings - Fork 0
380 lines (365 loc) · 13.1 KB
/
functional-tests.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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
name: Functional tests
on:
push:
paths-ignore:
- 'CHANGELOG.md'
- 'gluecodium/src/main/resources/version.properties'
- 'docs/**'
- 'scripts/**'
- 'tools/**'
pull_request:
paths-ignore:
- 'CHANGELOG.md'
- 'gluecodium/src/main/resources/version.properties'
- 'docs/**'
- 'scripts/**'
- 'tools/**'
jobs:
cpp:
name: C++
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install JDK
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
!*gluecodium*
!*lime-*
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Install CMake
uses: jwlawson/[email protected]
with:
cmake-version: '3.19.3'
- name: Update apt repos
run: sudo apt-get -qq update || true
- name: Install ninja
run: sudo apt install -y ninja-build
- name: Install valgrind
run: sudo apt install -y valgrind
- name: Build and run functional tests
run: |
scripts/build-cpp-functional --valgrind --buildGluecodium
working-directory: functional-tests
- name: Print Valgrind results
if: ${{ always() }}
run: cat functional-tests/build-cpp/Testing/Temporary/MemoryChecker.1.log
android:
name: Android
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install JDK
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
!*gluecodium*
!*lime-*
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Install GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 8
- name: Install CMake
uses: jwlawson/[email protected]
with:
cmake-version: '3.19.3'
- name: Install ninja
run: sudo apt install -y ninja-build
- name: Install Android SDK
run: |
ANDROID_API_LEVEL=android-28
ANDROID_BUILD_TOOLS_VERSION=28.0.3
ANDROID_HOME=${HOME}/android-sdk-linux
PATH=${PATH}:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/cmdline-tools/latest/bin
mkdir -p "${ANDROID_HOME}/cmdline-tools"
wget -q "https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip" -O android-sdk-tools.zip
unzip -q android-sdk-tools.zip -d ${ANDROID_HOME}/cmdline-tools
mv "${ANDROID_HOME}/cmdline-tools/cmdline-tools" "${ANDROID_HOME}/cmdline-tools/latest"
mkdir -p ~/.android
touch ~/.android/repositories.cfg
yes | sdkmanager --licenses
yes | sdkmanager "platforms;${ANDROID_API_LEVEL}" > /dev/null
yes | sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" > /dev/null
- name: Build and run functional tests
run: |
export ANDROID_HOME=${HOME}/android-sdk-linux
export ANDROID_SDK_ROOT=${ANDROID_HOME}
export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools
./scripts/build-android-functional --publish --hostOnly
working-directory: functional-tests
- name: Clean build dir
run: ./scripts/clean
working-directory: functional-tests
- name: Build and run namerules tests
run: |
export ANDROID_HOME=${HOME}/android-sdk-linux
export ANDROID_SDK_ROOT=${ANDROID_HOME}
export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools
./scripts/build-android-namerules --publish
working-directory: functional-tests
swift:
name: Swift on Linux
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install JDK
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
!*gluecodium*
!*lime-*
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Cache Swift SDK
uses: actions/cache@v2
with:
path: ~/swift-sdk
key: ${{ runner.os }}-swift-5.4-release
restore-keys: ${{ runner.os }}-swift-5.4-release
- name: Install CMake
uses: jwlawson/[email protected]
with:
cmake-version: '3.19.3'
- name: Update apt repos
run: sudo apt-get -qq update || true
- name: Install ninja
run: sudo apt install -y ninja-build
- name: Install valgrind
run: sudo apt install -y valgrind
- name: Install libcurl4
run: sudo apt install -y libcurl4
- name: Install Swift SDK
run: |
SWIFT_BRANCH=swift-5.4.3-release
SWIFT_VERSION=swift-5.4.3-RELEASE
SWIFT_PLATFORM=ubuntu20.04
SWIFT_ARCHIVE_NAME=${SWIFT_VERSION}-${SWIFT_PLATFORM}.tar.gz
if [ ! -d "${HOME}/swift-sdk" ]; then
mkdir ~/swift-sdk
pushd ~/swift-sdk
wget -nv https://swift.org/builds/${SWIFT_BRANCH}/$(echo "${SWIFT_PLATFORM}" | tr -d .)/${SWIFT_VERSION}/${SWIFT_ARCHIVE_NAME}
popd
fi
sudo tar xf ~/swift-sdk/${SWIFT_ARCHIVE_NAME} --directory / --strip-components=1
sudo chmod -R o+r /usr/lib/swift/CoreFoundation
- name: Build and run functional tests
run: |
./scripts/build-swift-functional --valgrind --buildGluecodium
working-directory: functional-tests
- name: Removing build folder
run: |
./scripts/clean
echo Listing
ls -a
working-directory: functional-tests
- name: Build and run namerules tests
run: |
./scripts/build-swift-namerules --valgrind --publish
working-directory: functional-tests
- name: Print Valgrind results
if: ${{ failure() }}
run: cat build-swift/Testing/Temporary/MemoryChecker.1.log
working-directory: functional-tests
swift-mac:
name: Swift on MacOS
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Install JDK
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
!*gluecodium*
!*lime-*
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Install ninja
uses: seanmiddleditch/gha-setup-ninja@master
with:
version: 1.11.0
- name: Build and run functional tests
run: |
./scripts/build-swift-functional --buildGluecodium
working-directory: functional-tests
- name: Removing build folder
run: |
./scripts/clean
working-directory: functional-tests
- name: Build and run namerules tests
run: |
./scripts/build-swift-namerules --publish
working-directory: functional-tests
dart:
name: Dart
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install JDK
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
!*gluecodium*
!*lime-*
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Install CMake
uses: jwlawson/[email protected]
with:
cmake-version: '3.19.3'
- name: Update apt repos
run: sudo apt-get -qq update || true
- name: Install ninja
run: sudo apt install -y ninja-build
- name: Install Dart SDK
run: |
DART_RELEASE_CHANNEL=stable
DART_VERSION=2.12.0
wget -nv https://storage.googleapis.com/dart-archive/channels/${DART_RELEASE_CHANNEL}/release/${DART_VERSION}/linux_packages/dart_${DART_VERSION}-1_amd64.deb
sudo apt -y install ./dart_${DART_VERSION}-1_amd64.deb
- name: Build and run functional tests
run: |
export PATH="${PATH}:/usr/lib/dart/bin"
cd functional-tests
./scripts/build-dart-functional --buildGluecodium
dart-asan:
name: Dart with AddressSanitizer
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install JDK
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
!*gluecodium*
!*lime-*
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Cache Dart SDK
uses: actions/cache@v2
with:
path: ~/dart_sdk
key: ${{ runner.os }}-dart-2.18.1-stable-full
restore-keys: ${{ runner.os }}-dart-2.18.1-stable-full
- name: Install CMake
uses: jwlawson/[email protected]
with:
cmake-version: '3.19.3'
- name: Install ninja
run: sudo apt install -y ninja-build
- name: Compile Dart SDK without tcmalloc
run: |
export DART_ROOT=${HOME}/dart_sdk
export DART_BIN=${DART_ROOT}/bin
export PATH=${PATH}:${PWD}/depot_tools:${DART_BIN}
DART_VERSION=2.18.1
if [ ! -d "${DART_ROOT}/bin" ]; then
sudo apt install -y python3
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
mkdir dart-sdk
pushd dart-sdk
fetch dart
pushd sdk
git fetch --tags
git checkout tags/${DART_VERSION}
gclient sync
./tools/build.py --no-goma --mode release --arch x64 create_sdk --gn-args dart_use_tcmalloc=false
mkdir -p ${DART_BIN}
pushd out/ReleaseX64/dart-sdk
pushd bin
mv * ${DART_BIN}
popd
mv include ${DART_ROOT}
mkdir -p ${DART_ROOT}/lib
mv lib/_internal ${DART_ROOT}/lib
popd
fi
- name: Build and run functional tests
run: |
export PATH="${PATH}:${HOME}/dart_sdk/bin"
cd functional-tests
./scripts/build-dart-functional --buildGluecodium --asan
cmake-tests:
name: CMake toolchain tests
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install JDK
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
!*gluecodium*
!*lime-*
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Install CMake
uses: jwlawson/[email protected]
with:
cmake-version: '3.19.3'
- name: Install ninja
run: sudo apt install -y ninja-build
- name: Install Android SDK
run: |
ANDROID_API_LEVEL=android-28
ANDROID_BUILD_TOOLS_VERSION=28.0.3
ANDROID_HOME=${HOME}/android-sdk-linux
PATH=${PATH}:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/cmdline-tools/latest/bin
mkdir -p "${ANDROID_HOME}/cmdline-tools"
wget -q "https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip" -O android-sdk-tools.zip
unzip -q android-sdk-tools.zip -d ${ANDROID_HOME}/cmdline-tools
mv "${ANDROID_HOME}/cmdline-tools/cmdline-tools" "${ANDROID_HOME}/cmdline-tools/latest"
mkdir -p ~/.android
touch ~/.android/repositories.cfg
yes | sdkmanager --licenses
yes | sdkmanager "platforms;${ANDROID_API_LEVEL}" > /dev/null
yes | sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" > /dev/null
- name: Install Dart SDK
run: |
DART_RELEASE_CHANNEL=stable
DART_VERSION=2.12.0
wget -nv https://storage.googleapis.com/dart-archive/channels/${DART_RELEASE_CHANNEL}/release/${DART_VERSION}/linux_packages/dart_${DART_VERSION}-1_amd64.deb
sudo apt -y install ./dart_${DART_VERSION}-1_amd64.deb
- name: Build and run functional tests
run: |
export ANDROID_HOME=${HOME}/android-sdk-linux
export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools:/usr/lib/dart/bin
./gradlew publishToMavenLocal
cd cmake
GLUECODIUM_BUILD_ENVIRONMENT=android-host cmake -P run-cmake-unit-test.cmake