forked from google/closure-compiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
76 lines (64 loc) · 2.52 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
# Required to be able to use JDK 8.
# See https://github.com/google/closure-compiler/issues/3448
dist: trusty
language: java
jdk:
- oraclejdk8
cache:
directories:
- $HOME/.m2
before_install:
- |
if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
OS=darwin
else
sysctl kernel.unprivileged_userns_clone=1
OS=linux
fi
BAZELISK_VERSION=v1.5.0
if [ ! -d "${HOME}/bin" ]; then
mkdir "${HOME}/bin"
fi
wget -O "${HOME}/bin/bazel" "https://github.com/bazelbuild/bazelisk/releases/download/${BAZELISK_VERSION}/bazelisk-${OS}-amd64"
chmod +x "${HOME}/bin/bazel"
# Skip the "installation" step:
# https://docs.travis-ci.com/user/customizing-the-build#Skipping-the-Installation-Step
install: true
before_script:
- echo "startup --output_base=$HOME/.cache/bazel" >> .bazelrc
- echo "common --noshow_progress" >> .bazelrc
- echo "build --noshow_loading_progress" >> .bazelrc
- echo "build --verbose_failures" >> .bazelrc
script:
# Builds the compiler and runs tests
# The following is a workaround for https://github.com/google/closure-compiler/issues/3568
# to avoid build errors due to excessive logging
- mvn dependency:go-offline -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B
- mvn -Dstyle.color=always install
- nvm install 10
# Install yarn version 1.16 by downloading its install script and executing it in bash
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.16.0
- export PATH="$HOME/.yarn/bin:$PATH"
# Run the npm package tests
- yarn install
- travis_util/test_npm.sh
# Checks for JavaDoc errors
- mvn -Dstyle.color=always -pl com.google.javascript:closure-compiler javadoc:javadoc
# Test new Bazel based J2CL build
- ./build_test.sh
# Kill Bazel workers to clean up their memory usage
- bazel shutdown
# Causes the build to run on a VM instead of in a container, to avoid OOM errors.
sudo: required
after_success:
- travis_util/deploy_snapshot.sh
env:
global:
# Force maven to use colorized output
- MAVEN_OPTS="-Djansi.force=true"
# CI_DEPLOY_USERNAME
- secure: "U2O3l6+TOz+3pxxsFdl/T+ktgGixfJO1Fc9pNC75v/N08lfNmyB+ee1wz0E8q7SZvnNR9D6KfLCFzjq0sS5F9FGrfKbFDTPxyaz/4EwTk0fdvPzaKhs8xl6LPVlLw6vLRIWc8PPCIVqqbYAbG6JA8liBPGbBXD/LXmCFbSr0rLg="
# CI_DEPLOY_PASSWORD
- secure: "Qq9mvv8z7X3iGlpp4zlGIAOOZodSw9fw0JylT7gKRXyMEarYLHoBXoNnb6seTxExRKuvSGo8UTvqLA4rg2+qWIulLYZJ0LZRcLOwfIomI5v7COQ5XX+NllDf1Oop+5Bpbo3ka0Xp9iQSA3xpw35bfTfCFJpIV1/d7WiOHofZoqc="
notifications:
email: false