forked from probonopd/marlin-for-ender-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
110 lines (104 loc) · 6.19 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
98
99
100
101
102
103
104
105
106
107
108
109
110
dist: trusty
sudo: true
language: c
before_install:
- mkdir -p $HOME/out/
- cd ..
- git clone https://github.com/MarlinFirmware/Marlin
- cd Marlin
- export TRAVIS_BUILD_DIR=$(readlink -f .)
- git checkout bugfix-1.1.x
- export UPLOADTOOL_SUFFIX=bugfix-1.1.x
- chmod +x ${TRAVIS_BUILD_DIR}/buildroot/bin/*
- export PATH=${TRAVIS_BUILD_DIR}/buildroot/bin/:${PATH}
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16"
- sleep 3
- export DISPLAY=:1.0
install:
# Install arduino 1.8.5
- wget -nv http://downloads.arduino.cc/arduino-1.8.5-linux64.tar.xz
- tar xf arduino-1.8.5-linux64.tar.xz
- sudo mv arduino-1.8.5 /usr/local/share/arduino
- ln -s /usr/local/share/arduino/arduino ${TRAVIS_BUILD_DIR}/buildroot/bin/arduino
# Install Sanguino board
- arduino --pref "boardsmanager.additional.urls=https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json" --save-prefs
- arduino --install-boards Sanguino:avr
- arduino --board Sanguino:avr:sanguino:cpu=atmega1284p --save-prefs
# Install libraries
- cd /usr/local/share/arduino/libraries/
- git clone https://github.com/kiyoshigawa/LiquidCrystal_I2C.git
- git clone https://github.com/lincomatic/LiquidTWI2.git
- git clone https://github.com/olikraus/U8glib_Arduino.git
- git clone https://github.com/teemuatlut/TMC2130Stepper.git
- git clone https://github.com/teemuatlut/TMC2208Stepper.git
- git clone https://github.com/adafruit/Adafruit_NeoPixel.git
- cd -
# Optimize for size, https://thborges.github.io/blog/marlin/2019/01/07/reducing-marlin-binary-size.html
- sed -i -e 's|compiler.c.extra_flags=|compiler.c.extra_flags=-fno-tree-scev-cprop -fno-split-wide-types -Wl,--relax -mcall-prologues|g' /usr/local/share/arduino/hardware/arduino/avr/platform.txt
- sed -i -e 's|compiler.c.elf.extra_flags=|compiler.c.elf.extra_flags=-Wl,--relax|g' /usr/local/share/arduino/hardware/arduino/avr/platform.txt
- sed -i -e 's|compiler.cpp.extra_flags=|compiler.cpp.extra_flags=-fno-tree-scev-cprop -fno-split-wide-types -Wl,--relax -mcall-prologues|g' /usr/local/share/arduino/hardware/arduino/avr/platform.txt
- find /usr/local/share/arduino -name 'platform.txt' -exec cat {} \;
before_script:
# Change current working directory to the build dir
- cd ${TRAVIS_BUILD_DIR}
# Generate custom version include
- generate_version_header_for_marlin ${TRAVIS_BUILD_DIR}/Marlin
- cat ${TRAVIS_BUILD_DIR}/Marlin/_Version.h
script:
- use_example_configs Creality/Ender-2
- opt_disable EEPROM_CHITCHAT # Save PROGMEM space
- opt_enable SLIM_LCD_MENUS # Save PROGMEM space
- opt_enable DISABLE_M503 # Save PROGMEM space
- opt_enable_adv LIN_ADVANCE # Linear advance
- opt_set_adv LIN_ADVANCE_K 1.0 # Preconfigure K to 1.0; this needs to be changed in GCODE for different materials and temperatures
- opt_enable NOZZLE_PARK_FEATURE # Needed for ADVANCED_PAUSE_FEATURE # Filament load/unload in the menu
# https://www.thingiverse.com/thing:3057052 # Filament load/unload in the menu
- opt_enable_adv PARK_HEAD_ON_PAUSE # Filament load/unload in the menu
- opt_enable_adv ADVANCED_PAUSE_FEATURE # Filament load/unload in the menu
- opt_enable_adv PAUSE_PARK_NO_STEPPER_TIMEOUT # Filament load/unload in the menu
- opt_set_adv PAUSE_PARK_RETRACT_FEEDRATE 200 # Filament load/unload in the menu
- opt_set_adv PAUSE_PARK_RETRACT_LENGTH 5 # Filament load/unload in the menu
- opt_set_adv FILAMENT_CHANGE_UNLOAD_FEEDRATE 150 # Filament load/unload in the menu
- opt_set EXTRUDE_MAXLENGTH 300 # Needed for the next line
- opt_set_adv FILAMENT_CHANGE_UNLOAD_LENGTH 300 # Filament load/unload in the menu
- opt_set_adv FILAMENT_CHANGE_LOAD_FEEDRATE 100 # Filament load/unload in the menu
- opt_set_adv FILAMENT_CHANGE_LOAD_LENGTH 320 # Filament load/unload in the menu
- opt_set_adv ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 # Filament load/unload in the menu
- opt_set_adv ADVANCED_PAUSE_EXTRUDE_LENGTH 50 # Filament load/unload in the menu
- opt_set_adv PAUSE_PARK_NOZZLE_TIMEOUT 180 # Filament load/unload in the menu
- opt_set_adv FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 # Filament load/unload in the menu
#
- opt_enable LCD_BED_LEVELING # In the LCD menu # May need to be disabled due to space
- opt_enable AUTO_BED_LEVELING_3POINT # In the LCD menu # May need to be disabled due to space
# Set the probe points exactly over the adjustment screws
- opt_enable PROBE_MANUALLY
- opt_set PROBE_PT_1_X 20
- opt_set PROBE_PT_1_Y 60
- opt_set PROBE_PT_2_X 115
- opt_set PROBE_PT_2_Y 30
- opt_set PROBE_PT_3_X 95
- opt_set PROBE_PT_3_Y 130
# opt_enable MESH_BED_LEVELING # Needed by the above # Disabled due to space
# opt_enable LEVEL_BED_CORNERS # Add a menu item to move between bed corners for manual bed adjustment # Disabled due to space
- opt_enable S_CURVE_ACCELERATION # Reduce frame jerks and vibrations
- opt_set_adv FAN_MAX_PWM 64 # 25% fan speed for Petsfang to fix layer bonding
# opt_disable SHOW_BOOTSCREEN # Hopefully save some space
- opt_disable SHOW_CUSTOM_BOOTSCREEN # Make it stock
- opt_disable CUSTOM_STATUS_SCREEN_IMAGE # Make it stock
- opt_disable_adv ARC_SUPPORT # save ~3226 bytes
- opt_enable EEPROM_SETTINGS # Make it possible to save e.g., e-steps # May need to be disabled due to space # # # # #
- opt_set DEFAULT_AXIS_STEPS_PER_UNIT "{ 80, 80, 400, 102 }" # 102 e-steps
- opt_set DEFAULT_MAX_ACCELERATION "{ 3000, 3000, 100, 10000 }" # Make it faster
- cp Marlin/Conf*.h $HOME/out/
# build_marlin # https://github.com/MarlinFirmware/Marlin/issues/14529
- arduino --verify --board Sanguino:avr:sanguino:cpu=atmega1284p --pref build.path=build Marlin/Marlin.ino
- VERSION=$(grep -r "* Version:" ${TRAVIS_BUILD_DIR}/Marlin/_Version.h | cut -d ":" -f 2 | sed -e 's| ||g')
- mv build/Marlin.ino.hex $HOME/out/Marlin-$VERSION.ino.hex
- mv build/Marlin.ino.with_bootloader.hex $HOME/out//Marlin-$VERSION.ino.with_bootloader.hex
after_success:
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
- bash upload.sh $HOME/out/*
branches:
except:
- # Do not build tags that we create when we upload to GitHub Releases
- /^(?i:continuous.*)$/