2017-04-26 11:12:08 +08:00
|
|
|
language: c
|
|
|
|
|
|
|
|
compiler: gcc
|
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
2017-10-29 02:40:53 +08:00
|
|
|
- SDK=0.9.2
|
2017-05-05 06:15:11 +08:00
|
|
|
- SANITYCHECK_OPTIONS=" --inline-logs -R"
|
2017-09-13 10:00:39 +08:00
|
|
|
- SANITYCHECK_OPTIONS_RETRY="${SANITYCHECK_OPTIONS} --only-failed --outdir=out-2nd-pass"
|
2017-10-29 02:40:53 +08:00
|
|
|
- ZEPHYR_SDK_INSTALL_DIR=/opt/sdk/zephyr-sdk-0.9.2
|
2017-04-26 11:12:08 +08:00
|
|
|
- ZEPHYR_GCC_VARIANT=zephyr
|
2017-11-09 09:02:34 +08:00
|
|
|
- MATRIX_BUILDS="4"
|
|
|
|
- MATRIX_BUILDS_EXTRA="4"
|
2017-04-26 11:12:08 +08:00
|
|
|
matrix:
|
2017-05-18 19:49:47 +08:00
|
|
|
- MATRIX_BUILD="1"
|
|
|
|
- MATRIX_BUILD="2"
|
2017-07-19 17:45:02 +08:00
|
|
|
- MATRIX_BUILD="3"
|
2017-10-29 02:24:18 +08:00
|
|
|
- MATRIX_BUILD="4"
|
2017-04-26 11:12:08 +08:00
|
|
|
|
|
|
|
build:
|
|
|
|
cache: true
|
|
|
|
cache_dir_list:
|
|
|
|
- ${SHIPPABLE_BUILD_DIR}/ccache
|
|
|
|
pre_ci_boot:
|
2017-05-20 04:17:16 +08:00
|
|
|
image_name: zephyrprojectrtos/ci
|
2017-10-29 02:40:53 +08:00
|
|
|
image_tag: v0.2
|
2017-04-26 11:12:08 +08: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 20:41:09 +08:00
|
|
|
- >
|
|
|
|
if [ "$IS_PULL_REQUEST" = "true" ]; then
|
|
|
|
git rebase origin/${PULL_REQUEST_BASE_BRANCH};
|
|
|
|
fi
|
2017-04-26 11:12:08 +08:00
|
|
|
- source zephyr-env.sh
|
2017-05-18 19:49:47 +08:00
|
|
|
- ccache -c -s --max-size=2000M
|
2017-04-30 10:36:11 +08:00
|
|
|
- >
|
2017-11-09 09:02:34 +08:00
|
|
|
if [ "$MATRIX_BUILD" = "4" -a "$IS_PULL_REQUEST" = "true" ]; then
|
2017-07-19 15:37:39 +08:00
|
|
|
export COMMIT_RANGE=origin/${PULL_REQUEST_BASE_BRANCH}..HEAD
|
2017-04-29 08:30:13 +08:00
|
|
|
echo "Building a Pull Request";
|
2017-04-30 10:36:11 +08:00
|
|
|
echo "- Building Documentation";
|
2017-05-04 23:04:34 +08:00
|
|
|
echo "Commit range:" ${COMMIT_RANGE}
|
2017-11-10 21:27:08 +08:00
|
|
|
make htmldocs
|
|
|
|
if [ -s doc/doc.warnings ]; then
|
2017-04-30 10:36:11 +08:00
|
|
|
echo " => New documentation warnings/errors";
|
2017-11-15 20:34:11 +08:00
|
|
|
cp doc/doc.warnings doc.warnings
|
2017-04-30 10:36:11 +08:00
|
|
|
fi;
|
2017-09-22 02:55:15 +08:00
|
|
|
echo "- Verify commit message, coding style, doc build";
|
2017-05-10 04:57:00 +08:00
|
|
|
./scripts/ci/check-compliance.py --commits ${COMMIT_RANGE} || true;
|
2017-04-26 11:12:08 +08:00
|
|
|
fi;
|
2017-07-27 20:45:01 +08:00
|
|
|
- >
|
2017-10-06 20:41:09 +08:00
|
|
|
if [ "$IS_PULL_REQUEST" = "true" ]; then
|
|
|
|
./scripts/ci/get_modified_tests.py --commits origin/${PULL_REQUEST_BASE_BRANCH}..HEAD > modified_tests.args;
|
|
|
|
./scripts/ci/get_modified_boards.py --commits origin/${PULL_REQUEST_BASE_BRANCH}..HEAD > modified_boards.args;
|
2017-07-27 20:45:01 +08:00
|
|
|
|
2017-10-06 20:41:09 +08:00
|
|
|
if [ -s modified_boards.args ]; then
|
|
|
|
./scripts/sanitycheck +modified_boards.args --save-tests test_file.txt;
|
|
|
|
fi;
|
|
|
|
if [ -s modified_tests.args ]; then
|
|
|
|
./scripts/sanitycheck +modified_tests.args --save-tests test_file.txt;
|
|
|
|
fi;
|
|
|
|
rm -f modified_tests.args modified_boards.args;
|
2017-07-27 20:45:01 +08:00
|
|
|
fi;
|
2017-09-03 02:37:51 +08:00
|
|
|
- ./scripts/sanitycheck ${SANITYCHECK_OPTIONS} --save-tests test_file.txt
|
2017-09-13 10:00:39 +08:00
|
|
|
- ./scripts/sanitycheck --load-tests test_file.txt --subset ${MATRIX_BUILD}/${MATRIX_BUILDS} || ./scripts/sanitycheck ${SANITYCHECK_OPTIONS_RETRY} || ./scripts/sanitycheck ${SANITYCHECK_OPTIONS_RETRY}
|
2017-09-03 02:37:51 +08:00
|
|
|
- rm test_file.txt
|
2017-04-26 11:12:08 +08:00
|
|
|
- ccache -s
|
2017-08-03 00:34:24 +08:00
|
|
|
on_failure:
|
|
|
|
- rm -rf sanity-out out-2nd-pass
|
|
|
|
- mkdir -p shippable/testresults
|
|
|
|
- >
|
|
|
|
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;
|
|
|
|
on_success:
|
2017-04-26 11:12:08 +08:00
|
|
|
- rm -rf sanity-out out-2nd-pass
|
|
|
|
- mkdir -p shippable/testresults
|
|
|
|
- >
|
|
|
|
if [ -e compliance.xml ]; then
|
|
|
|
cp compliance.xml shippable/testresults/;
|
2017-04-30 10:36:11 +08:00
|
|
|
fi;
|
|
|
|
- >
|
|
|
|
if [ -e ./scripts/sanity_chk/last_sanity.xml ]; then
|
|
|
|
cp ./scripts/sanity_chk/last_sanity.xml shippable/testresults/;
|
2017-04-26 11:12:08 +08:00
|
|
|
fi;
|
|
|
|
|
|
|
|
integrations:
|
|
|
|
notifications:
|
2017-04-30 10:36:11 +08:00
|
|
|
- integrationName: slack_integration
|
|
|
|
type: slack
|
|
|
|
recipients:
|
|
|
|
- "#ci"
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
on_success: never
|
|
|
|
on_failure: always
|
2017-04-26 11:12:08 +08:00
|
|
|
- integrationName: email
|
|
|
|
type: email
|
|
|
|
recipients:
|
|
|
|
- builds@zephyrproject.org
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
- net
|
|
|
|
- bluetooth
|
|
|
|
- arm
|
|
|
|
on_success: never
|
|
|
|
on_failure: never
|