From 214b8328d21a855af67762ff3d35ff2abfd3b3ea Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 30 Aug 2019 09:42:14 +0200 Subject: [PATCH 1/3] travis: add Bionic (Ubuntu 18.04 LTS) to test matrix Using bionic (current LTS) as default, and add xenial (Ubuntu 16.04 LTS) to the matrix, to test the previous LTS release as well on master Signed-off-by: Sebastiaan van Stijn --- .travis.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c97348a48..fbbb6db79 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -dist: xenial +dist: bionic sudo: required # setup travis so that we can run containers for integration tests services: @@ -18,6 +18,22 @@ env: - TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runtime.v1.linux TRAVIS_CGO_ENABLED=1 - TRAVIS_GOOS=darwin TRAVIS_CGO_ENABLED=0 +matrix: + include: + # On master, also test against the previous LTS (Xenial / Ubuntu 16.04 LTS) + - if: branch = master + os: linux + dist: xenial + env: TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v1 TRAVIS_CGO_ENABLED=1 + - if: branch = master + os: linux + dist: xenial + env: TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v2 TRAVIS_CGO_ENABLED=1 + - if: branch = master + os: linux + dist: xenial + env: TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runtime.v1.linux TRAVIS_CGO_ENABLED=1 + go_import_path: github.com/containerd/containerd addons: @@ -31,7 +47,7 @@ addons: - python-minimal - libcap-dev - libaio-dev - - libprotobuf-c0-dev + - libprotobuf-c-dev - libprotobuf-dev - socat From 94e4b68798ad34ca9e9f8c91de1995b7554a9030 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 30 Aug 2019 10:26:56 +0200 Subject: [PATCH 2/3] travis.yml: add TRAVIS_DISTRO env-var for easier identification Signed-off-by: Sebastiaan van Stijn --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index fbbb6db79..1adb825dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,9 +13,9 @@ go: - "1.12.x" env: - - TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v1 TRAVIS_CGO_ENABLED=1 - - TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v2 TRAVIS_CGO_ENABLED=1 - - TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runtime.v1.linux TRAVIS_CGO_ENABLED=1 + - TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v1 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic + - TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v2 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic + - TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runtime.v1.linux TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic - TRAVIS_GOOS=darwin TRAVIS_CGO_ENABLED=0 matrix: @@ -24,15 +24,15 @@ matrix: - if: branch = master os: linux dist: xenial - env: TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v1 TRAVIS_CGO_ENABLED=1 + env: TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v1 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=xenial - if: branch = master os: linux dist: xenial - env: TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v2 TRAVIS_CGO_ENABLED=1 + env: TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v2 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=xenial - if: branch = master os: linux dist: xenial - env: TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runtime.v1.linux TRAVIS_CGO_ENABLED=1 + env: TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runtime.v1.linux TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=xenial go_import_path: github.com/containerd/containerd From fa546dc3e8b8c729f59f98eb525dd032985e1725 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 1 Sep 2019 14:41:31 +0200 Subject: [PATCH 3/3] travis: don't run old Xenial LTS on pull requests The branch (for pull requests), is the base/target branch, so for pull requests against master, these would still be run. From the travis documentation: > branch (the current branch name; for pull requests: the base branch name) This patch excludes these jobs by not running them for pull request (event type=pull_request or event type=push (when rebasing a pull request)). Signed-off-by: Sebastiaan van Stijn --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1adb825dc..b3ede41e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,15 +21,15 @@ env: matrix: include: # On master, also test against the previous LTS (Xenial / Ubuntu 16.04 LTS) - - if: branch = master + - if: branch = master AND type NOT IN (push, pull_request) os: linux dist: xenial env: TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v1 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=xenial - - if: branch = master + - if: branch = master AND type NOT IN (push, pull_request) os: linux dist: xenial env: TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v2 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=xenial - - if: branch = master + - if: branch = master AND type NOT IN (push, pull_request) os: linux dist: xenial env: TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runtime.v1.linux TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=xenial