BUILD: Add Travis CI

This commit is contained in:
Matt Lawrence 2019-01-10 14:08:55 -05:00 committed by Matt
parent aff908ad1f
commit e284da62b6
2 changed files with 73 additions and 0 deletions

21
.travis.yml Normal file
View File

@ -0,0 +1,21 @@
dist: trusty
sudo: false
git:
submodules: false
cache:
directories:
- $HOME/opt
- $/solo-build/sources
before_install:
- sudo ln -sf /$TRAVIS_BUILD_DIR /vagrant
install:
- time /$TRAVIS_BUILD_DIR/install-vagrant-deps.sh 1>/dev/null
script:
- cd /$TRAVIS_BUILD_DIR/solo-builder && ./source_sync.sh
- cd /$TRAVIS_BUILD_DIR/artoo && tup

52
solo-builder/builder-ci.sh Executable file
View File

@ -0,0 +1,52 @@
#!/bin/bash
## Run source_sync.sh script to pull in build sources
/vagrant/solo-builder/source_sync.sh
if [ ! $? -eq 0 ]; then
exit 1
fi
## Switch to build directory
cd /solo-build
## Export machine twice since it's a clean build
export MACHINE=imx6solo-3dr-1080p
EULA=1 source ./setup-environment build
export_return=$?
if [ $export_return -eq 0 ]; then
echo "Build environment ready"
elif [ $export_return -eq 2 ]; then
# Automatic restart as required
echo "Restarting setup environment"
export MACHINE=imx6solo-3dr-1080p
EULA=1 source ./setup-environment build
if [ ! $? -eq 0 ]; then
echo "Machine export error."
exit 1
fi
else
echo "Machine export error."
exit 1
fi
## Build Solo specific recipes. Dump most of the running output so the travis log doesn't explode
MACHINE=imx6solo-3dr-1080p bitbake sololink shotmanager sololink-python pymavlink mavproxy cubeBlack-solo gimbal-firmware 2>&1 | grep -v 'pid'
if [ ! $? -eq 0 ]; then
exit 1
fi
MACHINE=imx6solo-3dr-artoo bitbake sololink sololink-python pymavlink mavproxy artoo-firmware stm32loader 2>&1 | grep -v 'pid'
if [ ! $? -eq 0 ]
then
exit 1
fi
## Build Artoo STM32 FW
cd /vagrant/artoo
tup
if [ ! $? -eq 0 ]; then
exit 1
fi