forked from bazel-contrib/rules_dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
94 lines (90 loc) · 2.83 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
# trusty beta image has jdk8, gcc4.8.4
dist: trusty
sudo: required
# xcode8 has jdk8
osx_image: xcode8.3
# Not technically required but suppresses 'Ruby' in Job status message.
language: java
os:
- linux
- osx
env:
# TODO(bazelbuild/continuous-integration#95): re-enable HEAD builds with stable URL
# - V=HEAD
- V=0.10.0
before_install:
- |
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
OS=darwin
brew install mono
else
sysctl kernel.unprivileged_userns_clone=1
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
sudo apt install apt-transport-https
echo "deb https://download.mono-project.com/repo/ubuntu stable-trusty main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-devel libunwind8-dev
export RULES_DOTNET_USE_LOCAL_MONO=true
OS=linux
fi
if [[ "${V}" == "HEAD" ]]; then
# Determine last successful build number. This may change while we are
# downloading, so it's important to determine ahead of time, in case
# we need to resume the download.
CI_BASE="http://ci.bazel.io/view/Bazel%20bootstrap%20and%20maintenance/job/Bazel/PLATFORM_NAME=${OS}-x86_64/"
CI_INDEX_URL="${CI_BASE}/lastSuccessfulBuild/"
wget -q -O build-index.html "${CI_INDEX_URL}"
CI_BUILD=$(grep '<title>' build-index.html | sed -e 's/^.*#\([0-9]*\).*$/\1/')
# Determine the artifact name. This is normally, bazel--installer.sh,
# but it may be, for example, bazel-0.5rc2-installer.sh before a release.
CI_ARTIFACT=$(grep -o 'bazel-[^\"-]*-installer.sh' build-index.html | head -n 1)
URL="${CI_BASE}/${CI_BUILD}/artifact/output/ci/${CI_ARTIFACT}"
rm build-index.html
else
URL="https://github.com/bazelbuild/bazel/releases/download/${V}/bazel-${V}-installer-${OS}-x86_64.sh"
fi
wget -O install.sh "${URL}"
chmod +x install.sh
./install.sh --user
rm -f install.sh
script:
- |
bazel \
--batch \
--host_jvm_args=-Xmx500m \
--host_jvm_args=-Xms500m \
build \
-s \
--local_resources=400,1,1.0 \
//...
- |
bazel \
--batch \
--host_jvm_args=-Xmx500m \
--host_jvm_args=-Xms500m \
run \
-s \
--local_resources=400,1,1.0 \
//tests/examples/example_binary:hello
- |
bazel \
--batch \
--host_jvm_args=-Xmx500m \
--host_jvm_args=-Xms500m \
run \
-s \
--local_resources=400,1,1.0 \
//tests/examples/example_binary:hello-core
- |
bazel \
--batch \
--host_jvm_args=-Xmx500m \
--host_jvm_args=-Xms500m \
test \
-s \
--local_resources=400,1,1.0 \
--test_summary=detailed \
--test_output=all \
//...
notifications:
email: false