-
Notifications
You must be signed in to change notification settings - Fork 12
/
.travis.yml
109 lines (98 loc) · 3.65 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
jobs:
include:
- dist: bionic
os: linux
- dist: focal
os: linux
- osx_image: xcode14
os: osx
- os: windows
language: c
compiler: gcc
os: linux
dist: xenial
before_install:
- export FILE_ROOT="arrowkdb"
- export BUILD="True"
- export TESTS="True"
# Run instructions to install or build Arrow libray
- if [[ $BUILD == "True" ]]; then
chmod +x travis_setup.sh;
./travis_setup.sh;
export LIB="cmake/$FILE_ROOT/lib";
mkdir cmake;
else
export LIB="";
fi
# Set ARROW_INSTALL to the Arrow installation directory
- if [[ $BUILD == "True" ]]; then
if [[ $TRAVIS_OS_NAME == "windows" || $TRAVIS_OS_NAME == "osx" ]]; then
export ARROW_INSTALL=$TRAVIS_BUILD_DIR/cbuild/install;
export LD_LIBRARY_PATH=$ARROW_INSTALL/lib:$LD_LIBRARY_PATH;
export DYLD_LIBRARY_PATH=$ARROW_INSTALL/lib:$LD_LIBRARY_PATH;
export PATH=$ARROW_INSTALL/bin:$PATH;
fi
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
- 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" .. -DARROW_INSTALL=$ARROW_INSTALL;
cmake --build . --config Release;
cmake --build . --config Release --target install;
cd ..;
elif [[ $BUILD == "True" && ( $TRAVIS_OS_NAME == "linux" || $TRAVIS_OS_NAME == "osx" ) ]]; then
cd cmake && cmake .. -DCMAKE_BUILD_TYPE=Release -DARROW_INSTALL=$ARROW_INSTALL && make install && cd .. ;
fi
script:
- if [[ $TESTS == "True" && "x$OD" != "x" && "x$QLIC_KC" != "x" ]]; then
curl -o test.q -L https://github.com/KxSystems/hdf5/raw/master/test.q;
if [[ $TRAVIS_OS_NAME == "windows" ]]; then
q test.q tests -q && q test.q tests/null_mapping -q && q test.q tests/null_bitmap -q;
else
q test.q tests -q && q test.q tests/null_mapping -q && q test.q tests/null_bitmap -q && q test.q tests/orc_dataloader -q;
fi
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 docs examples proto;
elif [[ $TRAVIS_OS_NAME == "linux" || $TRAVIS_OS_NAME == "osx" ]]; then
tar -zcvf $FILE_NAME README.md install.sh LICENSE q docs examples proto;
fi
deploy:
provider: releases
token: "$GITHUB_APIKEY"
file: "$FILE_NAME"
on:
tags: true
condition: $TRAVIS_OS_NAME = windows || $TRAVIS_OS_NAME = osx || ($TRAVIS_DIST = bionic && $TRAVIS_OS_NAME = linux)
skip_cleanup: 'true'