File tree Expand file tree Collapse file tree 4 files changed +26
-19
lines changed Expand file tree Collapse file tree 4 files changed +26
-19
lines changed Original file line number Diff line number Diff line change @@ -50,13 +50,13 @@ jobs:
50
50
before_install : dev/before_install
51
51
before_script : dev/before
52
52
- stage : test
53
- name : Windows + Oracle JDK 8
53
+ name : Windows + Open JDK 8
54
54
# Use shell until Travis supports Java on Windows proper.
55
55
language : shell
56
56
os : windows
57
57
install : true
58
58
script : dev/main
59
- before_install : dev/before_install
59
+ before_install : dev/before_install.windows openjdk8
60
60
before_script : dev/before
61
61
- stage : deploy
62
62
name : Github Release
Original file line number Diff line number Diff line change @@ -72,20 +72,4 @@ elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
72
72
echo " cannot install Universal ctags"
73
73
exit 1
74
74
fi
75
- elif [[ " $TRAVIS_OS_NAME " == " windows" ]]; then
76
- choco install jdk8 -params ' installdir=c:\\jdk' -y
77
- export JAVA_HOME=${JAVA_HOME:-/ c/ jdk}
78
- export PATH=${JAVA_HOME} /bin:${PATH}
79
-
80
- choco install maven
81
-
82
- choco install universal-ctags
83
- export PATH=${PATH} :/c/ProgramData/chocolatey/lib/universal-ctags/tools
84
-
85
- choco install svn
86
- export PATH=${PATH} :/c/Program\ Files\ \( x86\) /Subversion/bin
87
-
88
- choco install python3
89
- # needs to be before the default Python 2
90
- export PATH=/c/Python38:${PATH}
91
75
fi
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ [[ " $TRAVIS_OS_NAME " == " windows" ]] || exit 1
4
+
5
+ JDK=" $1 "
6
+
7
+ choco install $JDK -y
8
+
9
+ choco install maven
10
+
11
+ choco install universal-ctags
12
+ export PATH=${PATH} :/c/ProgramData/chocolatey/lib/universal-ctags/tools
13
+
14
+ choco install svn
15
+ export PATH=${PATH} :/c/Program\ Files\ \( x86\) /Subversion/bin
16
+
17
+ choco install python3
18
+ # needs to be before the default Python 2
19
+ export PATH=/c/Python38:${PATH}
Original file line number Diff line number Diff line change @@ -24,11 +24,15 @@ if [ "x$TRAVIS_REPO_SLUG" == "xoracle/opengrok" ]; then
24
24
fi
25
25
26
26
if [[ " $TRAVIS_OS_NAME " == " windows" ]]; then
27
- export JAVA_HOME=${JAVA_HOME:-/ c/ jdk}
27
+ JAVA_BASE=" /c/Program Files/OpenJDK"
28
+ JDK_DIR=$( find " $JAVA_BASE /" -type d -name ' openjdk*' -maxdepth 1 | head -1)
29
+ export JAVA_HOME=${JAVA_HOME:- $JDK_DIR }
30
+ echo " JAVA_HOME set to $JAVA_HOME "
28
31
export PATH=${JAVA_HOME} /bin:${PATH}
29
32
30
33
export PATH=${PATH} :/c/ProgramData/chocolatey/lib/universal-ctags/tools
31
34
export PATH=${PATH} :/c/Program\ Files\ \( x86\) /Subversion/bin
35
+ export PATH=${PATH} :${JAVA_HOME}
32
36
33
37
# needs to be before the default Python 2
34
38
export PATH=/c/Python38:${PATH}
You can’t perform that action at this time.
0 commit comments