From 7a5a7b1eb5eea7c1d2db961fef2e67a19366f589 Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Mon, 8 Feb 2021 15:29:03 +0100 Subject: [PATCH] CI: add examples test --- .github/workflows/test_unit_tests.yml | 7 +++++-- Tools/scripts/build_ci.sh | 10 ++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_unit_tests.yml b/.github/workflows/test_unit_tests.yml index bb37285be1..74b19f607c 100644 --- a/.github/workflows/test_unit_tests.yml +++ b/.github/workflows/test_unit_tests.yml @@ -8,7 +8,9 @@ on: [push, pull_request, workflow_dispatch] jobs: build: runs-on: ubuntu-20.04 - container: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:latest + container: + image: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:latest + options: --user 1001 strategy: fail-fast: false # don't cancel if a job from the matrix fails matrix: @@ -18,7 +20,8 @@ jobs: ] config: [ unit-tests, - python-cleanliness + python-cleanliness, + examples, ] steps: # git checkout the PR diff --git a/Tools/scripts/build_ci.sh b/Tools/scripts/build_ci.sh index 71f80d028a..e7f2f6a471 100755 --- a/Tools/scripts/build_ci.sh +++ b/Tools/scripts/build_ci.sh @@ -71,6 +71,9 @@ function run_autotest() { if [ "x$CI_BUILD_DEBUG" != "x" ]; then w="$w --debug" 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" ccache -s && ccache -z } @@ -159,6 +162,13 @@ for t in $CI_BUILD_TARGET; do continue 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 echo "Building revo bootloader" $waf configure --board revo-mini --bootloader