-
Notifications
You must be signed in to change notification settings - Fork 449
/
.travis.yml
68 lines (59 loc) · 2.71 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
## build Robotics Toolbox for MATLAB
# ____ _ _ _ _____ _ _
# | _ \ ___ | |__ ___ | |_(_) ___ ___ |_ _|__ ___ | | |__ _____ __
# | |_) / _ \| '_ \ / _ \| __| |/ __/ __| | |/ _ \ / _ \| | '_ \ / _ \ \/ /
# | _ < (_) | |_) | (_) | |_| | (__\__ \ | | (_) | (_) | | |_) | (_) > <
# |_| \_\___/|_.__/ \___/ \__|_|\___|___/ |_|\___/ \___/|_|_.__/ \___/_/\_\
language: minimal
dist: bionic
services: docker
before_install:
# build the local file system
# . where RTB is cloned ($TRAVIS_BUILD_DIR)
# ./lib/common where toolbox common is cloned
# ./lib/spatial-math where spatial math is cloned
- mkdir lib
- git clone --depth 50 https://github.com/petercorke/toolbox-common-matlab lib/common
- git clone --depth 50 https://github.com/petercorke/spatial-math lib/spatial-math
- sudo apt-get -y install libatk1.0-0 libxcursor1
install:
# install help2doc converter
- git clone https://github.com/petercorke/help2doc $HOME/bin
- export PATH="$(dirname "$HOME/bin"):$PATH"
# install MATLAB unit test runner
- wget -qO- --retry-connrefused https://ssd.mathworks.com/supportfiles/ci/ephemeral-matlab/v0/install.sh | sudo -E bash
before_script:
## build the doco PDF and place it in the src folder so it gets shipped to MATLAB cloud
# create the LaTeX code
- help2doc -l --include *.m models/*.m lib/*/*.m
# create the release file
- printf '\\def\\release{%s}\n' `cat ./RELEASE` > release.tex
- printf '\\def\\reldate{%s}\n' "`date '+%B %Y'`" >> release.tex
# all LaTeX source into manual build folder
- mv all.tex release.tex doc/manual
# convert all the included figures to PDF since we are using tectonic not pdflatex
# - mogrify -density 300 -format pdf -verbose doc/manual/figs/*.eps ## fails because of new security settings of magick
# see https://github.com/pothitos/ACvsBC-Figure/blob/master/.travis.yml
#
# Compile all the LaTex code
# see https://hub.docker.com/r/dxjoke/tectonic-docker
- docker run --mount src=$TRAVIS_BUILD_DIR/doc/manual,target=/usr/src/tex,type=bind dxjoke/tectonic-docker /bin/sh -c "tectonic robot.tex"
# rename PDF and copy to src folder
- mv doc/manual/robot.pdf ./robot.pdf
## build a minimalist Contents.m file
- echo "% Robotics Toolbox for MATLAB" > Contents.m
- echo "% Version " `cat RELEASE` `date "+%e-%b-%G"` >> Contents.m
script:
# run the unit tests with MATLAB on Travis cloud
- matlab -sd unit_test -batch "RunAllTests"
after_success:
# send code coverage xml report to codecov for display
- bash <(curl -s https://codecov.io/bash)
deploy:
provider: releases
api_key: $GITRELEASE
file:
- robot.pdf
- RTB.mltbx
skip_cleanup: true
overwrite: true