Skip to content

Commit

Permalink
Upgrade Travis to Xenial (Ubuntu 16.04) (#6885)
Browse files Browse the repository at this point in the history
Travis released Xenial (Ubuntu 16.04) (see https://changelog.travis-ci.com/ubuntu-xenial-16-04-build-environment-is-here!-79690). This PR moves us to this new image. 

The two major changes are:
- Switch to Python 3.5 in CI. This coincides with prior discussions in Slack that we want to target Python 3.5 as the minimum Python 3 version. This is to give us access to native type hints and async/await syntax, along with general improvements such as fixing the `shutil` bug identified in #6882.
- Switch to openjdk over oraclejdk. This is mostly because travis only bakes version 10 and 11 of the oracle jdk and has removed all the tooling to get other versions of that jdk. While image comes with version 8 of the openjdk.
  • Loading branch information
OniOni authored and Eric-Arellano committed Dec 12, 2018
1 parent 00968cc commit 7da3ab5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
18 changes: 8 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ stages:

default_test_config: &default_test_config
os: linux
dist: trusty
dist: xenial
sudo: required
addons:
apt:
Expand All @@ -76,18 +76,14 @@ default_test_config: &default_test_config
- lib32z1-dev
- gcc-multilib
- python-dev
- python3
- openssl
- libssl-dev
stage: *test
language: python
python: &python_version "2.7"
before_install:
# Remove bad openjdk6 from trusty image, so
# Pants will pick up oraclejdk6 from `packages` above.
- sudo rm -rf /usr/lib/jvm/java-1.6.0-openjdk-amd64
- sudo rm -rf /usr/lib/jvm/java-6-openjdk-amd64
- jdk_switcher use oraclejdk8
- PATH="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin":$PATH
- JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
# Increase the max number of user watches to ensure that watchman is able to watch all
# files in the working copy.
- sudo sysctl fs.inotify.max_user_watches=524288
Expand All @@ -105,6 +101,8 @@ default_cron_test_config: &default_cron_test_config

linux_with_fuse: &linux_with_fuse
before_install:
- PATH="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin":$PATH
- JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
- sudo apt-get install -y pkg-config fuse libfuse-dev
- sudo modprobe fuse
- sudo chmod 666 /dev/fuse
Expand Down Expand Up @@ -301,7 +299,7 @@ matrix:
- <<: *linux_with_fuse
name: "Rust Tests Linux"
os: linux
dist: trusty
dist: xenial
sudo: required
stage: *test
language: python
Expand Down Expand Up @@ -332,7 +330,7 @@ matrix:
- <<: *linux_with_fuse
name: "Rust Clippy on Linux"
os: linux
dist: trusty
dist: xenial
sudo: required
stage: *test
language: python
Expand All @@ -347,7 +345,7 @@ matrix:
- <<: *linux_with_fuse
name: "Cargo audit"
os: linux
dist: trusty
dist: xenial
sudo: required
stage: *cron
script:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,7 @@ def test_subprocess_compile_jdk_being_symlink(self):
def test_hermetic_jdk_being_underlying_dist(self):
context = self.context(target_roots=[])
zinc = Zinc.Factory.global_instance().create(context.products, NailgunTaskBase.HERMETIC)
self.assertFalse(os.path.islink(zinc.dist.home))
self.assertFalse(
os.path.islink(zinc.dist.home),
"Expected {} to not be a link, it was.".format(zinc.dist.home)
)

0 comments on commit 7da3ab5

Please sign in to comment.