forked from oss-review-toolkit/ort
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
102 lines (90 loc) · 3.57 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
dist: bionic
sudo: required
language: java
jdk:
- openjdk10
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/.ivy2
- $HOME/.m2/repository/
- $HOME/.ort/analyzer/cache/http
- $HOME/.ort/analyzer/cache/remote_artifacts
- $HOME/.ort/downloader/cache/http
- $HOME/.ort/scanner/cache/http
env:
global:
- ANDROID_HOME="/opt/android"
- ANDROID_SDK_VERSION="4333796"
- BOWER_VERSION="1.8.8"
- CONAN_VERSION="1.18.0"
- FLUTTER_HOME="/opt/flutter"
- FLUTTER_VERSION="v1.7.8+hotfix.3-stable"
- GIMME_GO_VERSION="1.13" # Used internally by Travis.
- GO_DEP_VERSION="0.5.4"
- NPM_VERSION="6.14.1"
- PHP_VERSION="7.1"
- PYTHON_PIPENV_VERSION="2018.11.26"
- RUST_VERSION="1.35.0"
- STACK_VERSION="2.1.3"
- YARN_VERSION="1.21.1"
addons:
apt:
# Flutter depends on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 version GLIBCXX_3.4.18
sources:
- ubuntu-toolchain-r-test # if we don't specify this, the libstdc++6 we get is the wrong version
packages:
- cvs
- lib32stdc++6
before_install:
- sudo rm -f $JAVA_HOME/lib/security/cacerts
- sudo ln -s /etc/ssl/certs/java/cacerts $JAVA_HOME/lib/security/cacerts
install:
- eval "$(gimme)"
- curl https://raw.githubusercontent.com/golang/dep/v$GO_DEP_VERSION/install.sh | sh
- npm install -g bower@$BOWER_VERSION npm@$NPM_VERSION yarn@$YARN_VERSION
- phpenv global $PHP_VERSION
- curl -Ls https://git.io/sbt > ~/bin/sbt
- chmod a+x ~/bin/sbt
- curl -sSL https://github.com/commercialhaskell/stack/raw/v$STACK_VERSION/etc/scripts/get-stack.sh | sh
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUST_VERSION
- export PATH=$PATH:$HOME/.cargo/bin
- curl https://storage.googleapis.com/git-repo-downloads/repo-1 > ~/bin/repo
- chmod a+x ~/bin/repo
- curl -Os https://dl.google.com/android/repository/sdk-tools-linux-$ANDROID_SDK_VERSION.zip
- unzip -q sdk-tools-linux-$ANDROID_SDK_VERSION.zip -d $ANDROID_HOME
- rm sdk-tools-linux-$ANDROID_SDK_VERSION.zip
- export SDKMANAGER_OPTS="--add-modules java.xml.bind"
- yes | $ANDROID_HOME/tools/bin/sdkmanager --verbose "platform-tools"
- curl -Os https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_$FLUTTER_VERSION.tar.xz
- tar xf flutter_linux_$FLUTTER_VERSION.tar.xz -C $(dirname $FLUTTER_HOME)
- rm flutter_linux_$FLUTTER_VERSION.tar.xz
- export PATH="$PATH:$FLUTTER_HOME/bin:$FLUTTER_HOME/bin/cache/dart-sdk/bin"
- flutter config --no-analytics
- flutter doctor
- pip install --user conan==$CONAN_VERSION pipenv==$PYTHON_PIPENV_VERSION
- conan user # Create the conan data directory. Automatic detection of your arch, compiler, etc.
- pyenv global system 3.6
- pip3 install --user reuse
before_script:
- reuse lint
script:
- set -o pipefail
- ./gradlew --stacktrace checkCopyright detekt
- if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then
./gradlew --stacktrace -Dkotlintest.tags.exclude=ScanCodeTag test funTest jacocoReport | tee log.txt;
else
./gradlew --scan --stacktrace -Dkotlintest.tags.exclude=ExpensiveTag test funTest jacocoReport | tee log.txt;
fi
- if grep -A1 ".+Test.+STARTED$" log.txt | grep -q "^:"; then
echo "Some tests seemingly have been aborted.";
exit 1;
fi
after_success:
- if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then
bash <(curl -s https://codecov.io/bash) -X gcov -f '!*/src/*/assets/*';
fi