2017-04-26 11:12:08 +08:00
|
|
|
language: c
|
|
|
|
|
|
|
|
compiler: gcc
|
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
2017-05-20 04:17:16 +08:00
|
|
|
- SDK=0.9.1
|
2017-05-05 06:15:11 +08:00
|
|
|
- SANITYCHECK_OPTIONS=" --inline-logs -R"
|
2017-05-19 09:46:36 +08:00
|
|
|
- SANITYCHECK_OPTIONS_RETRY="${SANITYCHECK_OPTIONS} --only-failed --outdir=out-2nd-pass"
|
2017-05-20 04:17:16 +08:00
|
|
|
- ZEPHYR_SDK_INSTALL_DIR=/opt/sdk/zephyr-sdk-0.9.1
|
2017-04-26 11:12:08 +08:00
|
|
|
- ZEPHYR_GCC_VARIANT=zephyr
|
|
|
|
- USE_CCACHE=1
|
2017-05-18 19:49:47 +08:00
|
|
|
- MATRIX_BUILDS="2"
|
2017-04-26 11:12:08 +08:00
|
|
|
matrix:
|
2017-05-18 19:49:47 +08:00
|
|
|
- MATRIX_BUILD="1"
|
|
|
|
- MATRIX_BUILD="2"
|
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-05-20 10:23:08 +08:00
|
|
|
image_tag: master.16
|
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
|
|
|
|
- source zephyr-env.sh
|
2017-05-18 19:49:47 +08:00
|
|
|
- ccache -c -s --max-size=2000M
|
2017-04-26 11:12:08 +08:00
|
|
|
- make host-tools
|
|
|
|
- export PREBUILT_HOST_TOOLS=${ZEPHYR_BASE}/bin
|
|
|
|
- >
|
2017-04-30 10:36:11 +08:00
|
|
|
if [ "$IS_PULL_REQUEST" = "true" ]; then
|
2017-04-30 23:28:00 +08:00
|
|
|
S3_PATH="s3://zephyr-logs/pull-requests/${REPO_FULL_NAME}/${PULL_REQUEST}"
|
2017-04-30 10:36:11 +08:00
|
|
|
else
|
|
|
|
if [ "$JOB_TRIGGERED_BY_NAME" = "undefined" ]; then
|
|
|
|
LOG_TYPE="manual";
|
|
|
|
else
|
|
|
|
LOG_TYPE=${JOB_TRIGGERED_BY_NAME};
|
|
|
|
fi;
|
|
|
|
|
2017-04-30 23:28:00 +08:00
|
|
|
S3_PATH="s3://zephyr-logs/${LOG_TYPE}/${REPO_FULL_NAME}/${BUILD_NUMBER}";
|
2017-04-30 10:36:11 +08:00
|
|
|
fi;
|
|
|
|
- >
|
2017-05-18 19:49:47 +08:00
|
|
|
if [ "$MATRIX_BUILD" = "1" -a "$IS_PULL_REQUEST" = "true" ]; then
|
2017-05-04 23:04:34 +08:00
|
|
|
export COMMIT_RANGE=origin/${PULL_REQUEST_BASE_BRANCH}..${COMMIT}
|
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-05-20 04:17:16 +08:00
|
|
|
sudo pip install sphinx==1.5.5
|
2017-04-30 10:36:11 +08:00
|
|
|
make htmldocs > doc.log 2>&1;
|
|
|
|
./scripts/filter-known-issues.py --config-dir .known-issues/doc/ doc.log > doc.warnings;
|
|
|
|
if [ -s doc.warnings ]; then
|
|
|
|
echo " => New documentation warnings/errors";
|
|
|
|
fi;
|
|
|
|
echo "- Verify commit message and coding style";
|
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;
|
|
|
|
- >
|
|
|
|
if [ "$JOB_TRIGGERED_BY_NAME" = "daily-verify" ]; then
|
2017-04-30 10:36:11 +08:00
|
|
|
echo "- Building with --all --enable-slow";
|
2017-04-26 11:12:08 +08:00
|
|
|
COVERAGE="--all --enable-slow";
|
|
|
|
fi;
|
|
|
|
- >
|
2017-05-18 19:49:47 +08:00
|
|
|
./scripts/sanitycheck ${PLATFORMS} --subset ${MATRIX_BUILD}/${MATRIX_BUILDS} ${COVERAGE} ${SANITYCHECK_OPTIONS} || ./scripts/sanitycheck ${PLATFORMS} --subset ${MATRIX_BUILD}/${MATRIX_BUILDS} ${COVERAGE} ${SANITYCHECK_OPTIONS_RETRY};
|
2017-04-26 11:12:08 +08:00
|
|
|
- ccache -s
|
2017-04-30 10:36:11 +08:00
|
|
|
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
|
|
|
aws s3 cp compliance.xml ${S3_PATH}/;
|
|
|
|
fi;
|
|
|
|
- >
|
|
|
|
if [ -e ./scripts/sanity_chk/last_sanity.xml ]; then
|
|
|
|
cp ./scripts/sanity_chk/last_sanity.xml shippable/testresults/;
|
|
|
|
aws s3 cp ./scripts/sanity_chk/last_sanity.xml ${S3_PATH}/sanitycheck.xml;
|
2017-04-26 11:12:08 +08:00
|
|
|
fi;
|
|
|
|
on_failure:
|
2017-04-30 10:36:11 +08:00
|
|
|
- rm -rf sanity-out out-2nd-pass
|
|
|
|
- mkdir -p shippable/testresults
|
|
|
|
- >
|
|
|
|
if [ -e compliance.xml ]; then
|
|
|
|
cp compliance.xml shippable/testresults/;
|
|
|
|
aws s3 cp compliance.xml ${S3_PATH}/;
|
|
|
|
fi;
|
2017-04-26 11:12:08 +08:00
|
|
|
- >
|
|
|
|
if [ -e ./scripts/sanity_chk/last_sanity.xml ]; then
|
|
|
|
cp ./scripts/sanity_chk/last_sanity.xml shippable/testresults/;
|
2017-04-30 10:36:11 +08:00
|
|
|
aws s3 cp ./scripts/sanity_chk/last_sanity.xml ${S3_PATH}/sanitycheck.xml;
|
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
|