forked from heremaps/gluecodium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
150 lines (146 loc) · 5.07 KB
/
.travis.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
dist: bionic
branches:
except:
- gh-pages
notifications:
email:
recipients:
if: branch = master
on_success: never # default: change
on_failure: always # default: always
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches
- $HOME/.gradle/wrapper
- $HOME/.android/build-cache
jobs:
include:
- name: "Build and unit tests"
language: java
install: skip
script:
- ./gradlew build
- name: "C++ functional tests"
language: cpp
addons:
apt:
packages:
- ninja-build
- valgrind
script:
- cd examples
- ./scripts/build-cpp --valgrind --buildGluecodium
- name: "Android functional tests"
dist: xenial
language: java
jdk: openjdk8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- ninja-build
before_install:
- export ANDROID_HOME=${HOME}/android-sdk-linux
- export ANDROID_NDK_HOME=${ANDROID_HOME}/ndk-bundle
- export SDK_ROOT=${ANDROID_HOME}
- export NDK_ROOT=${ANDROID_NDK_HOME}
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 60
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60
install:
- ANDROID_API_LEVEL=android-28
- ANDROID_BUILD_TOOLS_VERSION=28.0.3
- ANDROID_CMAKE_VERSION=3.10.2.4988404
- wget -q "https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip" -O android-sdk-tools.zip
- unzip -q android-sdk-tools.zip -d ${ANDROID_HOME}
- 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
- yes | sdkmanager "cmake;${ANDROID_CMAKE_VERSION}" > /dev/null
script:
- pushd examples
- ./scripts/build-android --hostOnly --buildGluecodium
- popd
- pushd functional-tests
- ./scripts/build-android --publish
- popd
- name: "Swift functional tests"
language: cpp
addons:
apt:
packages:
- ninja-build
- valgrind
before_install:
- export PATH=${PWD}/cmake-install:${PWD}/cmake-install/bin:${PATH}
install:
- SWIFT_BRANCH=swift-5.1.3-release
- SWIFT_VERSION=swift-5.1.3-RELEASE
- SWIFT_PLATFORM=ubuntu16.04
- SWIFT_ARCHIVE_NAME=${SWIFT_VERSION}-${SWIFT_PLATFORM}
- SWIFT_URL=https://swift.org/builds/${SWIFT_BRANCH}/$(echo "${SWIFT_PLATFORM}" | tr -d .)/${SWIFT_VERSION}/${SWIFT_ARCHIVE_NAME}.tar.gz
- CMAKE_VERSION=3.15.5
- wget -nv https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
- tar xf cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz > /dev/null
- mv cmake-${CMAKE_VERSION}-Linux-x86_64 cmake-install
- wget -nv ${SWIFT_URL}
- sudo tar xf ${SWIFT_ARCHIVE_NAME}.tar.gz --directory / --strip-components=1
- sudo chmod -R o+r /usr/lib/swift/CoreFoundation
script:
- pushd examples
- ./scripts/build-swift --valgrind --buildGluecodium
- popd
- pushd functional-tests
- ./scripts/build-swift --valgrind --publish
- popd
- stage: test
name: "Dart functional tests"
language: cpp
addons:
apt:
packages:
- ninja-build
cache:
directories:
- $HOME/dart_sdk
before_install:
- export DART_BIN=${HOME}/dart_sdk/bin
- export DART_LIB=${HOME}/dart_sdk/lib
- export PATH=${PATH}:${PWD}/depot_tools:${DART_BIN}
install:
- |
if [ ! -d "${HOME}/dart_sdk/bin" ]; then
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
mkdir dart-sdk
pushd dart-sdk
fetch dart
pushd sdk
./tools/generate_buildfiles.py
sed -i 's/dart_use_tcmalloc = true/dart_use_tcmalloc = false/g' ./out/ReleaseX64/args.gn
./tools/build.py --mode release --arch x64 create_sdk
mkdir -p ${DART_BIN}
pushd out/ReleaseX64/dart-sdk
pushd bin
mv dart dart2native dartaotruntime pub utils ${DART_BIN}
popd
pushd bin/snapshots
mkdir -p ${DART_BIN}/snapshots
mv dart2native.dart.snapshot gen_kernel.dart.snapshot pub.dart.snapshot ${DART_BIN}/snapshots
popd
mkdir -p ${DART_LIB}
mv lib/_internal ${DART_LIB}
popd
popd
popd
fi
script:
- cd examples
- ./scripts/build-dart --buildGluecodium --asan