Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
NIF-Ontology/.travis.yml
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
86 lines (78 sloc)
3.34 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://travis-ci.org/tgbugs/pyontutils | |
language: python | |
cache: | |
directories: | |
- $HOME/.cache/pip | |
- $HOME/.m2 | |
- ${TRAVIS_BUILD_DIR}/../SciGraph | |
branches: | |
only: | |
- dev | |
- master | |
git: | |
depth: 10 | |
python: | |
- 3.9 | |
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$') | |
matrix: | |
- ONT_CONFIG=nifstd | |
- ONT_CONFIG=sparc | |
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/graphload-base-template.yaml | |
- > | |
case ${ONT_CONFIG} in | |
nifstd) curl -o ontologies.yaml https://raw.githubusercontent.com/tgbugs/pyontutils/master/nifstd/scigraph/ontologies-nifstd.yaml ;; | |
sparc) curl -o ontologies.yaml https://raw.githubusercontent.com/SciCrunch/sparc-curation/master/resources/scigraph/ontologies-sparc.yaml ;; | |
esac | |
- popd | |
install: | |
- pip install git+https://github.com/tgbugs/pyontutils.git | |
- > | |
ontload scigraph | |
--scigraph-quiet | |
--scigraph-org SciGraph | |
--scigraph-branch master | |
--zip-location "${TRAVIS_BUILD_DIR}/build" | |
--git-local $(realpath "${TRAVIS_BUILD_DIR}/../") | |
script: | |
- > | |
ontload graph NIF-Ontology NIF | |
--scigraph-quiet | |
--path-build-scigraph $(realpath "${TRAVIS_BUILD_DIR}/../") | |
--scigraph-org SciGraph | |
--scigraph-branch master | |
--zip-location "${TRAVIS_BUILD_DIR}/build" | |
--git-local $(realpath "${TRAVIS_BUILD_DIR}/../") | |
--branch ${TRAVIS_BRANCH} | |
--graphload-config "${TRAVIS_BUILD_DIR}/build/graphload-base-template.yaml" | |
--graphload-ontologies "${TRAVIS_BUILD_DIR}/build/ontologies.yaml" | |
- > | |
mv | |
"${TRAVIS_BUILD_DIR}/build/NIF-Ontology-${TRAVIS_BRANCH}-graph-*.zip" | |
"$(filename=$(basename $(realpath NIF-Ontology-dev-graph-*.zip)); echo "${filename%.*}-${ONT_CONFIG}.zip")" | |
after_success: | |
- 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:-${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=" | |
file_glob: true | |
file: "${TRAVIS_BUILD_DIR}/build/NIF-Ontology-${TRAVIS_BRANCH}-graph-*.zip" | |
prerelease: true | |
draft: true | |
on: | |
all_branches: true | |
condition: -n $ONTOLOGY |