Force Java version on Travis CI#6512
Conversation
|
Should we be using -source to javac to enforce a source code compatibility level? |
|
@pdillinger Hmm... good idea! Normally I am using a Java build tool (instead of Make) and so that stuff is taken care of for me. I will add it in now... |
|
I guess we could run into newer versions of javac not supporting such an old source level, but at least in the javac version I have handy, that appears to be a warning and not an error. |
cf5d18a to
d277ee7
Compare
facebook-github-bot
left a comment
There was a problem hiding this comment.
@pdillinger has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@pdillinger Hmm the |
d277ee7 to
dc8f956
Compare
|
@pdillinger Okay I updated this PR, assuming the CI is good. Could you re-import it please? |
|
@adamretter has updated the pull request. Re-import the pull request |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@pdillinger has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
…: cpp`, default to openjdk8 for RocksJava
dc8f956 to
44a3d77
Compare
|
@adamretter has updated the pull request. Re-import the pull request |
|
@pdillinger can you re-import please? I fixed the merge conflict |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@pdillinger has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@adamretter has updated the pull request. Re-import the pull request |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@pdillinger has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
be4a3e9 to
581feab
Compare
|
@adamretter has updated the pull request. Re-import the pull request |
| fi | ||
| - if [[ "${JOB_NAME}" == java_test || "${JOB_NAME}" == cmake* ]]; then | ||
| java -version && echo "JAVA_HOME=${JAVA_HOME}"; | ||
| - | |
There was a problem hiding this comment.
before_install is now redendant, right? Can't we remove it?
.travis.yml
Outdated
| export PATH=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)/bin:$PATH | ||
| export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture) | ||
| fi | ||
| java -version && echo "JAVA_HOME=${JAVA_HOME}" |
There was a problem hiding this comment.
I suggest
echo "JAVA_HOME=${JAVA_HOME}"
which java && java -version
which javac && javac -version
|
@adamretter has updated the pull request. Re-import the pull request |
|
@pdillinger Okay I pushed your suggestions. |
Let's hope the Travis gods are still happy ;) |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@pdillinger has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@pdillinger merged this pull request in 0772768. |
In the
.travis.ymlfile thejdk: openjdk7element is ignored whenlanguage: cpp. So whatever version of the JDK that was installed in the Travis container was used - typically JDK 11.To ensure our RocksJava builds are working, we now instead install and use OpenJDK 8. Ideally we would use OpenJDK 7, as RocksJava supports Java 7, but many of the newer Travis containers don't support Java 7, so Java 8 is the next best thing.