From 2291856e9a5f94f0ae9f366ee1582d7072d5dd62 Mon Sep 17 00:00:00 2001 From: arnav-mandal1234 Date: Mon, 1 Apr 2019 07:59:24 +0530 Subject: [PATCH] Adds macos build for travis This adds osx support for travis Fixes : https://github.com/nexB/deltacode/issues/78 Signed-off-by: arnav-mandal1234 --- .travis.yml | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 800f0def..f9935862 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,11 @@ language: python python: - - '2.7' + - 2.7.13 -env: +# Use a matrix of TEST_SUITE variables to distribute tests to several machines +# Use a global PYTEST variable to run all of the tests in a uniform fashion +env: global: - PYTEST="bin/py.test -n 2 -vvs" @@ -11,6 +13,35 @@ env: - TEST_SUITE="$PYTEST" - TEST_SUITE="./etc/release/release.sh" + +# Travis does not offer OSX with arbitrary python versions (like 2.7.13 above) +# So, you can not simply have the following section in your build matrix: +# os: +# - linux +# - osx +# Instead, you have to include OSX entries into the build matrix manually. +# In particular, this means specifying the environment variables again. + +# The following was adapted from here: +# https://docs.travis-ci.com/user/multi-os/ +# Set TEST_SUITE in `env:` so that the `script:` section below works +# Set `language: generic` to clear `language: python` from above +# Set `python:` (to empty) to clear it from the travis-ci web interface +# Set `osx_image: xcode7.3` to pin OSX and Python versions, see here: +# https://docs.travis-ci.com/user/osx-ci-environment/ +matrix: + include: + - os: osx + env: TEST_SUITE="$PYTEST" + language: generic + python: + osx_image: xcode7.3 + - os: osx + env: TEST_SUITE="./etc/release/release.sh" + language: generic + python: + osx_image: xcode7.3 + install: - ./configure