Skip to content

Commit

Permalink
shippable: Add support for nrf52_bsim board
Browse files Browse the repository at this point in the history
Use the docker image which has BabbleSim precompiled

Fetch the NRF52 hardware models required by the nrf52_bsim board
and compile them.

Collect the coverage report from the nrf52_bsim board

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
  • Loading branch information
aescolar authored and nashif committed Oct 15, 2018
1 parent 3777b44 commit 96b38ad
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .shippable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ env:
- ZEPHYR_TOOLCHAIN_VARIANT=zephyr
- MATRIX_BUILDS="5"
- MATRIX_BUILDS_EXTRA="5"
- BSIM_OUT_PATH=/opt/bsim/
- BSIM_COMPONENTS_PATH=${BSIM_OUT_PATH}/components/
matrix:
- MATRIX_BUILD="1"
- MATRIX_BUILD="2"
Expand All @@ -24,7 +26,7 @@ build:
- ${SHIPPABLE_BUILD_DIR}/ccache
pre_ci_boot:
image_name: zephyrprojectrtos/ci
image_tag: v0.4-rc7
image_tag: v0.4-rc9
pull: true
options: "-e HOME=/home/buildslave --privileged=true --tty --net=bridge --user buildslave"

Expand All @@ -34,6 +36,14 @@ build:
if [ "$IS_PULL_REQUEST" = "true" ]; then
git rebase origin/${PULL_REQUEST_BASE_BRANCH};
fi
- export NRF_HW_MODELS_VERSION=`cat boards/posix/nrf52_bsim/hw_models_version`
- >
pushd . ;
cd ${BSIM_COMPONENTS_PATH} ;
git clone -b ${NRF_HW_MODELS_VERSION} https://github.com/BabbleSim/ext_NRF52_hw_models.git;
cd /opt/bsim/ ;
make everything -j 8;
popd ;
- source zephyr-env.sh
- ccache -c -s --max-size=5000M
- >
Expand Down Expand Up @@ -84,7 +94,7 @@ build:
- >
if [ "$MATRIX_BUILD" = "1" ]; then
gcovr -r ${ZEPHYR_BASE} -x > shippable/codecoverage/coverage.xml;
lcov --capture --directory sanity-out/native_posix/ --directory sanity-out/unit_testing/ --output-file lcov.pre.info -q --rc lcov_branch_coverage=1;
lcov --capture --directory sanity-out/native_posix/ --directory sanity-out/nrf52_bsim/ --directory sanity-out/unit_testing/ --output-file lcov.pre.info -q --rc lcov_branch_coverage=1;
lcov -q --remove lcov.pre.info mylib.c --remove lcov.pre.info tests/\* --remove lcov.pre.info samples/\* --remove lcov.pre.info ext/\* --remove lcov.pre.info *generated* -o lcov.info --rc lcov_branch_coverage=1;
rm lcov.pre.info;
rm -rf sanity-out out-2nd-pass;
Expand All @@ -109,7 +119,7 @@ build:
- >
if [ "$MATRIX_BUILD" = "1" ]; then
gcovr -r ${ZEPHYR_BASE} -x > shippable/codecoverage/coverage.xml;
lcov --capture --directory sanity-out/native_posix/ --directory sanity-out/unit_testing/ --output-file lcov.pre.info -q --rc lcov_branch_coverage=1;
lcov --capture --directory sanity-out/native_posix/ --directory sanity-out/nrf52_bsim/ --directory sanity-out/unit_testing/ --output-file lcov.pre.info -q --rc lcov_branch_coverage=1;
lcov -q --remove lcov.pre.info mylib.c --remove lcov.pre.info tests/\* --remove lcov.pre.info samples/\* --remove lcov.pre.info ext/\* --remove lcov.pre.info *generated* -o lcov.info --rc lcov_branch_coverage=1;
rm lcov.pre.info;
rm -rf sanity-out out-2nd-pass;
Expand Down

0 comments on commit 96b38ad

Please sign in to comment.