forked from eclipse-openj9/openj9
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
93 lines (93 loc) · 3.69 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
###############################################################################
# Copyright (c) 2016, 2018 IBM Corp. and others
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License 2.0 which accompanies this
# distribution and is available at https://www.eclipse.org/legal/epl-2.0/
# or the Apache License, Version 2.0 which accompanies this distribution and
# is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# This Source Code may also be made available under the following
# Secondary Licenses when the conditions for such availability set
# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
# General Public License, version 2 with the GNU Classpath
# Exception [1] and GNU General Public License, version 2 with the
# OpenJDK Assembly Exception [2].
#
# [1] https://www.gnu.org/software/classpath/license.html
# [2] http://openjdk.java.net/legal/assembly-exception.html
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
###############################################################################
os:
- linux
language: cpp
sudo: false
#cache: ccache # https://docs.travis-ci.com/user/caching/
dist: trusty
addons:
apt:
packages:
- autoconf
- ca-certificates
- ccache
- cpio
- file
- g++-4.8
- gcc-4.8
- git
- git-core
- libasound2-dev
- libcups2-dev
- libdwarf-dev
- libelf-dev
- libfreetype6-dev
- libnuma-dev
- libx11-dev
- libxext-dev
- libxrender-dev
- libxt-dev
- libxtst-dev
- make
- openjdk-8-jdk
- pkg-config
- realpath
- ssh
- unzip
- wget
- zip
before_install:
- jdk_switcher use oraclejdk8
env:
global:
before_script:
# - ccache -s -z
# Exit immediately if any unexpected error occurs.
- set -e
- if [ ! `wget https://ci.eclipse.org/openj9/userContent/freemarker-2.3.8.jar -O freemarker.jar` ]; then
wget https://sourceforge.net/projects/freemarker/files/freemarker/2.3.8/freemarker-2.3.8.tar.gz/download -O freemarker.tgz;
tar -xzf freemarker.tgz freemarker-2.3.8/lib/freemarker.jar --strip=2;
fi
- cd ..
# Shallow clone of the openj9-openjdk-jdk9 repo to speed up clone / reduce server load.
- git clone --depth 1 https://github.com/ibmruntimes/openj9-openjdk-jdk9.git
script:
# Clear this option so it doesn't interfere with configure detecting the bootjdk.
- unset _JAVA_OPTIONS
# Exit immediately if any unexpected error occurs.
- set -e
# Point the get_sources script at the OpenJ9 repo that's already been cloned to disk.
# Results in a copy of the source (disk space =( ) but no new network activity so overall a win.
- OPENJ9_SHA=$(git -C $TRAVIS_BUILD_DIR rev-parse HEAD)
- if test x"$OPENJ9_SHA" != x"$TRAVIS_COMMIT" ; then echo "Warning using SHA $OPENJ9_SHA instead of $TRAVIS_COMMIT." ; fi
- cd openj9-openjdk-jdk9 && bash get_source.sh -openj9-repo=$TRAVIS_BUILD_DIR -openj9-branch=$TRAVIS_BRANCH -openj9-sha=$OPENJ9_SHA
# Based on https://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/ travis container
# builds have 2 cores and 4 gigs of memory. Attempt to double provision the number of cores for the make...
# Limit number of jobs to work around g++ internal compiler error.
- export UMA_WINDOWS_PARRALLEL_HACK=-j4
- bash configure --with-freemarker-jar=$TRAVIS_BUILD_DIR/freemarker.jar --with-jobs=4 --with-num-cores=4
- make images
# Minimal sniff test - ensure java -version works.
- ./build/linux-x86_64-normal-server-release/images/jdk/bin/java -version
after_script:
# - ccache -s