forked from CoatiSoftware/SourcetrailPythonIndexer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
84 lines (71 loc) · 2.96 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
language: cpp
matrix:
include:
- os: linux
sudo: required
compiler: gcc
dist: bionic
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env:
- CC_COMPILER=gcc-5 CXX_COMPILER=g++-5 PYTHON=3.6
- os: osx
compiler: clang
env:
- PYTHON=3.6
before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
HOMEBREW_NO_AUTO_UPDATE=1 brew install swig
brew link --force swig
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
pyenv shell 3.6
sudo apt-get update
sudo apt-get install -qq swig
fi
install:
- if [[ "${CXX_COMPILER}" != "" ]]; then export CXX=${CXX_COMPILER}; export CXX_FOR_BUILD=${CXX_COMPILER}; fi
- if [[ "${CC_COMPILER}" != "" ]]; then export CC=${CC_COMPILER}; export CC_FOR_BUILD=${CC_COMPILER}; fi
- pip3 install -r requirements.txt
script:
- |
PACKAGE_VERSION=$(python3 -c "from _version import __version__; print(__version__.replace('.', '_'))")
export PACKAGE_NAME="SourcetrailPythonIndexer_${PACKAGE_VERSION}-${TRAVIS_OS_NAME}"
- echo ${PACKAGE_NAME}
- git submodule init
- git submodule update
- cd SourcetrailDB
- mkdir build
- cd build
- cmake -DBUILD_BINDINGS_PYTHON=1 -DPYTHON_VERSION=$PYTHON ..
- make
- cd ../..
- cp SourcetrailDB/build/bindings_python/sourcetraildb.py .
- cp SourcetrailDB/build/bindings_python/_sourcetraildb* _sourcetraildb.so
- pyinstaller freezing.spec
- python3 test.py
- python3 test_shallow.py
before_deploy:
- cd $TRAVIS_BUILD_DIR/dist
- mv SourcetrailPythonIndexer ${PACKAGE_NAME}
- mkdir -p ${PACKAGE_NAME}/license/3rd_party_licenses
- cp ../LICENSE.txt ${PACKAGE_NAME}/license/
- cp ../SourcetrailDB/LICENSE.txt ${PACKAGE_NAME}/license/3rd_party_licenses/license_sourcetraildb.txt
- cp ../SourcetrailDB/external/cpp_sqlite/license_cpp_sqlite.txt ${PACKAGE_NAME}/license/3rd_party_licenses/
- cp ../SourcetrailDB/external/json/license_json.txt ${PACKAGE_NAME}/license/3rd_party_licenses/
- zip -r ${PACKAGE_NAME} ${PACKAGE_NAME}
deploy:
provider: releases
api_key:
secure: aCJiSdJhxayw/dp8OecP+r3PGVRbHHO/UOoM1X2KzP05fHGvXB3jhWIYCefyVMe6hp1xHjM5aYUOejp+25CEl6xOjRZpLJqkAmdIcBls0nRvmseQNzEY1iIRPogfg2isGsCZG66IkLQuU9/CjiJJz8t5/wMopawbkjD9NDg1I5dXONglNz59h8SPgZvWc4YHrn0PyxE1lSihlNBmGXu3RX1MI40jTUNNy3hByFukAArJAiCNdD96BL1JKeMOFjTob0DjdGN7LHkB26hrcXR4/oNOr2sZW+bELn8vL59YOpJVtMDkBajL21KQ4b9kiGgtbsfLQecF3twHq/MsZIa/oCetRYMyTHW2nNIY0vFPeWwl+HRLEWUl+afpWlRG17ODs9RDxM7CpW3yvVl6bzILiCgBH84e0tbpPsK1Rr7I1ARZgZ7YSJ2moTZMSoo3A1quHRBpxMlGM42ao98HTuT/PQBKxcbol7QkLyPL80IHFDn7ekZKUeVo4e9hT5kNF7aFIDC6KolxitV2ia5dV+yL13JXi4DllotmCXKzDy8dMk4wg9OGFLOSz0S2h97F1r7ajtxxTL02sGysAsLflHT12X53U3nKulWr5Jqm37LfhuIUxEQWKLxvPN5LmCc8+yunSey95sUV3m7cB7n4oHGny1+WBDAotSKdS+ENJdPlEyw=
file_glob: true
file: "$TRAVIS_BUILD_DIR/dist/*.zip"
overwrite: true
skip_cleanup: true
on:
tags: true
repo: CoatiSoftware/SourcetrailPythonIndexer