Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 1 | language: c |
| 2 | |
| 3 | compiler: gcc |
| 4 | |
| 5 | env: |
| 6 | global: |
Anas Nashif | 5fc31b8 | 2017-05-19 16:17:16 -0400 | [diff] [blame] | 7 | - SDK=0.9.1 |
Anas Nashif | efc6684 | 2017-05-04 18:15:11 -0400 | [diff] [blame] | 8 | - SANITYCHECK_OPTIONS=" --inline-logs -R" |
Anas Nashif | 035a7e9 | 2017-05-18 21:46:36 -0400 | [diff] [blame] | 9 | - SANITYCHECK_OPTIONS_RETRY="${SANITYCHECK_OPTIONS} --only-failed --outdir=out-2nd-pass" |
Anas Nashif | 5fc31b8 | 2017-05-19 16:17:16 -0400 | [diff] [blame] | 10 | - ZEPHYR_SDK_INSTALL_DIR=/opt/sdk/zephyr-sdk-0.9.1 |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 11 | - ZEPHYR_GCC_VARIANT=zephyr |
| 12 | - USE_CCACHE=1 |
Anas Nashif | 52cc234 | 2017-05-18 07:49:47 -0400 | [diff] [blame] | 13 | - MATRIX_BUILDS="2" |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 14 | matrix: |
Anas Nashif | 52cc234 | 2017-05-18 07:49:47 -0400 | [diff] [blame] | 15 | - MATRIX_BUILD="1" |
| 16 | - MATRIX_BUILD="2" |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 17 | |
| 18 | build: |
| 19 | cache: true |
| 20 | cache_dir_list: |
| 21 | - ${SHIPPABLE_BUILD_DIR}/ccache |
| 22 | pre_ci_boot: |
Anas Nashif | 5fc31b8 | 2017-05-19 16:17:16 -0400 | [diff] [blame] | 23 | image_name: zephyrprojectrtos/ci |
Anas Nashif | 69edaa5 | 2017-05-19 22:23:08 -0400 | [diff] [blame] | 24 | image_tag: master.16 |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 25 | pull: true |
| 26 | options: "-e HOME=/home/buildslave --privileged=true --tty --net=bridge --user buildslave" |
| 27 | |
| 28 | ci: |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 29 | - export CCACHE_DIR=${SHIPPABLE_BUILD_DIR}/ccache/.ccache |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 30 | - source zephyr-env.sh |
Anas Nashif | 52cc234 | 2017-05-18 07:49:47 -0400 | [diff] [blame] | 31 | - ccache -c -s --max-size=2000M |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 32 | - make host-tools |
| 33 | - export PREBUILT_HOST_TOOLS=${ZEPHYR_BASE}/bin |
| 34 | - > |
Anas Nashif | 3a212f8 | 2017-04-29 22:36:11 -0400 | [diff] [blame] | 35 | if [ "$IS_PULL_REQUEST" = "true" ]; then |
Anas Nashif | ee254da | 2017-04-30 11:28:00 -0400 | [diff] [blame] | 36 | S3_PATH="s3://zephyr-logs/pull-requests/${REPO_FULL_NAME}/${PULL_REQUEST}" |
Anas Nashif | 3a212f8 | 2017-04-29 22:36:11 -0400 | [diff] [blame] | 37 | 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 Nashif | ee254da | 2017-04-30 11:28:00 -0400 | [diff] [blame] | 44 | S3_PATH="s3://zephyr-logs/${LOG_TYPE}/${REPO_FULL_NAME}/${BUILD_NUMBER}"; |
Anas Nashif | 3a212f8 | 2017-04-29 22:36:11 -0400 | [diff] [blame] | 45 | fi; |
| 46 | - > |
Anas Nashif | 52cc234 | 2017-05-18 07:49:47 -0400 | [diff] [blame] | 47 | if [ "$MATRIX_BUILD" = "1" -a "$IS_PULL_REQUEST" = "true" ]; then |
Kumar Gala | 9b874d6 | 2017-05-04 10:04:34 -0500 | [diff] [blame] | 48 | export COMMIT_RANGE=origin/${PULL_REQUEST_BASE_BRANCH}..${COMMIT} |
Anas Nashif | 2dc9ae4 | 2017-04-28 20:30:13 -0400 | [diff] [blame] | 49 | echo "Building a Pull Request"; |
Anas Nashif | 3a212f8 | 2017-04-29 22:36:11 -0400 | [diff] [blame] | 50 | echo "- Building Documentation"; |
Kumar Gala | 9b874d6 | 2017-05-04 10:04:34 -0500 | [diff] [blame] | 51 | echo "Commit range:" ${COMMIT_RANGE} |
Anas Nashif | 3a212f8 | 2017-04-29 22:36:11 -0400 | [diff] [blame] | 52 | make htmldocs > doc.log 2>&1; |
Anas Nashif | 3d5b4ef | 2017-06-20 10:00:43 -0400 | [diff] [blame] | 53 | 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 Nashif | 3a212f8 | 2017-04-29 22:36:11 -0400 | [diff] [blame] | 58 | if [ -s doc.warnings ]; then |
| 59 | echo " => New documentation warnings/errors"; |
| 60 | fi; |
| 61 | echo "- Verify commit message and coding style"; |
Anas Nashif | 2f117af | 2017-05-09 16:57:00 -0400 | [diff] [blame] | 62 | ./scripts/ci/check-compliance.py --commits ${COMMIT_RANGE} || true; |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 63 | fi; |
| 64 | - > |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 65 | if [ "$JOB_TRIGGERED_BY_NAME" = "daily-verify" ]; then |
Anas Nashif | 3a212f8 | 2017-04-29 22:36:11 -0400 | [diff] [blame] | 66 | echo "- Building with --all --enable-slow"; |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 67 | COVERAGE="--all --enable-slow"; |
| 68 | fi; |
| 69 | - > |
Anas Nashif | 52cc234 | 2017-05-18 07:49:47 -0400 | [diff] [blame] | 70 | ./scripts/sanitycheck ${PLATFORMS} --subset ${MATRIX_BUILD}/${MATRIX_BUILDS} ${COVERAGE} ${SANITYCHECK_OPTIONS} || ./scripts/sanitycheck ${PLATFORMS} --subset ${MATRIX_BUILD}/${MATRIX_BUILDS} ${COVERAGE} ${SANITYCHECK_OPTIONS_RETRY}; |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 71 | - ccache -s |
Anas Nashif | 3a212f8 | 2017-04-29 22:36:11 -0400 | [diff] [blame] | 72 | on_success: |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 73 | - 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 Nashif | 3a212f8 | 2017-04-29 22:36:11 -0400 | [diff] [blame] | 78 | aws s3 cp compliance.xml ${S3_PATH}/; |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 79 | fi; |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 80 | - > |
| 81 | if [ -e ./scripts/sanity_chk/last_sanity.xml ]; then |
| 82 | cp ./scripts/sanity_chk/last_sanity.xml shippable/testresults/; |
Anas Nashif | 3a212f8 | 2017-04-29 22:36:11 -0400 | [diff] [blame] | 83 | aws s3 cp ./scripts/sanity_chk/last_sanity.xml ${S3_PATH}/sanitycheck.xml; |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 84 | fi; |
Anas Nashif | 3a212f8 | 2017-04-29 22:36:11 -0400 | [diff] [blame] | 85 | 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 Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 98 | |
| 99 | integrations: |
| 100 | notifications: |
Anas Nashif | 3a212f8 | 2017-04-29 22:36:11 -0400 | [diff] [blame] | 101 | - 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 Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 110 | - 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 |