forked from MarlinFirmware/Marlin
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
65 lines (64 loc) · 3.29 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
---
language: c
before_install:
# Travis runs a detached head. We need to find the current branch
- git checkout `git branch --contains HEAD | grep -v '*'`
# Also tags for the root(s) of the minor version(s)
- git fetch origin --tags
- mkdir ~/bin
install:
# Install arduino 1.6.4
- wget http://downloads-02.arduino.cc/arduino-1.6.4-linux64.tar.xz
- tar Jxf arduino-1.6.4-linux64.tar.xz
- sudo mv arduino-1.6.4 /usr/local/share/arduino
- ln -s /usr/local/share/arduino/arduino ~/bin/arduino
# Our custom build commands
- mv LinuxAddons/bin/* ~/bin/
- ls -la ~/bin
# install our platform
- cp -r ArduinoAddons/Arduino_1.6.x/hardware/* /usr/local/share/arduino/hardware
# copy libraries to arduino dir, as conditional includes do not work in .ino files
- cp -r /usr/local/share/arduino/hardware/marlin/avr/libraries/* /usr/local/share/arduino/libraries/
- cp -r ArduinoAddons/Arduino_1.6.x/libraries/* /usr/local/share/arduino/libraries/
# add LiquidCrystal_I2C & LiquidTWI2 libraries
- git clone https://github.com/kiyoshigawa/LiquidCrystal_I2C.git
- mv LiquidCrystal_I2C/LiquidCrystal_I2C /usr/local/share/arduino/libraries/LiquidCrystal_I2C
- git clone https://github.com/lincomatic/LiquidTWI2.git
- mv LiquidTWI2 /usr/local/share/arduino/libraries/LiquidTWI2
# Install astyle
# wget https://github.com/timonwong/astyle-mirror/archive/master.zip
# unzip master.zip
# cd astyle-mirror-master/build/gcc/
# make prefix=$HOME astyle install
before_script:
# arduino requires an X server even with command line
# https://github.com/arduino/Arduino/issues/1981
- Xvfb :1 -screen 0 1024x768x16 &> xvfb.log &
# change back to home directory for compiling
- cd $TRAVIS_BUILD_DIR
- mkdir build
# Check style
# ~/bin/astyle --recursive --options=.astylerc "Marlin/*.h" "Marlin/*.cpp"
#run the prebuild script
- ./.travis_prebuild.sh
#cat the configuraion to the log
- cat Marlin/Configuration.h
script:
# Abort on style errors
# if [ "0" != `find . -name "*.orig" | wc -l` ] ; then echo "Improperly styled source -- run astyle" ; exit -999; fi
# Relaxed Travis check
# if [ "0" != `find . -name "*.orig" | wc -l` ] ; then echo "Improperly styled source -- run astyle" ; fi
# build default config - Lulzbot Mini
- DISPLAY=:1.0 ~/bin/arduino --pref build.path=$TRAVIS_BUILD_DIR/build --verify --board marlin:avr:mega:cpu=atmega2560 Marlin/Marlin.ino
- cp build/Marlin.cpp.hex "build/Marlin.Mini-$TRAVIS_TAG.hex"
after_success:
- ./.travis_deploy.sh
- ls build
deploy:
skip_cleanup: true
provider: releases
api_key:
secure: a2p3sDtzYNuM6JRh74nGiCtd6l8ptBnD6SbM2MS1C5DLBy9gpIwczEbkz3QUOZ1nYIYOIeK6Hkjc2+dwsZp5K391BPaGjrtnWCElqz1SsMavkaMqjc8fP4rni1F2ZNbN+IHVkNU2o5rU2roiG/ZzTA29VL6Gi5bupdVeeqG+BmBFvYTj/n+EwcYgGHiqU383cHBY7BM3//iAaA7+h2uSWz6OmlOeSHLpLVqBT0vrIvXw7ObSTY9lcEc6ngT1MlA+1wTF/EV1e+GMPuJhy6SXJuQOxo5XU6YF+kz3YvArKwsRU/OxePccbE+CbJ5hv58u8ZwgN1TPDNi5gYy9ygwUgJwEqk/jimkpoqH+2LoSx1Yg2GO69SpYbv7xnJ2n1W3wBhuUhE5gmQypZEM30kcfYJFhTX1KbvyJmP8/QoAbcH0MwSgUMt94DDR1Zf9K8zEj02IeN75lnxgYMwLok8AsidUfxmMLIUoghaDFBlaL3ECRVgrAAaRWFjJzlNAeAkUQKa5LEhOserPWxusWynTkJCDGE5/fr9IKTaE2JWwRr7Mzdf2Bedv+776R14MwjOVuWpG7dPZPsVMtHiaeCzjJx3KZrwshdODzmHops6IO+EURxeTcazH2hibTXOU5vqKxAefyW0u6HDcgwjUS4OZ6LJaq7gygDrt1163DgMGg2Wg=
file: 'build/Marlin.Mini-$TRAVIS_TAG.hex'
on:
tags: true