forked from KxSystems/embedPy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
134 lines (127 loc) · 5.01 KB
/
.travis.yml
File metadata and controls
134 lines (127 loc) · 5.01 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
stage: standalone
language: c
os:
- linux
- osx
git:
depth: 1
before_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-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-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
before_script:
- IMPLEMENTATION=$(if [[ "x$TRAVIS_TAG" == "x" ]]; then echo $TRAVIS_BRANCH-$TRAVIS_COMMIT; else echo $TRAVIS_TAG; fi;)
- perl -p -i -e 's/EMBEDPYVERSION/`\$\"'${IMPLEMENTATION}'\"/g' p.q
script:
- if [ $TRAVIS_OS_NAME = osx ]; then pyenv init - > pyenv.init && source pyenv.init ; fi
- if [ $TRAVIS_OS_NAME = linux ]; then QLIBDIR=l64;OD=$L64; elif [ $TRAVIS_OS_NAME = osx ]; then QLIBDIR=m64;OD=$M64; else echo "unknown OS ('$TRAVIS_OS_NAME')" >&2; exit 1; fi; export QLIBDIR
- mkdir q && export QHOME=$(pwd)/q && export PATH=$QHOME/$QLIBDIR:$PATH
- if [[ "x$OD" != "x" ]]; then
curl -u $NEXUS_USER:$NEXUS_PASS -o ${QHOME}/q.zip -L $OD;
unzip -d q q/q.zip;
else
echo No kdb+;
fi
- make p.so
- cp [ml]64/p.so q/$QLIBDIR;
- tar czf embedPy_$TRAVIS_OS_NAME-$TRAVIS_BRANCH.tgz p.q p.k test.q tests [ml]64/p.so LICENSE README.md
- if [[ "x$QLIC_KC" != "x" ]]; then
echo -n $QLIC_KC |base64 --decode > q/kc.lic;
pip install --upgrade pip;
pip install --upgrade setuptools;
pip -q install -r tests/requirements.txt;
q test.q -s 4 -q;
else
echo No kdb+, no tests;
fi
## virtualenv
- pip install virtualenv;
- virtualenv travisEnv;
- source travisEnv/bin/activate
- echo $(which python)
- if [[ "x$QLIC_KC" != "x" ]]; then
echo -n $QLIC_KC |base64 --decode > q/kc.lic;
pip install --upgrade pip;
pip install --upgrade setuptools;
pip -q install -r tests/requirements.txt;
q test.q -s 4 -q;
else
echo No kdb+, no tests;
fi
compiler:
- clang
deploy:
provider: releases
api_key: "$GITHUB_APIKEY"
file_glob: true
file: embedPy_$TRAVIS_OS_NAME-$TRAVIS_BRANCH.tgz
skip_cleanup: true
on:
tags: true
jobs:
include:
- stage: deploy_target
env:
- TARGET=docker
sudo: required
services:
- docker
before_install: skip
script:
- docker build -t kxsys/embedpy:latest -f docker/Dockerfile .
- docker tag kxsys/embedpy:latest kxsys/embedpy:$TRAVIS_BRANCH
deploy:
provider: script
script:
- echo $DOCKER_PASSWORD|docker login --username $DOCKER_USERNAME --password-stdin && docker push kxsys/embedpy:latest && docker push kxsys/embedpy:$TRAVIS_BRANCH
skip_cleanup: true
on:
tags: true
condition: $TRAVIS_BRANCH =~ ^[0-9]+\.
- &conda_build
stage: deploy_target
env:
- TARGET=conda
os:
- linux
before_install: skip
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-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 install -q "conda-build"
script:
- if [ $TRAVIS_OS_NAME = linux ]; then QLIBDIR=l64; elif [ $TRAVIS_OS_NAME = osx ]; then QLIBDIR=m64; fi; export QLIBDIR
- if [[ "x$QLIC_KC" != "x" ]]; then mkdir -p q; echo -n $QLIC_KC |base64 --decode > q/kc.lic; export QLIC=$($PREFIX)/q; fi
- export EMBEDPY_VERSION=$TRAVIS_BRANCH
- conda build conda-recipe --output -c kx > packagenames.txt
- conda build -c kx conda-recipe --no-long-test-prefix
deploy:
provider: script
script:
- build/anaconda_upload.sh
skip_cleanup: true
on:
tags: true
condition: $TRAVIS_BRANCH =~ ^[0-9]+\.
- <<: *conda_build
os:
- osx
notifications:
slack:
secure: "MR5icOywJJSFy7gnxeNXACN2nKiHniVgX1myiF+H9U4wsW6+2BHzPMcmy3FIUjL3Tb+PcAfq7+8RHerAx/XEB7nsVJsu9TyCjYWgaqx5Z9WNIDcjQh4wnFurhlzqrwF4gjelY+wxdffpsKUVaP+fermWbqHvv1aPPk4l3xEonXZ5J5uNkPTPufILzpx2cTxWg08o6PhvgjTrombs+9rGxahU8cfUSwTVuPCcPtOy70kcaowFfrU2kWzQk88NM5d/TVZdkOmGhLqVWSvRgaLXFkGYwRWatT7divlXX2evYwdYib++RUUhxDGZwJjdFCbGDNjrMyBbJOrCkndxLSATd6gN76dWuWsVV49K4YB0Mw5uFJFt6J0TnbkJC5Zsl9i6vik7m3anuIPOeAI54/wtlCvMeIpt2eQCPMy7xXu2hXNUR4ofM4yaVjKz69b5JIZ1o3vBxPQxAqIYggqPsTaLJM4vLpZlncnViBkfO/La5V9sJNQy3IyLSlEKry3giYfo8wbHT3PLn1xG7HW2DJ7hRn19yzTkCCNfaSzvq8YlSQvjNlPCO566ykYYG6SzG/NnbDqJAqydhpFuNC7ZB5dPuAOoDANCGs4gtfYKia+ZVxKYn25Y52vdi34L5TO83BUrsQWgytb0J6a4jDe3PWLVFSP7XLiy4h8Tyv76+Hm4lHk="