Skip to content

Access caps from travis env variables - #1001

Merged
saikrishna321 merged 4 commits into
appium:masterfrom
SrinivasanTarget:travisconfig
Aug 24, 2018
Merged

saikrishna321 merged 4 commits into
appium:masterfrom
SrinivasanTarget:travisconfig

Conversation

@SrinivasanTarget

Copy link
Copy Markdown
Member

Change list

Access caps from travis env variables

Types of changes

What types of changes are you proposing/introducing to Java client?
Put an x in the boxes that apply

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@mykola-mokhnach ping

@SrinivasanTarget

Copy link
Copy Markdown
Member Author

Looks like travis is gone mad... their doc says JDK 8 is default but i could see JDK 10 is picked up by default and its not possible to switch to 8...will try later...

@SrinivasanTarget

Copy link
Copy Markdown
Member Author

@imurchie Can you help on this if you know any other options to force travis to JDK 8?

@shridharkalagi shridharkalagi mentioned this pull request Aug 15, 2018
1 of 4 tasks
@imurchie

Copy link
Copy Markdown
Contributor
jdk:
  - oraclejdk8

Seems to work. https://travis-ci.org/appium/appium-espresso-driver/jobs/416092729

@SrinivasanTarget

Copy link
Copy Markdown
Member Author

@imurchie Looks like an issue specific to their OSX build images. may be we cant do much...

@saikrishna321

Copy link
Copy Markdown
Member

still uses jdk 10

Java version: 10.0.1, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home

Comment thread .travis.yml Outdated
include:
- language: java
install: true
- language: node_js

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work. With language as 'node_js' but no node version, you'll get 0.10, which Appium will not install with. Further, jdk will be ignored.

@SrinivasanTarget SrinivasanTarget Aug 15, 2018 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but just checking container java version

@imurchie

Copy link
Copy Markdown
Contributor

Weird. I just pushed a basically change-less branch (just adding logging the available Java versions) and it's getting 1.8 as far as I can tell.

https://travis-ci.org/appium/java-client/builds/416390977

@SrinivasanTarget

Copy link
Copy Markdown
Member Author

@imurchie Looks like its a problem only in xcode 9.4 containers.

@imurchie

Copy link
Copy Markdown
Contributor

Oh yeah! That does seem to be the case.

@imurchie

Copy link
Copy Markdown
Contributor

The following works:

diff --git a/.travis.yml b/.travis.yml
index 6702255d..8b1b30ad 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,12 +5,17 @@ sudo: required
 matrix:
   include:
     - language: java
+      jdk:
+        - oraclejdk8
       install: true
       os: osx
-      osx_image: xcode9.3
+      osx_image: xcode9.4
       before_install:
-        - brew update
-        - brew outdated xctool || brew upgrade xctool
+        - brew tap caskroom/versions
+        - brew cask install java8
+        - export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
+        - java -version
+
         - npm install -g appium
       script:
         - ./gradlew clean build xcuiTest -x test -x signArchives

https://travis-ci.org/appium/java-client/builds/416414956

The jdk part is probably unnecessary, but you could have that, and some sort of check to see if the environment is already using 8 and skip the install step (for if Travis fixes the issue).

use JDK 8

force java 8 in travis

force jdk 8 in travis

use jdk switcher to use jdk 8

force JDK 8

force java 8

force jdk 8

install java 8 through brew
@saikrishna321
saikrishna321 merged commit fd474c0 into appium:master Aug 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants