astropy/ci-helpers

Name: ci-helpers

Owner: The Astropy Project

Description: Helpers for continuous integration - Maintainers: @bsipocz and @astrofrog

Created: 2015-11-09 14:51:34.0

Updated: 2017-11-06 16:13:56.0

Pushed: 2018-01-14 22:48:06.0

Homepage:

Size: 382

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

About

Join the chat at https://gitter.im/astropy/ci-helpers

Build Status Build status

This repository contains a set of scripts that are used by the .travis.yml and appveyor.yml files of astropy packages for the Travis and AppVeyor services respectively.

The idea is to clone these at the last minute when the continuous integration is about to be run. This is better than including this repository as a sub-module, because this allows updates to this repository to take effect immediately, and not have to update the sub-module every time a change is made.

How to use
Travis

Include the following lines at the start of the install section in .travis.yml:

all:
- git clone --depth 1 git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda.sh

This does the following:

Following this, various dependencies are installed depending on the following environment variables

The idea behind the MAIN_CMD and SETUP_CMD environment variables is that the script section of the .travis.yml file can be set to:

pt:
- $MAIN_CMD $SETUP_CMD

The typical usage will then be to set $MAIN_CMD to default to python setup.py and then set $SETUP_CMD='test', and this then allows special builds that have $MAIN_CMD='pycodestyle' and $SETUP_CMD=''.

Packages can also choose to not use the $MAIN_CMD variable and instead to set the script section to:

pt:
- python setup.py $SETUP_CMD

and simply adjust $SETUP_CMD as needed.

Following the set-up, if additional packages need to be installed, the $CONDA_INSTALL environment variable should be used to make sure that the Python and Numpy versions stay fixed to those requested, e.g.

ONDA_INSTALL another_package
AppVeyor

Include the following lines at the start of the install section in appveyor.yml:

all:
- "git clone --depth 1 git://github.com/astropy/ci-helpers.git"
- "powershell ci-helpers/appveyor/install-miniconda.ps1"
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "activate test"

This does the following:

Following this, various dependencies are installed depending on the following environment variables

Details

The scripts include:

This repository can be cloned directly from the .travis.yml and appveyor.yml files when about to run tests and does not need to be included as a sub-module in repositories.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.