-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
executable file
·115 lines (102 loc) · 4.13 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
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
jobs:
include:
- dist: xenial
os: linux
- dist: bionic
os: linux
- dist: focal
os: linux
- os: osx
osx_image: xcode13.1
- os: windows
language: c
compiler: gcc
os: linux
dist: xenial
before_install:
- export FILE_ROOT="hdf5"
- export TESTS="True"
- export BUILD="True"
# Run instructions to install the C/C++ requirements (HDF5_INSTALL_DIR) set in place of PAHO_HOME/HDF5_HOME etc.
# Files in this case are unzipped into cbuild within travis_setup.sh
- if [[ $BUILD == "True" ]]; then
chmod +x travis_setup.sh;
./travis_setup.sh;
mkdir cmake;
else
echo "no build.";
fi
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then
QLIBDIR=l64; OD=$L64;
elif [[ $TRAVIS_OS_NAME == "osx" ]]; then
QLIBDIR=m64; OD=$M64;
elif [[ $TRAVIS_OS_NAME == "windows" ]]; then
QLIBDIR=w64; OD=$W64;
else
echo "unknown OS ('$TRAVIS_OS_NAME')" >&2; exit 1;
fi
- if [[ $BUILD == "True" && $TRAVIS_OS_NAME == "osx" ]]; then
export HDF5_INSTALL_DIR="/usr/local/opt/[email protected]/";
else
export HDF5_INSTALL_DIR=$TRAVIS_BUILD_DIR/cbuild;
fi
- echo "HDF5_INSTALL_DIR '$HDF5_INSTALL_DIR'";
- export LD_LIBRARY_PATH=$HDF5_INSTALL_DIR/lib:$LD_LIBRARY_PATH
- export DYLD_LIBRARY_PATH=$HDF5_INSTALL_DIR/lib:$DYLD_LIBRARY_PATH
- export PATH=$HDF5_INSTALL_DIR/lib:$PATH
- export PATH=$HDF5_INSTALL_DIR/bin:$PATH
- export PATH=$HDF5_INSTALL_DIR/include:$PATH
- export QLIBDIR
- mkdir qhome
- export QHOME=$(pwd)/qhome
- export PATH=$QHOME/$QLIBDIR:$PATH
# Set up q for testing and execute tests on multiple
- if [[ $TESTS == "True" && "x$OD" != "x" && "x$QLIC_KC" != "x" ]]; then
curl -u $NEXUS_USER:$NEXUS_PASS -o ${QHOME}/q.zip -L $OD;
unzip -d ${QHOME} ${QHOME}/q.zip;
rm ${QHOME}/q.zip;
echo -n $QLIC_KC |base64 --decode > ${QHOME}/kc.lic;
else
echo No kdb+, no tests;
fi
- if [[ $TRAVIS_OS_NAME == "windows" ]]; then
export FILE_TAIL="zip";
else
export FILE_TAIL="tgz";
fi
- export FILE_NAME=$FILE_ROOT-$TRAVIS_OS_NAME-$TRAVIS_BRANCH.$FILE_TAIL
# Make binaries for the library as appropriate
- if [[ $BUILD == "True" && $TRAVIS_OS_NAME == "windows" ]]; then
cd cmake && cmake -G "Visual Studio 15 2017 Win64" .. ;
cmake --build . --config Release --target install;
cd ..;
elif [[ $BUILD == "True" && ( $TRAVIS_OS_NAME == "linux" || $TRAVIS_OS_NAME == "osx" ) ]]; then
cd cmake;
cmake ..;
cmake --build . --target install;
cd ..;
fi
script:
- if [[ $TESTS == "True" && "x$OD" != "x" && "x$QLIC_KC" != "x" ]]; then
q test.q tests/ -q;
fi
- if [[ $TRAVIS_OS_NAME == "windows" && $BUILD == "True" ]]; then
7z a -tzip -r $FILE_NAME ./cmake/$FILE_ROOT/*;
elif [[ $BUILD == "True" && ( $TRAVIS_OS_NAME == "linux" || $TRAVIS_OS_NAME == "osx" ) ]]; then
tar -zcvf $FILE_NAME -C cmake/$FILE_ROOT .;
elif [[ $TRAVIS_OS_NAME == "windows" ]]; then
7z a -tzip $FILE_NAME README.md install.bat LICENSE q examples docs;
elif [[ $TRAVIS_OS_NAME == "linux" || $TRAVIS_OS_NAME == "osx" ]]; then
tar -zcvf $FILE_NAME README.md install.sh LICENSE q examples docs;
fi
deploy:
provider: releases
token: "$GITHUB_APIKEY"
file: "$FILE_NAME"
on:
tags: true
condition: $TRAVIS_OS_NAME = windows || $TRAVIS_OS_NAME = osx || ($TRAVIS_DIST = xenial && $TRAVIS_OS_NAME = linux)
skip_cleanup: 'true'
notifications:
slack:
secure: "Czkq4kk2Pl2TyWnW1y7KP7YLndCyb3Qai+ISPikf1VyBZp358apYRkiQZC7D8wwgCG4V+HjDj9+XJK9SBYyXGVsEnA+KEKS+9YG0K/UIuo6gv8IOj3962chaB4HfZn5LO34oLuhIjZJA0u8s5lPFoLJktfcHFvJibc6kXlET6ZMt/tZIHhztMGSyCqL46oidnTGZJFGO3Gb9FkBB8NOPduvROZAa9mF0CBNdd2gzig5lPG7eXjQSbKxVDbKWW81zEs8CSmM/guC+2Ar+rpPO4RAFq7UgrK6Gdg2GN863L0tMTttxDYdTLD+Bjk6mUZVnr5vPvtgvqKU801pjqtSEjNjeV3ZN+E19359mlH1eQ/9Uv5HaB05i3CIvWUTodp1eQDFGsvixQMnD9PrzD+SbY5v6oDg/R0+pEHhPhRJ6v23OAmFyU90kn3VQQIFDMKufKSJE4jItoUBXhmavSHHU/sysH1n8YXCU0kuOFtWIK+t5RIFrhYuDvVcz8O4xF95oCdKXjX/jWTO+qGc+YU9WKieCwS8PXwqBJJA4V5D4KkzmJAX5Y2SqODYF/KOD59AedX9u7nlnTD3EHK5iGnnIVhAKyJq0kwLp3ikP7uZupddMg/6J8s0zg3r61GvxXaoPDTAzTn7MDEX7HQonX+IiUvfRQFIuT3VmQvv+pEeoDOw="