Have the build script upload artifacts to Rosie when travis is building a pull request. (#191)
This commit is contained in:
parent
fab634e3ee
commit
e00b3190ed
|
@ -2,8 +2,11 @@
|
||||||
# builds them) and where to find the tests.
|
# builds them) and where to find the tests.
|
||||||
|
|
||||||
binaries:
|
binaries:
|
||||||
prebuilt_s3: adafruit-circuit-python
|
prebuilt_s3:
|
||||||
|
bucket: adafruit-circuit-python
|
||||||
file_pattern: bin/{board}/adafruit-circuitpython-{board}-*-{short_sha}.{extension}
|
file_pattern: bin/{board}/adafruit-circuitpython-{board}-*-{short_sha}.{extension}
|
||||||
|
rosie_upload:
|
||||||
|
file_pattern: adafruit-circuitpython-{board}-{short_sha}.{extension}
|
||||||
|
|
||||||
circuitpython_tests:
|
circuitpython_tests:
|
||||||
test_directories:
|
test_directories:
|
||||||
|
|
|
@ -2,6 +2,7 @@ rm -rf atmel-samd/build*
|
||||||
rm -rf esp8266/build*
|
rm -rf esp8266/build*
|
||||||
|
|
||||||
ATMEL_BOARDS="arduino_zero circuitplayground_express feather_m0_basic feather_m0_adalogger feather_m0_express metro_m0_express trinket_m0 gemma_m0"
|
ATMEL_BOARDS="arduino_zero circuitplayground_express feather_m0_basic feather_m0_adalogger feather_m0_express metro_m0_express trinket_m0 gemma_m0"
|
||||||
|
ROSIE_SETUPS="rosie-ci"
|
||||||
|
|
||||||
for board in $ATMEL_BOARDS; do
|
for board in $ATMEL_BOARDS; do
|
||||||
make -C atmel-samd BOARD=$board
|
make -C atmel-samd BOARD=$board
|
||||||
|
@ -17,12 +18,23 @@ if [ $? -ne 0 ]; then
|
||||||
version=`date +%Y%m%d`-`git rev-parse --short HEAD`
|
version=`date +%Y%m%d`-`git rev-parse --short HEAD`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||||
|
version=`echo $TRAVIS_PULL_REQUEST_SHA | cut -c1-7`
|
||||||
|
fi
|
||||||
|
|
||||||
for board in $ATMEL_BOARDS; do
|
for board in $ATMEL_BOARDS; do
|
||||||
mkdir -p bin/$board/
|
mkdir -p bin/$board/
|
||||||
cp atmel-samd/build-$board/firmware.bin bin/$board/adafruit-circuitpython-$board-$version.bin
|
cp atmel-samd/build-$board/firmware.bin bin/$board/adafruit-circuitpython-$board-$version.bin
|
||||||
(( exit_status = exit_status || $? ))
|
(( exit_status = exit_status || $? ))
|
||||||
cp atmel-samd/build-$board/firmware.uf2 bin/$board/adafruit-circuitpython-$board-$version.uf2
|
cp atmel-samd/build-$board/firmware.uf2 bin/$board/adafruit-circuitpython-$board-$version.uf2
|
||||||
(( exit_status = exit_status || $? ))
|
(( exit_status = exit_status || $? ))
|
||||||
|
# Only upload to Rosie if its a pull request.
|
||||||
|
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||||
|
for rosie in $ROSIE_SETUPS; do
|
||||||
|
echo "Uploading to https://$rosie.ngrok.io/upload/$TRAVIS_PULL_REQUEST_SHA"
|
||||||
|
curl -F "file=@bin/$board/adafruit-circuitpython-$board-$version.uf2" https://$rosie.ngrok.io/upload/$TRAVIS_PULL_REQUEST_SHA
|
||||||
|
done
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Skip ESP8266 on Travis
|
# Skip ESP8266 on Travis
|
||||||
|
|
Loading…
Reference in New Issue