From 4b54a471a49cfae617c65b2027ae1e7cc1671cfc Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 29 Jun 2018 14:47:53 -0700 Subject: Makefile: Use a pattern rule for cross-compilation Pattern-rule documentation is in [1]. This commit follows the basic approach from [2], with the portable build tags from [3]. Using --keep-going allows folks to see errors for multiple target platforms. For example, if the Darwin target dies, we'll still attempt to build the Linux target before erroring out. I've added an ALLOWED_TO_FAIL environment variable to mark script blocks for the the allow_failures block. Currently we're requiring builds from Linux for Linux and OS X to succeed, but allowing builds from OS X to both targets to fail. [1]: https://www.gnu.org/software/make/manual/html_node/Pattern-Intro.html#Pattern-Intro [2]: https://github.com/kubernetes-incubator/cri-o/commit/e5031fcf9af7d6c78d21e38ab9f82d2392ba05e8 [3]: https://github.com/kubernetes-incubator/cri-o/pull/1653 Signed-off-by: W. Trevor King Closes: #1034 Approved by: baude --- .travis.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index ea4372f7f..b42565093 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,10 +7,10 @@ services: - docker before_install: - - sudo apt-get -qq update - - sudo apt-get -qq install btrfs-tools libdevmapper-dev libgpgme11-dev libapparmor-dev - - sudo apt-get -qq install autoconf automake bison e2fslibs-dev libfuse-dev libtool liblzma-dev gettext python3-setuptools python3-dateutil - - sudo make install.libseccomp.sudo + - if [ "${TRAVIS_OS_NAME}" = linux ]; then sudo apt-get -qq update; fi + - if [ "${TRAVIS_OS_NAME}" = linux ]; then sudo apt-get -qq install btrfs-tools libdevmapper-dev libgpgme11-dev libapparmor-dev; fi + - if [ "${TRAVIS_OS_NAME}" = linux ]; then sudo apt-get -qq install autoconf automake bison e2fslibs-dev libfuse-dev libtool liblzma-dev gettext python3-setuptools python3-dateutil; fi + - if [ "${TRAVIS_OS_NAME}" = linux ]; then sudo make install.libseccomp.sudo; fi install: - make install.tools @@ -37,11 +37,21 @@ jobs: script: - make testunit go: 1.10.x + - script: + - make --keep-going local-cross + go: 1.10.x + - script: + - make --keep-going local-cross + go: 1.10.x + os: osx + env: ALLOWED_TO_FAIL=true - stage: Integration Test script: - make all - make integration go: 1.9.x + allow_failures: + - env: ALLOWED_TO_FAIL=true notifications: irc: "chat.freenode.net#podman" -- cgit v1.2.3-54-g00ecf