Skip to content
Snippets Groups Projects
Commit 98d6bafb authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Improved conda configuration for our plumed channel

Now it works like this:
- test- branches and pull requests are built with conda but not uploaded.
- tags are built with conda and uploaded with `tags` label.
- cron builds are built with conda and uploaded with `nightly` label.

Nightly builds are assignd a version number equal to branch.date
for version branches or 2.99.date for master branch, e.g.

2.5.190603
2.99.190603

In this way they always supersede the corresponding releases.

See #412
parent 40717890
No related branches found
No related tags found
No related merge requests found
...@@ -87,14 +87,14 @@ matrix: ...@@ -87,14 +87,14 @@ matrix:
# linux conda package # linux conda package
- name: Conda build, linux - name: Conda build, linux
os: linux os: linux
if: branch =~ ^test- OR tag IS present OR type IN(pull_request) if: branch =~ ^test- OR tag IS present OR type IN(pull_request) OR type IN(cron)
dist: trusty dist: trusty
sudo: required sudo: required
env: PLUMED_CONDA=yes env: PLUMED_CONDA=yes
# osx conda package # osx conda package
- name: Conda build, MacOS - name: Conda build, MacOS
os: osx os: osx
if: branch =~ ^test- OR tag IS present OR type IN(pull_request) if: branch =~ ^test- OR tag IS present OR type IN(pull_request) OR type IN(cron)
osx_image: xcode8.3 osx_image: xcode8.3
env: PLUMED_CONDA=yes env: PLUMED_CONDA=yes
# I don't put any mpi variant with macports since it takes too long to compile # I don't put any mpi variant with macports since it takes too long to compile
...@@ -222,10 +222,20 @@ script: ...@@ -222,10 +222,20 @@ script:
done done
fi fi
- CONDA_VERSION=none
- export CONDA_LABEL=
# set CONDA_VERSION to TRAVIS_TAG, if available # set CONDA_VERSION to TRAVIS_TAG, if available
- if test -n "${TRAVIS_TAG}" ; then CONDA_VERSION="${TRAVIS_TAG//-/_}" ; else CONDA_VERSION=unspecified ; fi - if test -n "${TRAVIS_TAG}" ; then
# remove initial v - only makes sense with official releases CONDA_VERSION="${TRAVIS_TAG//-/_}" ;
- CONDA_VERSION="${CONDA_VERSION#v}" CONDA_VERSION="${CONDA_VERSION#v}" ;
CONDA_LABEL=tags ;
fi
# set CONDA_VERSION to branch + date when on nightly build
- if test "$TRAVIS_EVENT_TYPE" = cron ; then
if test "$TRAVIS_BRANCH" = master ; then CONDA_VERSION=2.99.$(date +%y%m%d) ; fi ;
if [[ "$TRAVIS_BRANCH" =~ ^v2.[0-9]+$ ]] ; then CONDA_VERSION=${TRAVIS_BRANCH#v}.$(date +%y%m%d) ; fi ;
CONDA_LABEL=nightly ;
fi
# build conda package # build conda package
- if test -n "$PLUMED_CONDA" ; then VERSION="$CONDA_VERSION" make -C conda ; fi - if test -n "$PLUMED_CONDA" ; then VERSION="$CONDA_VERSION" make -C conda ; fi
...@@ -270,4 +280,4 @@ after_success: ...@@ -270,4 +280,4 @@ after_success:
- if test "$MAKECOVERAGE" == yes ; then ./.travis/push coverage ; fi - if test "$MAKECOVERAGE" == yes ; then ./.travis/push coverage ; fi
- if test "$MAKECOVERAGE" == yes ; then bash <(curl -s https://codecov.io/bash) > /dev/null ; fi - if test "$MAKECOVERAGE" == yes ; then bash <(curl -s https://codecov.io/bash) > /dev/null ; fi
# upload conda package # upload conda package
- if test -n "$PLUMED_CONDA" && test -n "$TRAVIS_TAG" ; then VERSION="$CONDA_VERSION" make -C conda upload ; fi - if test -n "$PLUMED_CONDA" && test -n "$CONDA_LABEL" ; then make -C conda upload ; fi
...@@ -5,13 +5,10 @@ export CONDA_HOME=/var/tmp/miniconda ...@@ -5,13 +5,10 @@ export CONDA_HOME=/var/tmp/miniconda
export PATH="$CONDA_HOME/bin:$PATH" export PATH="$CONDA_HOME/bin:$PATH"
# Disabled because it fails
if [[ -n "$CONDA_UPLOAD_TOKEN" ]]; then if [[ -n "$CONDA_UPLOAD_TOKEN" ]]; then
USER=plumed # the conda channel USER=plumed # the conda channel
anaconda -t $CONDA_UPLOAD_TOKEN upload -u $USER -l testing \ anaconda -t $CONDA_UPLOAD_TOKEN upload -u $USER -l $CONDA_LABEL $CONDA_HOME/conda-bld/$TRAVIS_OS_NAME-64/plumed*.tar.bz2 --force
$CONDA_HOME/conda-bld/$TRAVIS_OS_NAME-64/plumed*.tar.bz2 --force anaconda -t $CONDA_UPLOAD_TOKEN upload -u $USER -l $CONDA_LABEL $CONDA_HOME/conda-bld/$TRAVIS_OS_NAME-64/py-plumed*.tar.bz2 --force
anaconda -t $CONDA_UPLOAD_TOKEN upload -u $USER -l testing \
$CONDA_HOME/conda-bld/$TRAVIS_OS_NAME-64/py-plumed*.tar.bz2 --force
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment