Skip to content

Commit

Permalink
simulate_travis_ci_build.sh: Temporary commit to test changes without…
Browse files Browse the repository at this point in the history
… Travis CI automatic build

Travis CI builds fail due to the amount of changes, so
create a simple script that naively simulates what Travis
is doing, for obvious reasons its slower since it builds
sequentially.

Usage examples:
$ BOARDS="wedge" ./simulate_travis_ci_build.sh
$ DISTRO_DEFAULT="rocko" BOARDS="wedge yosemite" ./simulate_travis_ci_build.sh
$ ./simulate_travis_ci_build.sh

Signed-off-by: Alejandro Enedino Hernandez Samaniego <[email protected]>
  • Loading branch information
ahcbb6 committed Aug 8, 2019
1 parent 6b28ccc commit 32cbec5
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions simulate_travis_ci_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash

# Script to naively emmulate what Travis CI does
# for testing warrior release changes on OpenBMC

# Reset necessary variables
unset TEMPLATECONF
unset override
unset override_plat
unset override_distro
unset platform
unset DISTRO_OVERRIDES

# Remove previous builds just to make sure we can build from scratch
# Comment the following line if building from scratch is not desired
rm -rf build*

# Get a top directory to share downloads amongst builds
TPDIR=$PWD
if [ ! -d $TPDIR/downloads ]; then
mkdir $TPDIR/downloads
fi

# DISTRO_DEFAULT gets reset when sourcing openbmc-init-build-env
# so we need to keep the initial chosen one
DEF_RELEASE=$DISTRO_DEFAULT

# Boards that get tested on Travis CI by default, more could be easily added
if [ -z "$BOARDS" ]; then
BOARDS="wedge wedge100 yosemite lightning cmm galaxy100 fbtp fbttn fby2"
fi

echo "Starting OpenBMC build for the following BOARDS: $BOARDS"
echo ""

for i in $BOARDS;
do
export BOARD="$i"
echo "Building OpenBMC for $BOARD on $DISTRO_DEFAULT release"
echo ""

DISTRO_DEFAULT=$DEF_RELEASE source ./openbmc-init-build-env meta-facebook/meta-${BOARD} build-${BOARD}

# Share downloads if this is a new build directory
if [ ! -h $PWD/downloads ]; then
ln -s $TPDIR/downloads .
fi

bitbake ${BOARD}-image -k
cd ..
unset TEMPLATECONF
unset override override_plat override_distro
unset platform
unset DISTRO_OVERRIDES
done

0 comments on commit 32cbec5

Please sign in to comment.