CI: add examples test

This commit is contained in:
Pierre Kancir 2021-02-08 15:29:03 +01:00 committed by Andrew Tridgell
parent c8a7ab1a75
commit 7a5a7b1eb5
2 changed files with 15 additions and 2 deletions

View File

@ -8,7 +8,9 @@ on: [push, pull_request, workflow_dispatch]
jobs: jobs:
build: build:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:latest container:
image: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:latest
options: --user 1001
strategy: strategy:
fail-fast: false # don't cancel if a job from the matrix fails fail-fast: false # don't cancel if a job from the matrix fails
matrix: matrix:
@ -18,7 +20,8 @@ jobs:
] ]
config: [ config: [
unit-tests, unit-tests,
python-cleanliness python-cleanliness,
examples,
] ]
steps: steps:
# git checkout the PR # git checkout the PR

View File

@ -71,6 +71,9 @@ function run_autotest() {
if [ "x$CI_BUILD_DEBUG" != "x" ]; then if [ "x$CI_BUILD_DEBUG" != "x" ]; then
w="$w --debug" w="$w --debug"
fi fi
if [ $NAME == "Examples" ]; then
w="$w --speedup=5 --timeout=14400 --debug --no-clean"
fi
Tools/autotest/autotest.py --show-test-timings --waf-configure-args="$w" "$BVEHICLE" "$RVEHICLE" Tools/autotest/autotest.py --show-test-timings --waf-configure-args="$w" "$BVEHICLE" "$RVEHICLE"
ccache -s && ccache -z ccache -s && ccache -z
} }
@ -159,6 +162,13 @@ for t in $CI_BUILD_TARGET; do
continue continue
fi fi
if [ "$t" == "examples" ]; then
./waf configure --board=linux --debug
./waf examples
run_autotest "Examples" "--no-clean" "run.examples"
continue
fi
if [ "$t" == "revo-bootloader" ]; then if [ "$t" == "revo-bootloader" ]; then
echo "Building revo bootloader" echo "Building revo bootloader"
$waf configure --board revo-mini --bootloader $waf configure --board revo-mini --bootloader