Run tests and build all variants on Travis-ci.

This commit is contained in:
Marek Bel 2018-11-27 17:51:05 +01:00
parent 47356752d4
commit c571355db5
2 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,18 @@
dist: trusty dist: trusty
before_install:
- sudo apt-get install -y ninja-build
script: script:
- bash -x test.sh
- bash -x build.sh - bash -x build.sh
- rm Firmware/Configuration_prusa.h
- cp Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h Firmware/Configuration_prusa.h
- bash -x build.sh
- rm Firmware/Configuration_prusa.h
- cp Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h Firmware/Configuration_prusa.h
- bash -x build.sh
- rm Firmware/Configuration_prusa.h
- cp Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h Firmware/Configuration_prusa.h
- bash -x build.sh
- rm Firmware/Configuration_prusa.h
- cp Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h Firmware/Configuration_prusa.h
- bash -x build.sh

12
test.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
cd .. || exit 5
if [ ! -d "Prusa-Firmware-test" ]; then
mkdir Prusa-Firmware-test || exit 10
fi
cd Prusa-Firmware-test || exit 20
cmake -G "Eclipse CDT4 - Ninja" ../Prusa-Firmware || exit 30
cmake --build . || exit 35
./tests || exit 40