forked from codespecs/daikon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
107 lines (99 loc) · 4.47 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
## This Travis CI configuration file is provided for the convenience of people who wish to run Travis CI.
## Travis CI does not run in the codespecs organization (home of the main Daikon repository).
language: generic
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/.m2/
services:
- docker
# jdk8-plus contains extra packages that permit it to be used to build the manual
env:
global:
- THIS_REPO=daikon
matrix:
- OS=ubuntu JDKVER=jdk8 GROUP=quick-txt-diff
- OS=ubuntu JDKVER=jdk11 GROUP=quick-txt-diff
- OS=ubuntu JDKVER=jdk17 GROUP=quick-txt-diff
- OS=ubuntu JDKVER=jdk8 GROUP=nonquick-txt-diff
- OS=ubuntu JDKVER=jdk11 GROUP=nonquick-txt-diff
- OS=ubuntu JDKVER=jdk17 GROUP=nonquick-txt-diff
- OS=ubuntu JDKVER=jdk8 GROUP=non-txt-diff
- OS=ubuntu JDKVER=jdk11 GROUP=non-txt-diff
- OS=ubuntu JDKVER=jdk17 GROUP=non-txt-diff
- OS=ubuntu JDKVER=jdk8-plus GROUP=misc
- OS=ubuntu JDKVER=jdk11-plus GROUP=misc
- OS=ubuntu JDKVER=jdk17-plus GROUP=misc
- OS=ubuntu JDKVER=jdk8-plus GROUP=kvasir
- OS=ubuntu JDKVER=jdk11-plus GROUP=kvasir
- OS=ubuntu JDKVER=jdk17-plus GROUP=kvasir
- OS=rockylinux JDKVER=jdk8 GROUP=nonquick-txt-diff
- OS=rockylinux JDKVER=jdk11 GROUP=nonquick-txt-diff
- OS=rockylinux JDKVER=jdk17 GROUP=nonquick-txt-diff
- OS=rockylinux JDKVER=jdk8-plus GROUP=misc
- OS=rockylinux JDKVER=jdk11-plus GROUP=misc
- OS=rockylinux JDKVER=jdk17-plus GROUP=misc
- OS=rockylinux JDKVER=jdk8-plus GROUP=kvasir
- OS=rockylinux JDKVER=jdk11-plus GROUP=kvasir
- OS=rockylinux JDKVER=jdk17-plus GROUP=kvasir
# Currently-failing jobs
# This section is temporary and should be commented out when no jobs are failing.
# It repeats things that were listed above in the "env" section.
# matrix:
# allow_failures:
# - env: OS=rockylinux JDKVER=jdk8-plus GROUP=kvasir
# The "docker run" command will pull if needed.
# Running this first gives two tries in case of network lossage.
before_script:
- python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
- (timeout 5m docker --debug=true pull mdernst/daikon-$OS-$JDKVER || [ $? -eq 124 ] && echo "docker pull timed out") || true
# The git commands are tried twice, in case of temporary network failure.
# The fcntl line works around a bug where Travis truncates logs and fails.
script:
- python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
- REMOTE_ORIGIN_URL=`git config --get remote.origin.url`
- echo "THIS_REPO=${THIS_REPO}"
- echo "JDKVER=${JDKVER}"
- echo "GROUP=${GROUP}"
- echo "BUILDJDK=${BUILDJDK}"
- echo "TRAVIS_BRANCH=${TRAVIS_BRANCH}"
- echo "REMOTE_ORIGIN_URL=${REMOTE_ORIGIN_URL}"
- echo "TRAVIS_EVENT_TYPE=${TRAVIS_EVENT_TYPE}"
- echo "TRAVIS_COMMIT=${TRAVIS_COMMIT}"
- echo "TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST}"
- echo "TRAVIS_PULL_REQUEST_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH}"
- echo "TRAVIS_PULL_REQUEST_SHA=${TRAVIS_PULL_REQUEST_SHA}"
- echo "TRAVIS_REPO_SLUG=${TRAVIS_REPO_SLUG}"
- >-
docker --debug=true run -v $HOME/.gradle:/root/.gradle mdernst/daikon-$OS-$JDKVER /bin/bash -c "true &&
if [ $TRAVIS_EVENT_TYPE = pull_request ] ; then
git clone --quiet $REMOTE_ORIGIN_URL $THIS_REPO || (sleep 1m && git clone --quiet $REMOTE_ORIGIN_URL $THIS_REPO)
cd $THIS_REPO
git fetch origin +refs/pull/$TRAVIS_PULL_REQUEST/merge
git checkout -qf $TRAVIS_PULL_REQUEST_SHA
git config user.email [email protected]
git config user.name Noone Cares
git remote add theupstream https://github.com/$TRAVIS_REPO_SLUG.git
git pull theupstream $TRAVIS_BRANCH || (sleep 1m && git pull theupstream $TRAVIS_BRANCH)
else
git clone --quiet -b $TRAVIS_BRANCH $REMOTE_ORIGIN_URL $THIS_REPO || (sleep 1m && git clone --quiet -b $TRAVIS_BRANCH $REMOTE_ORIGIN_URL $THIS_REPO)
cd $THIS_REPO
git checkout -qf $TRAVIS_COMMIT
fi &&
java -version &&
javac -version &&
export TRAVIS=$TRAVIS &&
export TRAVIS_BRANCH=${TRAVIS_BRANCH} &&
export TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR &&
export TRAVIS_COMMIT_RANGE=$TRAVIS_COMMIT_RANGE &&
export TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST} &&
export TRAVIS_PULL_REQUEST_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH} &&
export TRAVIS_PULL_REQUEST_SLUG=${TRAVIS_PULL_REQUEST_SLUG} &&
export TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG &&
./.travis-build.sh $GROUP"
git:
depth: 9