forked from Erriez/ErriezDHT22
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
75 lines (64 loc) · 2.11 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
################################################################################
# Title : .travis.yml
# Date created : 2 August 2018
# Author : Erriez"
#
# This is a Continuous Integration script for Travis CI:
# - Build Arduino examples with PlatformIO by using the library sources.
# - Build Doxygen HTML and PDF and push this automatically to gh-pages. The
# documentation is published at: https://<USER>.github.io/<REPOSITORY_NAME
#
#############################################################################
# This will run on Travis' 'new' container-based infrastructure
sudo: false
# Use Python 2.7 for PlatformIO
language: python
python:
- "2.7"
# Cache platformIO directory
cache:
directories:
- "~/.platformio"
# Blacklist
branches:
except:
- gh-paghes
# Environment variables
env:
global:
- GH_REPO_NAME: ErriezDHT22
- DOXYFILE: $TRAVIS_BUILD_DIR/Doxyfile
- GH_REPO_REF: github.com/Erriez/ErriezDHT22.git
# Install dependencies
addons:
apt:
packages:
- doxygen-latex
before_install:
# Install doxygen 1.8.11 from binary, because older versions throw errors on markdown code with
# images inside links (like the build status in the README) and it's the only way to get a newer
# doxygen in Ubuntu
- export DOXYGEN_VER=doxygen-1.8.11
- export DOXYGEN_TAR=${DOXYGEN_VER}.linux.bin.tar.gz
- export DOXYGEN_URL="http://ftp.stack.nl/pub/users/dimitri/${DOXYGEN_TAR}"
# Install Python PlatformIO
install:
- pip install -U platformio
- platformio update
# Run PlatformIO CI build
script:
# Build Arduino examples with PlatformIO by using the library sources
- chmod +x .auto-build.sh
- ./.auto-build.sh
# Build and deploy Doxygen documentation only on push master branch
after_success:
- |
if [ "${TRAVIS_BRANCH}" == "master" ] ; then
# Extract Doxygen binaries and set path
wget -O - "${DOXYGEN_URL}" | tar xz -C ${TMPDIR-/tmp} ${DOXYGEN_VER}/bin/doxygen
export PATH="${TMPDIR-/tmp}/${DOXYGEN_VER}/bin:$PATH"
# Build Doxygen HTML and PDF
cd $TRAVIS_BUILD_DIR
chmod +x .deploy-doc.sh
./.deploy-doc.sh
fi