-
Notifications
You must be signed in to change notification settings - Fork 21
/
.travis.yml
78 lines (72 loc) · 3.19 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
language: c
os:
- linux
- osx
git:
depth: 1
install:
# We do this conditionally because it saves us some downloading if the
# version is the same.
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-4.5.4-MacOSX-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
- if [ $TRAVIS_OS_NAME = linux ]; then QLIBDIR=l64; elif [ $TRAVIS_OS_NAME = osx ]; then QLIBDIR=m64; else echo "unknown OS ('$TRAVIS_OS_NAME')" >&2; exit 1; fi; export QLIBDIR
- conda install -c kx embedPy # grab kdb+ and embedPy with conda
- cp -r $(conda info --base)/q q && export QHOME=$(pwd)/q && export PATH=$QHOME/$QLIBDIR:$PATH
# grab latest embedpy
- if [[ "x$QLIC_KC" != "x" ]]; then
echo -n $QLIC_KC |base64 --decode > q/kc.lic;
pip -q install -r requirements.txt;
python -m spacy download en;
fi
beforescript:
- IMPLEMENTATION=$(if [[ "x$TRAVIS_TAG" == "x" ]]; then echo $TRAVIS_BRANCH-$TRAVIS_COMMIT; else echo $TRAVIS_TAG; fi;)
- perl -p -i -e 's/NLPVERSION/`\$\"'${IMPLEMENTATION}'\"/g' nlp.q
script:
- echo "Preparing version $TRAVIS_BRANCH-$TRAVIS_COMMIT"
- tar czf nlp_$TRAVIS_OS_NAME-$TRAVIS_BRANCH.tgz *.q requirements.txt LICENSE README.md
- echo "Packaged as nlp_$TRAVIS_OS_NAME-$TRAVIS_BRANCH.tgz"
- if [[ "x$QLIC_KC" != "x" ]]; then
curl -fsSL -o test.q https://github.com/KxSystems/embedpy/raw/master/test.q;
q test.q -q;
else
echo No kdb+, no tests;
fi
deploy:
provider: releases
api_key: "$GITHUB_APIKEY"
file_glob: true
file: nlp_$TRAVIS_OS_NAME-$TRAVIS_BRANCH.tgz
skip_cleanup: true
on:
tags: true
jobs:
include:
- stage: docker
sudo: required
services:
- docker
install: skip
script:
- docker build -t kxsys/nlp:latest -f docker/Dockerfile .
- docker tag kxsys/nlp:latest kxsys/nlp:$TRAVIS_BRANCH
deploy:
provider: script
script:
- echo $DOCKER_PASSWORD|docker login --username $DOCKER_USERNAME --password-stdin && docker push kxsys/nlp:latest && docker push kxsys/nlp:$TRAVIS_BRANCH
skip_cleanup: true
on:
tags: true
condition: $TRAVIS_BRANCH =~ ^[0-9]+\.
notifications:
slack:
secure: "fDsGcgmkYyndvlN2NQlfqPrk0rfKVbDlp2Wg5pr/PZYCRY7rjXEwdby9T/tOpulQ6HXpdnqFN1zJ+5ih3XCwtLa4mPYRGWK3GvLNFvINTQDsYrCpgfQKxC6snBiGrUA0DoSAhS1nlB2igGoZSUSGi+sROsLiDn5aIqi3+Wz3JcFytISncWovO2bhedRjrFZXt4zmrDRpJ2BCShQdg2kppPGIDUHS0/xDElGtaHizLijeJjX/49xtABn7cLrv3wbVvejHU6yu5OdxOqtc98NYLV1lVPxiUIrjmvs/tlV4C6peGc1H9GioExThoWxW/KrMEL7biRxtTZzgqr+2W6+NWkzL74pMhqROOGvULH9DkfQxkjNNN6aLhN98oYswOgzg/UxM/F+Qolf948EWgcbg4USlAotd779YOfYPymYEeJlZTrvuYSazUdjUh6FkJtDYeiu7ZHkc75c4Fm8RNpxC6Kc4fO1Aq9ga0A8VoEzwIEscsMDvNC0hJjeFvglN0wie+jT23nNXnucTdgqxH9aCdub+ARcDEIXMS99WiYApHjbNK2WcTJYVDIKy1g1dO49oQMNLaHofaoO14OHw3OcWBlnHKhU2OWPuB0v0vqTeW8YAhGUewEmc5uwg6hYeVmE4ThDr4tiNDDyeCA6uTTN87oCguvlwrLF56vIEg0Sh4ok="