-
Notifications
You must be signed in to change notification settings - Fork 68
/
.travis.yml
52 lines (46 loc) · 2 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
## build Spatial Math Toolbox for MATLAB
# ____ _ _ _ __ __ _ _ _____ _ _
# / ___| _ __ __ _| |_(_) __ _| | \/ | __ _| |_| |__ |_ _|__ ___ | | |__ _____ __
# \___ \| '_ \ / _` | __| |/ _` | | |\/| |/ _` | __| '_ \ | |/ _ \ / _ \| | '_ \ / _ \ \/ /
# ___) | |_) | (_| | |_| | (_| | | | | | (_| | |_| | | | | | (_) | (_) | | |_) | (_) > <
# |____/| .__/ \__,_|\__|_|\__,_|_|_| |_|\__,_|\__|_| |_| |_|\___/ \___/|_|_.__/ \___/_/\_\
sudo: required
services: docker
language: matlab
dist: xenial
install:
# install help2doc converter
- git clone https://github.com/petercorke/help2doc $HOME/bin
- export PATH="$(dirname "$HOME/bin"):$PATH"
# install MATLAB unit test runner
#- curl -sL https://storage.googleapis.com/matlabimagesus/public/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
# create the release file
- printf '\\def\\release{%s}\n' `cat ./RELEASE` > release.tex
- printf '\\def\\reldate{%s}\n' "`date '+%B %Y'`" >> release.tex
- mv all.tex release.tex doc/manual
# 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 spatialmath.tex"
# copy to src folder
- mv doc/manual/spatialmath.pdf spatialmath-`cat ./RELEASE`.pdf
## build a minimalist Contents.m file
- echo "% Spatial Math 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 to codecov
- bash <(curl -s https://codecov.io/bash)
deploy:
provider: releases
api_key: $GITRELEASE
file:
- spatialmath-`cat ./RELEASE`.pdf
- "Spatial Math Toolbox for MATLAB.mltbx"
skip_cleanup: true
overwrite: true