forked from KxSystems/ml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
83 lines (73 loc) · 3.31 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
78
79
80
81
82
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
# Useful for debugging any issues with conda
- conda update -q 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 install --upgrade pip;
pip -q install -r requirements.txt;
fi
beforescript:
- IMPLEMENTATION=$(if [[ "x$TRAVIS_TAG" == "x" ]]; then echo $TRAVIS_BRANCH-$TRAVIS_COMMIT; else echo $TRAVIS_TAG; fi;)
- perl -p -i -e 's/TOOLKITVERSION/`\$\"'${IMPLEMENTATION}'\"/g' ml.q
script:
- (cd clust && make && make install && make clean)
- echo "Preparing version $TRAVIS_BRANCH-$TRAVIS_COMMIT"
- tar czf ml_$TRAVIS_OS_NAME-$TRAVIS_BRANCH.tgz *.q fresh/ xval/ util/ clust/ graph/ timeseries/ optimize/ requirements.txt LICENSE README.md
- echo "Packaged as ml_$TRAVIS_OS_NAME-$TRAVIS_BRANCH.zip"
- if [[ "x$QLIC_KC" != "x" ]]; then
curl -fsSL -o test.q https://github.com/KxSystems/embedpy/raw/master/test.q;
bash tests/testFiles.bat;
else
echo No kdb+, no tests;
fi
deploy:
provider: releases
api_key: "$GITHUB_APIKEY"
file_glob: true
file: ml_$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/ml:latest -f docker/Dockerfile .
- docker tag kxsys/ml:latest kxsys/ml:$TRAVIS_BRANCH
deploy:
provider: script
script:
- echo $DOCKER_PASSWORD|docker login --username $DOCKER_USERNAME --password-stdin && docker push kxsys/ml:latest && docker push kxsys/ml:$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="