Skip to content
Permalink
Browse files

travis conditions for ontology release, skeleton to start docs build

  • Loading branch information
tgbugs committed Dec 11, 2019
1 parent 4ca48f8 commit 76cf659b5b46969a270a044ffa211c1df12ff047
Showing with 16 additions and 7 deletions.
  1. +16 −7 .travis.yml
@@ -16,7 +16,15 @@ branches:
python:
- 3.7

env:
global:
- ONTOLOGY=$(git show --first-parent --name-only --pretty='' HEAD | grep '\.ttl$')
- DOCS=$(git show --first-parent --name-only --pretty='' HEAD | grep '^docs\/')
- TRAVIS=$(git show --first-parent --name-only --pretty='' HEAD | grep '^\.travis.yml$')

before_install:
- if [[ -n $DOCS && $TRAVIS_BRANCH = master ]];then echo trigger docs build; fi
- git checkout ${TRAVIS_BRANCH} # ontload doesn't currently work if git is in detached head mode
- mkdir build
- pushd build
- wget https://raw.githubusercontent.com/tgbugs/pyontutils/master/nifstd/scigraph/curie_map.yaml
@@ -28,25 +36,26 @@ install:
- ontload scigraph --scigraph-quiet -z "${TRAVIS_BUILD_DIR}/build" -l $(realpath "${TRAVIS_BUILD_DIR}/../") -O SciGraph -B master -b ${TRAVIS_BRANCH} -t "${TRAVIS_BUILD_DIR}/build/graphload.yaml" -u "${TRAVIS_BUILD_DIR}/build/curie_map.yaml"

script:
#- pipenv run ipython -c "__import__('pyontutils.config').config.bootstrap_config()"
- git checkout ${TRAVIS_BRANCH} # ontload doesn't currently work if git is in detached head mode
- ontload graph NIF-Ontology NIF --scigraph-quiet --build-scigraph -z "${TRAVIS_BUILD_DIR}/build" -l $(realpath "${TRAVIS_BUILD_DIR}/../") -O SciGraph -B master -b ${TRAVIS_BRANCH} -t "${TRAVIS_BUILD_DIR}/build/graphload.yaml" -u "${TRAVIS_BUILD_DIR}/build/curie_map.yaml"

after_success:
- echo "scp the artifacts somewhere"
- echo ""

before_deploy:
- git config --local user.name "Travis Build Bot"
- git config --local user.email "tgbugs+build@gmail.com"
- export TRAVIS_TAG=${TRAVIS_TAG:-$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)}
- git tag $TRAVIS_TAG
- export TRAVIS_TAG=${TRAVIS_TAG:-${TRAVIS_BRANCH}-${TRAVIS_BUILD_NUMBER}}
- if [[ -n $ONTOLOGY || -n $TRAVIS ]];then git tag $TRAVIS_TAG; fi

deploy:
provider: releases
api_key:
secure: "CK0fvltjiIAiJ0fDlqzyHG0XpvoROODdRZc7LLwajxNAfRMl9TjH5jD9zVsaH3dt11grweoknRS8WcAzZ2kwDePEbTKON20Ay2tvf73fIzxpA+szg+zJF+sH23bx3xEQrjW/9SQTYx7dOGrvJwhI9GPqctFjPpSwy40/+nMBJ7gocF8TG1ZSswa1anFsM6LNtcSb+qRduIto8z8XkIyi7/BV6yfXrPj/HAeDUoDTVaIQj85DONWmV9h4vrkHBgcqFtWwVvt5uIRCscwFUPYhGcPCBE9sGGeCOaYLiwGzmBwoR4DPuc8Qns4WY/JqBa/IbhmuenybWxlTpgwW+NCs8VcmOrcP9plBxf52nVYNIT4u+k+2h4LwLu3fuJMA0YhQuwnok18b6wS4Yf0E04s03YiouM7kzDAQ6Y8ZESmcJ0CeileGDoxBeI4HIs+xohMsNbpj+KcxcBVQF9tvpBw9ysZodpiYPgO8fnVcIa7li4gtRcDgQGw0NeIEC/VU4wiZJQsQp1W6wqFI6fkZ6dsN9q/zO1nhkyhUChFWQAoQWaMZNhsS6xQiuZkjSrPtyFFEYR0rbzFIMIEk2fzbqwnE4pHyok2vTBDTVGdZGez+O0fLJPs1ojgS0BprciYZqeT8JRu+jv/MZ89lhdilwt1xsJH5+3dYtghAyUv8UfkgIss="
secure: "CK0fvltjiIAiJ0fDlqzyHG0XpvoROODdRZc7LLwajxNAfRMl9TjH5jD9zVsaH3dt11grweoknRS8WcAzZ2kwDePEbTKON20Ay2tvf73fIzxpA+szg+zJF+sH23bx3xEQrjW/9SQTYx7dOGrvJwhI9GPqctFjPpSwy40/+nMBJ7gocF8TG1ZSswa1anFsM6LNtcSb+qRduIto8z8XkIyi7/BV6yfXrPj/HAeDUoDTVaIQj85DONWmV9h4vrkHBgcqFtWwVvt5uIRCscwFUPYhGcPCBE9sGGeCOaYLiwGzmBwoR4DPuc8Qns4WY/JqBa/IbhmuenybWxlTpgwW+NCs8VcmOrcP9plBxf52nVYNIT4u+k+2h4LwLu3fuJMA0YhQuwnok18b6wS4Yf0E04s03YiouM7kzDAQ6Y8ZESmcJ0CeileGDoxBeI4HIs+xohMsNbpj+KcxcBVQF9tvpBw9ysZodpiYPgO8fnVcIa7li4gtRcDgQGw0NeIEC/VU4wiZJQsQp1W6wqFI6fkZ6dsN9q/zO1nhkyhUChFWQAoQWaMZNhsS6xQiuZkjSrPtyFFEYR0rbzFIMIEk2fzbqwnE4pHyok2vTBDTVGdZGez+O0fLJPs1ojgS0BprciYZqeT8JRu+jv/MZ89lhdilwt1xsJH5+3dYtghAyUv8UfkgIss="
file_glob: true
file: "${TRAVIS_BUILD_DIR}/build/NIF-Ontology-${TRAVIS_BRANCH}-graph-*.zip"
file: "${TRAVIS_BUILD_DIR}/build/NIF-Ontology-${TRAVIS_BRANCH}-graph-*.zip"
skip_cleanup: true
prerelease: true
draft: true
on:
all_branches: true
condition: -n $ONTOLOGY

0 comments on commit 76cf659

Please sign in to comment.
You can’t perform that action at this time.