Skip to content
This repository was archived by the owner on Dec 4, 2018. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 25 additions & 33 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,38 @@
# The language in this case has no bearing - we are going to be making use of "conda" for a
# python distribution for the scientific python stack.
language: c
language: generic

os:
# - linux
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed all the unused parts to make this cleaner.

- osx

sudo: false

env:
global:
# Add the BINSTAR_TOKEN environment variable. This has been generated with "anaconda auth --create --name conda-recipes-scitools-2016 -o SciTools"
# then "travis encrypt BINSTAR_TOKEN=<token_id> --repo SciTools/conda-recipes-scitools"
secure: "gUnBiclSuzSUSyJCVM2acIjry1VoqDlqWCkIDYx4VHJfRn7VXrav+G0cn2nYW7L8ch3/tnLqXLNEYRoBq8tbNOoOnnksqd0zTDNuUD4HkaQ47fNTsSbBVDzgDSiTvj9hjUFM7hQ0ju1BffG/uu43gl1mOaSh+R5/jdJ+iGlF+gg="

addons:
apt:
packages:
# Install makeinfo [sic] - needed for constructing configuration
# files via autoreconf (in particular for udunits)
- texinfo

# Unit testing framework for C (used by libmo_unpack)
- check
global:
secure: "gUnBiclSuzSUSyJCVM2acIjry1VoqDlqWCkIDYx4VHJfRn7VXrav+G0cn2nYW7L8ch3/tnLqXLNEYRoBq8tbNOoOnnksqd0zTDNuUD4HkaQ47fNTsSbBVDzgDSiTvj9hjUFM7hQ0ju1BffG/uu43gl1mOaSh+R5/jdJ+iGlF+gg="

before_install:
- brew update && brew install check
- brew remove --ignore-dependencies --force $(brew list)

install:
# Set the numpy variable. This isn't used, but conda-build complains if we haven't set it already.
- export CONDA_NPY=19
# Set the name of the channel label to upload to.
- export LABEL_NAME=main
# Only run the upload if the binstar token is present.
- export UPLOAD_CHANNELS=$(if [ -z ${BINSTAR_TOKEN+x} ]; then echo ""; else echo "--upload-channels scitools/label/${LABEL_NAME}"; fi)
- curl -L -O https://raw.githubusercontent.com/conda-forge/conda-smithy/master/bootstrap-obvious-ci-and-miniconda.py
- python bootstrap-obvious-ci-and-miniconda.py ~/miniconda x64 3 --without-obvci && source ~/miniconda/bin/activate root
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CIs no longer depend on obvious-ci.

- conda config --add channels scitools
- conda config --set show_channel_urls True
- conda install --yes --quiet -c conda-forge conda-build-all conda-build==2.0.10
- conda install -n root --yes --quiet conda==4.2.13 jinja2 anaconda-client
- conda list
- URL="https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh"
- curl -L $URL -o miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda update --yes conda

# Configure channels.
- conda config --set show_channel_urls True
- conda config --add channels scitools

- conda install --yes -c conda-forge conda-build-all
# https://github.com/SciTools/conda-build-all/issues/79
- conda install --yes conda==4.2.16
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot use conda >=4.3 with conda-build-all. See conda-tools/conda-build-all#79

- conda list

script:
- conda-build-all ./ --inspect-channels scitools/label/${LABEL_NAME} ${UPLOAD_CHANNELS} --matrix-condition "numpy >=1.8,,<=1.10" "python >=2.7,<3|>=3.4,<3.5|>=3.5,<3.6"
- if [[ "$BINSTAR_TOKEN" == "" ]]; then
export UPLOAD="";
else
export UPLOAD="--upload-channels scitools";
fi
- conda-build-all ./ $UPLOAD --inspect-channels scitools/label/main --matrix-condition "numpy >=1.8,,<=1.10" "python >=2.7,<3|>=3.4,<3.5|>=3.5,<3.6"
109 changes: 59 additions & 50 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,84 @@
environment:

CONDA_INSTALL_LOCN: "C:\\conda"

# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
# /E:ON and /V:ON options are not enabled in the batch script interpreter
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: "cmd /E:ON /V:ON /C obvci_appveyor_python_build_env.cmd"

BINSTAR_TOKEN:
# Generated with "anaconda auth --create --name conda-recipes-scitools-2016 -o SciTools" and
# encrypted on ci.appveyor.com/tools/encrypt.
secure: vEXaxIcVqImAv8mMqEGotj4Mym4uLVkHhf3jlksGimFJ88RcaF/hxdEUSt6HTxPr

matrix:
# Note: Because we have to separate the py2 and py3 components due to compiler version, we have a race condition for non-python packages.
# Not sure how to resolve this, but maybe we should be tracking the VS version in the build string anyway?
- TARGET_ARCH: "x86"
CONDA_PY: "27"
- TARGET_ARCH: x64
PY_CONDITION: "python >=2.7,<3"
- TARGET_ARCH: "x86"
CONDA_PY: "34"
CONDA_INSTALL_LOCN: C:\\Miniconda-x64

- TARGET_ARCH: x64
PY_CONDITION: "python >=3.4,<3.5"
- TARGET_ARCH: "x86"
CONDA_PY: "35"
CONDA_INSTALL_LOCN: C:\\Miniconda35-x64

- TARGET_ARCH: x64
PY_CONDITION: "python >=3.5,<3.6"
- TARGET_ARCH: "x64"
CONDA_PY: "27"
CONDA_INSTALL_LOCN: C:\\Miniconda35-x64

- TARGET_ARCH: x64
PY_CONDITION: "python >=3.6,<3.7"
CONDA_INSTALL_LOCN: C:\\Miniconda36-x64

- TARGET_ARCH: x86
PY_CONDITION: "python >=2.7,<3"
- TARGET_ARCH: "x64"
CONDA_PY: "34"
CONDA_INSTALL_LOCN: C:\\Miniconda

- TARGET_ARCH: x86
PY_CONDITION: "python >=3.4,<3.5"
- TARGET_ARCH: "x64"
CONDA_PY: "35"
CONDA_INSTALL_LOCN: C:\\Miniconda35
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am "spelling out" the local installation of miniconda on AppVeyor to make the CI a little bit faster. But note that AppVeyor does not have miniconda for Python 3.4, so that will start with Python 3.5 and will be a little bit slower b/c conda-build will download 3.4 from there.


- TARGET_ARCH: x86
PY_CONDITION: "python >=3.5,<3.6"
CONDA_INSTALL_LOCN: C:\\Miniconda35

- TARGET_ARCH: x86
PY_CONDITION: "python >=3.6,<3.7"
CONDA_INSTALL_LOCN: C:\\Miniconda36

# We always use a 64-bit machine, but can build x86 distributions
# with the TARGET_ARCH variable (which is used by CMD_IN_ENV).
platform:
- x64
- x64

install:
- setlocal enableextensions enabledelayedexpansion
- cmd: rmdir C:\cygwin /s /q
# Set the CONDA_NPY, although it has no impact on the actual build. We need this because of a test within conda-build.
- cmd: set CONDA_NPY=19
# Set the name of the channel label to upload to.
- cmd: set "LABEL_NAME=main"
# Only run the upload if the binstar token is present.
# Note: an "empty" variable in batch cannot be `set Z=""` (will be interpreted literally) or `set Z=` (unsets %Z%).
- cmd: set "UPLOAD_CHANNELS= "
- cmd: if defined BINSTAR_TOKEN set "UPLOAD_CHANNELS=--upload-channels scitools/label/%LABEL_NAME%"
- cmd: echo %UPLOAD_CHANNELS%

- appveyor DownloadFile "https://raw.githubusercontent.com/conda-forge/conda-smithy/master/bootstrap-obvious-ci-and-miniconda.py"
- cmd: python bootstrap-obvious-ci-and-miniconda.py %CONDA_INSTALL_LOCN% %TARGET_ARCH% 3 --without-obvci
- cmd: set CONDA_PY=%CONDA_PY%
- cmd: set PATH=%PATH%;%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts
- cmd: set PYTHONUNBUFFERED=1

- cmd: conda config --add channels scitools
- cmd: conda config --set show_channel_urls yes

- cmd: conda install --yes --quiet -c conda-forge obvious-ci
- cmd: conda install --yes --quiet -c conda-forge conda-build-all conda-build==2.0.10
- cmd: conda install --yes --quiet conda==4.2.13 jinja2 anaconda-client
- cmd: conda list

- cmd: conda info
# If there is a newer build queued for the same PR cancel the previous one.
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }

# Remove cygwin (and therefore the git that comes with it).
- cmd: rmdir C:\cygwin /s /q
- setlocal enableextensions enabledelayedexpansion

# Add path, activate `conda` and update conda.
- cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
- cmd: conda update -n root --yes conda
- cmd: conda install -n root --yes conda-build-all
# https://github.com/SciTools/conda-build-all/issues/79
- cmd: conda install -n root --yes conda=4.2.16

# Needed for building extensions in python2.7 x64 with cmake.
- cmd: conda install -n root --yes -c conda-forge vs2008_express_vc_python_patch
- cmd: call setup_x64

# Add our channels.
- cmd: conda config --set show_channel_urls true
- cmd: conda config --add channels scitools

# 2 cores available on Appveyor workers: https://www.appveyor.com/docs/build-configuration/#build-environment
# CPU_COUNT is passed through conda build: https://github.com/conda/conda-build/pull/1149
- cmd: set CPU_COUNT=2
- cmd: set PYTHONUNBUFFERED=1

- cmd: conda info

# Skip .NET project specific build phase.
build: off

test_script:
- '%CMD_IN_ENV% conda-build-all .\ --inspect-channels scitools/label/%LABEL_NAME% %UPLOAD_CHANNELS% --matrix-condition "numpy >=1.8,<=1.10" "%PY_CONDITION%"'
- cmd: if not "%BINSTAR_TOKEN%" == "" (set UPLOAD=--upload-channels scitools) else (set UPLOAD=)
- 'conda-build-all .\ %UPLOAD% --inspect-channels scitools/label/main --matrix-conditions "numpy >=1.8,<=1.10" "%PY_CONDITION%"'
4 changes: 2 additions & 2 deletions nc_time_axis/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package:
name: nc_time_axis
version: "1.0.0"
version: "1.0.1"

source:
git_url: https://github.com/SciTools/nc-time-axis.git
git_tag: v1.0.0
git_tag: v1.0.1

build:
number: 0
Expand Down
12 changes: 4 additions & 8 deletions scripts/run_docker_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,16 @@ export CONDA_NPY='19'
export PYTHONUNBUFFERED=1
echo "$config" > ~/.condarc

conda config --add channels scitools
conda config --set show_channel_urls True

# Update both conda-build-all and conda-build to get latest "numpy x.x" specification support.
conda install --yes --quiet -c conda-forge conda-build-all conda-build==2.0.10
conda update --yes --force conda==4.2.13
conda install -n root --yes --quiet jinja2 anaconda-client
conda update --yes conda
conda install --yes -c conda-forge conda-build-all
# https://github.com/SciTools/conda-build-all/issues/79
conda install --yes conda==4.2.16

# A lock sometimes occurs with incomplete builds. The lock file is stored in build_artefacts.
conda clean --lock

conda install --yes anaconda-client
conda install --yes conda-build==2.0.10
conda install --yes conda==4.2.13
conda info
conda list
unset LANG
Expand Down