forked from JSBSim-Team/jsbsim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
97 lines (96 loc) · 4.36 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
language: python
dist:
- xenial
python:
- "2.7"
- "3.6"
env:
- USE_SYSTEM_EXPAT=OFF
- USE_SYSTEM_EXPAT=ON
notifications:
email: false
# Skip the build of tagged branches (otherwise the same commit is built multiple times)
branches:
except:
- /^JSBSim-.*-v2018a.*$/
- /^Rolling-.*-v2019.*$/
- /^untagged-.*$/
# command to install dependencies
addons:
apt:
packages:
- doxygen
- graphviz
- cxxtest
before_install:
- pip install cython numpy pandas scipy
- gem install gist
- mkdir build
- cd build
- cmake -DCMAKE_INSTALL_PREFIX=~/ -DINSTALL_PYTHON_MODULE=ON -DCPACK_GENERATOR=DEB -DBUILD_SHARED_LIBS=$USE_SYSTEM_EXPAT -DSYSTEM_EXPAT=$USE_SYSTEM_EXPAT ..
- make -j2
- python python/setup.py sdist
- python python/setup.py build_scripts
- python python/setup.py bdist_wheel --skip-build
install:
- pip install python/dist/JSBSim*.whl
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/src
script:
# Check that the Python module has been correctly installed
- python -c "import jsbsim;fdm=jsbsim.FGFDMExec('.', None)"
- pip uninstall jsbsim --yes
- ctest -j2
- if [ "$USE_SYSTEM_EXPAT" = "OFF" ]; then pip install python/dist/JSBSim-*.tar.gz; fi
- if [ "$USE_SYSTEM_EXPAT" = "OFF" ]; then python -c "import jsbsim;fdm=jsbsim.FGFDMExec('.', None)"; fi
after_success:
- cpack
- export TRAVIS_TAG=Rolling-release-v2019
# Build the API documentation with Doxygen (skip if we are building a pull request)
- if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PYTHON_VERSION" = "3.6" ] && [ "$USE_SYSTEM_EXPAT" = "OFF" ]; then make doc; fi
# If the build fails, the tests log will be uploaded to a gist under my account
# (bcoconni) so that they can be deleted when irrelevant. The output of the
# command line `gist` is the web address to the gist.
after_failure:
- echo $GIST_TOKEN > ~/.gist
- gist -d "JSBSim build $TRAVIS_JOB_NUMBER failed" Testing/Temporary/*.log | envsubst
before_deploy:
- git tag -f $TRAVIS_TAG -m "Ubuntu Xenial 16.04 - Release - amd64"
# If the Python runtime is 2.7 then delete all Debian package but the Python module
# The other packages will be deployed by the Python 3.6 runtime
- if [ "$TRAVIS_PYTHON_VERSION" = "2.7" ] && [ "$USE_SYSTEM_EXPAT" = "ON" ]; then rm -f JSBSim*.deb; fi
deploy:
# Deploy the Debian packages
- provider: releases
api_key:
secure: FHMLgbuRTSznrfMSpb3/nJIECKS0v8VFHUfC99ZpMBjZR4kxptDSPchpHzLFlrytzl1+H62w1iWChx5RYaH1MW8a/ejCUWYO0IjO6hLtG72nMJeDIBC2JzLnKN7cLqMrgEHKW7XmK3CtXGa/tXxu+KEvmbwskv3TOWGUokdUB3EI0vTLjjCQBW05VK7oSBq+7Jl4zGJumWwALP5EK7DC7McPXpLlkw5zdga+LQVcg8aDPrNwgF5kaH03b7TagYgiG2OFb4FAPvfz70RWeCRB7QQn1jOGULZ3PHz8EnNOfyBqGJ0flDyAfZcwJNY1OONW9ELnOctvzdmmU2P+KGuK4cJuzI59aRVQrwcSnnl26DU/95Hev4mdCIlPz798C3TfZu+U36uzGMurQJjE7Fg59N4WnqubhWKWu/7qRhn1uttdPm5sIcVAPpshKm8uzlsTLLMTNUMj5ZIimVbFV2lz0PbDWPnbHxHeDKgaVkIjTQy4e1XZH7IhjIVODG2PK1TnWS/6RRTBUVXxwup7Tj8HhVbLjrfPs2qLDJv70sRyKUgAqqKdGkr/7Es52y1i/io3BJqiIOpJBM5Wyzk37NCAlX4WCoqJZQbKKRQ9hH5baZaxlpz28Hc0tbAqfwFOwAOonf1+s7MBM896EoAtdKpr0Z0F/ra9ePQezTbtQhvws3g=
file_glob: true
file:
- "JSBSim-devel*.deb"
- "JSBSim_*[0-9].deb"
- "python[2-3]-JSBSim*.deb"
skip_cleanup: true
overwrite: true
on:
tags: true
condition: $USE_SYSTEM_EXPAT = ON
# Deploy the Python wheels
- provider: releases
api_key:
secure: FHMLgbuRTSznrfMSpb3/nJIECKS0v8VFHUfC99ZpMBjZR4kxptDSPchpHzLFlrytzl1+H62w1iWChx5RYaH1MW8a/ejCUWYO0IjO6hLtG72nMJeDIBC2JzLnKN7cLqMrgEHKW7XmK3CtXGa/tXxu+KEvmbwskv3TOWGUokdUB3EI0vTLjjCQBW05VK7oSBq+7Jl4zGJumWwALP5EK7DC7McPXpLlkw5zdga+LQVcg8aDPrNwgF5kaH03b7TagYgiG2OFb4FAPvfz70RWeCRB7QQn1jOGULZ3PHz8EnNOfyBqGJ0flDyAfZcwJNY1OONW9ELnOctvzdmmU2P+KGuK4cJuzI59aRVQrwcSnnl26DU/95Hev4mdCIlPz798C3TfZu+U36uzGMurQJjE7Fg59N4WnqubhWKWu/7qRhn1uttdPm5sIcVAPpshKm8uzlsTLLMTNUMj5ZIimVbFV2lz0PbDWPnbHxHeDKgaVkIjTQy4e1XZH7IhjIVODG2PK1TnWS/6RRTBUVXxwup7Tj8HhVbLjrfPs2qLDJv70sRyKUgAqqKdGkr/7Es52y1i/io3BJqiIOpJBM5Wyzk37NCAlX4WCoqJZQbKKRQ9hH5baZaxlpz28Hc0tbAqfwFOwAOonf1+s7MBM896EoAtdKpr0Z0F/ra9ePQezTbtQhvws3g=
file_glob: true
file:
- "python/dist/JSBSim*.whl"
skip_cleanup: true
overwrite: true
on:
tags: true
condition: $USE_SYSTEM_EXPAT = OFF
# Deploy the Doxygen built docs
- provider: pages
skip_cleanup: true
local_dir: build/documentation/html
github_token: $GITHUB_TOKEN
verbose: true
on:
python: 3.6
condition: $USE_SYSTEM_EXPAT = OFF