blob: a1e46b1bc1a784daf02a6a804ac38cf8e0e6b0d8 [file] [log] [blame]
Anas Nashifacedb702017-04-25 23:12:08 -04001language: c
2
3compiler: gcc
4
5env:
6 global:
Anas Nashif5fc31b82017-05-19 16:17:16 -04007 - SDK=0.9.1
Anas Nashifefc66842017-05-04 18:15:11 -04008 - SANITYCHECK_OPTIONS=" --inline-logs -R"
Anas Nashif035a7e92017-05-18 21:46:36 -04009 - SANITYCHECK_OPTIONS_RETRY="${SANITYCHECK_OPTIONS} --only-failed --outdir=out-2nd-pass"
Anas Nashif5fc31b82017-05-19 16:17:16 -040010 - ZEPHYR_SDK_INSTALL_DIR=/opt/sdk/zephyr-sdk-0.9.1
Anas Nashifacedb702017-04-25 23:12:08 -040011 - ZEPHYR_GCC_VARIANT=zephyr
12 - USE_CCACHE=1
Anas Nashif52cc2342017-05-18 07:49:47 -040013 - MATRIX_BUILDS="2"
Anas Nashifacedb702017-04-25 23:12:08 -040014 matrix:
Anas Nashif52cc2342017-05-18 07:49:47 -040015 - MATRIX_BUILD="1"
16 - MATRIX_BUILD="2"
Anas Nashifacedb702017-04-25 23:12:08 -040017
18build:
19 cache: true
20 cache_dir_list:
21 - ${SHIPPABLE_BUILD_DIR}/ccache
22 pre_ci_boot:
Anas Nashif5fc31b82017-05-19 16:17:16 -040023 image_name: zephyrprojectrtos/ci
Anas Nashif69edaa52017-05-19 22:23:08 -040024 image_tag: master.16
Anas Nashifacedb702017-04-25 23:12:08 -040025 pull: true
26 options: "-e HOME=/home/buildslave --privileged=true --tty --net=bridge --user buildslave"
27
28 ci:
Anas Nashifacedb702017-04-25 23:12:08 -040029 - export CCACHE_DIR=${SHIPPABLE_BUILD_DIR}/ccache/.ccache
Anas Nashifacedb702017-04-25 23:12:08 -040030 - source zephyr-env.sh
Anas Nashif52cc2342017-05-18 07:49:47 -040031 - ccache -c -s --max-size=2000M
Anas Nashifacedb702017-04-25 23:12:08 -040032 - make host-tools
33 - export PREBUILT_HOST_TOOLS=${ZEPHYR_BASE}/bin
34 - >
Anas Nashif3a212f82017-04-29 22:36:11 -040035 if [ "$IS_PULL_REQUEST" = "true" ]; then
Anas Nashifee254da2017-04-30 11:28:00 -040036 S3_PATH="s3://zephyr-logs/pull-requests/${REPO_FULL_NAME}/${PULL_REQUEST}"
Anas Nashif3a212f82017-04-29 22:36:11 -040037 else
38 if [ "$JOB_TRIGGERED_BY_NAME" = "undefined" ]; then
39 LOG_TYPE="manual";
40 else
41 LOG_TYPE=${JOB_TRIGGERED_BY_NAME};
42 fi;
43
Anas Nashifee254da2017-04-30 11:28:00 -040044 S3_PATH="s3://zephyr-logs/${LOG_TYPE}/${REPO_FULL_NAME}/${BUILD_NUMBER}";
Anas Nashif3a212f82017-04-29 22:36:11 -040045 fi;
46 - >
Anas Nashif52cc2342017-05-18 07:49:47 -040047 if [ "$MATRIX_BUILD" = "1" -a "$IS_PULL_REQUEST" = "true" ]; then
Kumar Gala9b874d62017-05-04 10:04:34 -050048 export COMMIT_RANGE=origin/${PULL_REQUEST_BASE_BRANCH}..${COMMIT}
Anas Nashif2dc9ae42017-04-28 20:30:13 -040049 echo "Building a Pull Request";
Anas Nashif3a212f82017-04-29 22:36:11 -040050 echo "- Building Documentation";
Kumar Gala9b874d62017-05-04 10:04:34 -050051 echo "Commit range:" ${COMMIT_RANGE}
Anas Nashif3a212f82017-04-29 22:36:11 -040052 make htmldocs > doc.log 2>&1;
Anas Nashif3d5b4ef2017-06-20 10:00:43 -040053 python2 ./scripts/filter-known-issues.py --config-dir .known-issues/doc/ doc.log > doc.warnings;
54 if [ "$?" != 0 ]; then
55 echo " ==> Error running filter script"
56 exit 1
57 fi;
Anas Nashif3a212f82017-04-29 22:36:11 -040058 if [ -s doc.warnings ]; then
59 echo " => New documentation warnings/errors";
60 fi;
61 echo "- Verify commit message and coding style";
Anas Nashif2f117af2017-05-09 16:57:00 -040062 ./scripts/ci/check-compliance.py --commits ${COMMIT_RANGE} || true;
Anas Nashifacedb702017-04-25 23:12:08 -040063 fi;
64 - >
Anas Nashifacedb702017-04-25 23:12:08 -040065 if [ "$JOB_TRIGGERED_BY_NAME" = "daily-verify" ]; then
Anas Nashif3a212f82017-04-29 22:36:11 -040066 echo "- Building with --all --enable-slow";
Anas Nashifacedb702017-04-25 23:12:08 -040067 COVERAGE="--all --enable-slow";
68 fi;
69 - >
Anas Nashif52cc2342017-05-18 07:49:47 -040070 ./scripts/sanitycheck ${PLATFORMS} --subset ${MATRIX_BUILD}/${MATRIX_BUILDS} ${COVERAGE} ${SANITYCHECK_OPTIONS} || ./scripts/sanitycheck ${PLATFORMS} --subset ${MATRIX_BUILD}/${MATRIX_BUILDS} ${COVERAGE} ${SANITYCHECK_OPTIONS_RETRY};
Anas Nashifacedb702017-04-25 23:12:08 -040071 - ccache -s
Anas Nashif3a212f82017-04-29 22:36:11 -040072 on_success:
Anas Nashifacedb702017-04-25 23:12:08 -040073 - rm -rf sanity-out out-2nd-pass
74 - mkdir -p shippable/testresults
75 - >
76 if [ -e compliance.xml ]; then
77 cp compliance.xml shippable/testresults/;
Anas Nashif3a212f82017-04-29 22:36:11 -040078 aws s3 cp compliance.xml ${S3_PATH}/;
Anas Nashifacedb702017-04-25 23:12:08 -040079 fi;
Anas Nashifacedb702017-04-25 23:12:08 -040080 - >
81 if [ -e ./scripts/sanity_chk/last_sanity.xml ]; then
82 cp ./scripts/sanity_chk/last_sanity.xml shippable/testresults/;
Anas Nashif3a212f82017-04-29 22:36:11 -040083 aws s3 cp ./scripts/sanity_chk/last_sanity.xml ${S3_PATH}/sanitycheck.xml;
Anas Nashifacedb702017-04-25 23:12:08 -040084 fi;
Anas Nashif3a212f82017-04-29 22:36:11 -040085 on_failure:
86 - rm -rf sanity-out out-2nd-pass
87 - mkdir -p shippable/testresults
88 - >
89 if [ -e compliance.xml ]; then
90 cp compliance.xml shippable/testresults/;
91 aws s3 cp compliance.xml ${S3_PATH}/;
92 fi;
93 - >
94 if [ -e ./scripts/sanity_chk/last_sanity.xml ]; then
95 cp ./scripts/sanity_chk/last_sanity.xml shippable/testresults/;
96 aws s3 cp ./scripts/sanity_chk/last_sanity.xml ${S3_PATH}/sanitycheck.xml;
97 fi;
Anas Nashifacedb702017-04-25 23:12:08 -040098
99integrations:
100 notifications:
Anas Nashif3a212f82017-04-29 22:36:11 -0400101 - integrationName: slack_integration
102 type: slack
103 recipients:
104 - "#ci"
105 branches:
106 only:
107 - master
108 on_success: never
109 on_failure: always
Anas Nashifacedb702017-04-25 23:12:08 -0400110 - integrationName: email
111 type: email
112 recipients:
113 - builds@zephyrproject.org
114 branches:
115 only:
116 - master
117 - net
118 - bluetooth
119 - arm
120 on_success: never
121 on_failure: never