2017-04-25 23:12:08 -04:00
|
|
|
language: c
|
|
|
|
|
|
|
|
compiler: gcc
|
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
2018-09-20 10:28:35 -05:00
|
|
|
- SDK=0.9.5
|
2018-09-18 14:18:54 -05:00
|
|
|
- SANITYCHECK_OPTIONS=" --inline-logs --enable-coverage -N"
|
2017-09-12 22:00:39 -04:00
|
|
|
- SANITYCHECK_OPTIONS_RETRY="${SANITYCHECK_OPTIONS} --only-failed --outdir=out-2nd-pass"
|
2018-09-20 10:28:35 -05:00
|
|
|
- ZEPHYR_SDK_INSTALL_DIR=/opt/sdk/zephyr-sdk-0.9.5
|
2018-02-11 14:36:21 -06:00
|
|
|
- ZEPHYR_TOOLCHAIN_VARIANT=zephyr
|
2018-09-18 13:17:01 -05:00
|
|
|
- MATRIX_BUILDS="5"
|
|
|
|
- MATRIX_BUILDS_EXTRA="5"
|
2018-10-08 09:03:06 +02:00
|
|
|
- BSIM_OUT_PATH=/opt/bsim/
|
|
|
|
- BSIM_COMPONENTS_PATH=${BSIM_OUT_PATH}/components/
|
2018-11-13 12:05:05 +01:00
|
|
|
- BSIM_BT_TEST_RESULTS_FILE="./bsim_bt_out/bsim_results.xml"
|
2017-04-25 23:12:08 -04:00
|
|
|
matrix:
|
2017-05-18 07:49:47 -04:00
|
|
|
- MATRIX_BUILD="1"
|
|
|
|
- MATRIX_BUILD="2"
|
2017-07-19 12:45:02 +03:00
|
|
|
- MATRIX_BUILD="3"
|
2017-10-28 14:24:18 -04:00
|
|
|
- MATRIX_BUILD="4"
|
2018-04-04 09:58:28 -05:00
|
|
|
- MATRIX_BUILD="5"
|
2017-04-25 23:12:08 -04:00
|
|
|
|
|
|
|
build:
|
2018-09-18 13:53:08 -05:00
|
|
|
cache: false
|
2017-04-25 23:12:08 -04:00
|
|
|
cache_dir_list:
|
|
|
|
- ${SHIPPABLE_BUILD_DIR}/ccache
|
|
|
|
pre_ci_boot:
|
2017-05-19 16:17:16 -04:00
|
|
|
image_name: zephyrprojectrtos/ci
|
2018-11-22 08:04:53 -05:00
|
|
|
image_tag: v0.5-rc3
|
2017-04-25 23:12:08 -04:00
|
|
|
pull: true
|
|
|
|
options: "-e HOME=/home/buildslave --privileged=true --tty --net=bridge --user buildslave"
|
|
|
|
|
|
|
|
ci:
|
|
|
|
- export CCACHE_DIR=${SHIPPABLE_BUILD_DIR}/ccache/.ccache
|
2017-10-06 08:41:09 -04:00
|
|
|
- >
|
|
|
|
if [ "$IS_PULL_REQUEST" = "true" ]; then
|
2018-11-15 11:41:58 +01:00
|
|
|
./scripts/ci/run_ci.sh -b master -r origin -m ${MATRIX_BUILD} -M ${MATRIX_BUILDS} -B ${BSIM_BT_TEST_RESULTS_FILE} -p;
|
2018-11-10 09:53:13 -05:00
|
|
|
else
|
2018-11-15 11:41:58 +01:00
|
|
|
./scripts/ci/run_ci.sh -b master -r origin -m ${MATRIX_BUILD} -M ${MATRIX_BUILDS} -B ${BSIM_BT_TEST_RESULTS_FILE};
|
2018-11-10 09:53:13 -05:00
|
|
|
fi;
|
2017-04-25 23:12:08 -04:00
|
|
|
- ccache -s
|
2017-08-02 12:34:24 -04:00
|
|
|
on_failure:
|
2018-09-17 17:16:11 +02:00
|
|
|
- >
|
|
|
|
if [ -f "$HOME/.cache/zephyr/ToolchainCapabilityDatabase.cmake" ]; then
|
|
|
|
echo "Dumping the capability database in case we are affected by #9992"
|
|
|
|
cat $HOME/.cache/zephyr/ToolchainCapabilityDatabase.cmake
|
|
|
|
fi;
|
2018-05-14 15:31:29 +02:00
|
|
|
- rm -rf ccache $HOME/.cache/zephyr
|
2017-08-02 12:34:24 -04:00
|
|
|
- mkdir -p shippable/testresults
|
2017-11-24 14:40:20 -05:00
|
|
|
- mkdir -p shippable/codecoverage
|
|
|
|
- source zephyr-env.sh
|
2018-01-05 08:28:23 -05:00
|
|
|
- >
|
|
|
|
if [ "$MATRIX_BUILD" = "1" ]; then
|
|
|
|
gcovr -r ${ZEPHYR_BASE} -x > shippable/codecoverage/coverage.xml;
|
2018-11-13 12:05:05 +01:00
|
|
|
lcov --capture --directory sanity-out/native_posix/ --directory sanity-out/nrf52_bsim/ --directory sanity-out/unit_testing/ --directory bsim_bt_out/ --output-file lcov.pre.info -q --rc lcov_branch_coverage=1;
|
2018-07-02 07:57:12 -05:00
|
|
|
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;
|
2018-02-03 20:35:15 +01:00
|
|
|
rm lcov.pre.info;
|
2018-01-05 08:28:23 -05:00
|
|
|
rm -rf sanity-out out-2nd-pass;
|
2018-02-03 20:35:15 +01:00
|
|
|
bash <(curl -s https://codecov.io/bash) -f "lcov.info" -X coveragepy -X fixes;
|
2018-08-15 17:37:18 -05:00
|
|
|
rm -f lcov.info;
|
2018-01-05 08:28:23 -05:00
|
|
|
else
|
|
|
|
rm -rf sanity-out out-2nd-pass;
|
|
|
|
fi;
|
2017-08-02 12:34:24 -04:00
|
|
|
- >
|
|
|
|
if [ -e compliance.xml ]; then
|
|
|
|
cp compliance.xml shippable/testresults/;
|
|
|
|
fi;
|
|
|
|
- >
|
|
|
|
if [ -e ./scripts/sanity_chk/last_sanity.xml ]; then
|
|
|
|
cp ./scripts/sanity_chk/last_sanity.xml shippable/testresults/;
|
|
|
|
fi;
|
2018-11-13 12:05:05 +01:00
|
|
|
- >
|
|
|
|
if [ -e ${BSIM_BT_TEST_RESULTS_FILE} ]; then
|
|
|
|
cp ${BSIM_BT_TEST_RESULTS_FILE} shippable/testresults/;
|
|
|
|
fi;
|
2017-08-02 12:34:24 -04:00
|
|
|
on_success:
|
2018-05-14 15:31:29 +02:00
|
|
|
- rm -rf ccache $HOME/.cache/zephyr
|
2017-04-25 23:12:08 -04:00
|
|
|
- mkdir -p shippable/testresults
|
2017-11-24 14:40:20 -05:00
|
|
|
- mkdir -p shippable/codecoverage
|
|
|
|
- source zephyr-env.sh
|
2018-01-05 08:28:23 -05:00
|
|
|
- >
|
|
|
|
if [ "$MATRIX_BUILD" = "1" ]; then
|
|
|
|
gcovr -r ${ZEPHYR_BASE} -x > shippable/codecoverage/coverage.xml;
|
2018-11-13 12:05:05 +01:00
|
|
|
lcov --capture --directory sanity-out/native_posix/ --directory sanity-out/nrf52_bsim/ --directory sanity-out/unit_testing/ --directory bsim_bt_out/ --output-file lcov.pre.info -q --rc lcov_branch_coverage=1;
|
2018-07-02 07:57:12 -05:00
|
|
|
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;
|
2018-02-03 20:35:15 +01:00
|
|
|
rm lcov.pre.info;
|
2018-01-05 08:28:23 -05:00
|
|
|
rm -rf sanity-out out-2nd-pass;
|
2018-02-03 20:35:15 +01:00
|
|
|
bash <(curl -s https://codecov.io/bash) -f "lcov.info" -X coveragepy -X fixes;
|
2018-08-15 17:37:18 -05:00
|
|
|
rm -f lcov.info;
|
2018-01-05 08:28:23 -05:00
|
|
|
else
|
|
|
|
rm -rf sanity-out out-2nd-pass;
|
|
|
|
fi;
|
2017-04-25 23:12:08 -04:00
|
|
|
- >
|
|
|
|
if [ -e compliance.xml ]; then
|
|
|
|
cp compliance.xml shippable/testresults/;
|
2017-04-29 22:36:11 -04:00
|
|
|
fi;
|
|
|
|
- >
|
|
|
|
if [ -e ./scripts/sanity_chk/last_sanity.xml ]; then
|
|
|
|
cp ./scripts/sanity_chk/last_sanity.xml shippable/testresults/;
|
2017-04-25 23:12:08 -04:00
|
|
|
fi;
|
2018-11-13 12:05:05 +01:00
|
|
|
- >
|
|
|
|
if [ -e ${BSIM_BT_TEST_RESULTS_FILE} ]; then
|
|
|
|
cp ${BSIM_BT_TEST_RESULTS_FILE} shippable/testresults/;
|
|
|
|
fi;
|
2017-04-25 23:12:08 -04:00
|
|
|
|
|
|
|
integrations:
|
|
|
|
notifications:
|
2017-04-29 22:36:11 -04:00
|
|
|
- integrationName: slack_integration
|
|
|
|
type: slack
|
|
|
|
recipients:
|
|
|
|
- "#ci"
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
on_success: never
|
|
|
|
on_failure: always
|
2017-04-25 23:12:08 -04:00
|
|
|
- integrationName: email
|
|
|
|
type: email
|
|
|
|
recipients:
|
|
|
|
- builds@zephyrproject.org
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
- net
|
|
|
|
- bluetooth
|
|
|
|
- arm
|
|
|
|
on_success: never
|
|
|
|
on_failure: never
|