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 | 67848ff | 2017-10-28 14:40:53 -0400 | [diff] [blame] | 7 | - SDK=0.9.2 |
Anas Nashif | efc6684 | 2017-05-04 18:15:11 -0400 | [diff] [blame] | 8 | - SANITYCHECK_OPTIONS=" --inline-logs -R" |
Anas Nashif | 2ed5eb3 | 2017-09-12 22:00:39 -0400 | [diff] [blame] | 9 | - SANITYCHECK_OPTIONS_RETRY="${SANITYCHECK_OPTIONS} --only-failed --outdir=out-2nd-pass" |
Anas Nashif | 67848ff | 2017-10-28 14:40:53 -0400 | [diff] [blame] | 10 | - ZEPHYR_SDK_INSTALL_DIR=/opt/sdk/zephyr-sdk-0.9.2 |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 11 | - ZEPHYR_GCC_VARIANT=zephyr |
Anas Nashif | 036dde2 | 2017-11-08 20:02:34 -0500 | [diff] [blame] | 12 | - MATRIX_BUILDS="4" |
| 13 | - MATRIX_BUILDS_EXTRA="4" |
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 | a24e6ba | 2017-07-19 12:45:02 +0300 | [diff] [blame] | 17 | - MATRIX_BUILD="3" |
Anas Nashif | 7c1602d | 2017-10-28 14:24:18 -0400 | [diff] [blame] | 18 | - MATRIX_BUILD="4" |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 19 | |
| 20 | build: |
| 21 | cache: true |
| 22 | cache_dir_list: |
| 23 | - ${SHIPPABLE_BUILD_DIR}/ccache |
| 24 | pre_ci_boot: |
Anas Nashif | 5fc31b8 | 2017-05-19 16:17:16 -0400 | [diff] [blame] | 25 | image_name: zephyrprojectrtos/ci |
Anas Nashif | 67848ff | 2017-10-28 14:40:53 -0400 | [diff] [blame] | 26 | image_tag: v0.2 |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 27 | pull: true |
| 28 | options: "-e HOME=/home/buildslave --privileged=true --tty --net=bridge --user buildslave" |
| 29 | |
| 30 | ci: |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 31 | - export CCACHE_DIR=${SHIPPABLE_BUILD_DIR}/ccache/.ccache |
Anas Nashif | b127aff | 2017-10-06 08:41:09 -0400 | [diff] [blame] | 32 | - > |
| 33 | if [ "$IS_PULL_REQUEST" = "true" ]; then |
| 34 | git rebase origin/${PULL_REQUEST_BASE_BRANCH}; |
| 35 | fi |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 36 | - source zephyr-env.sh |
Anas Nashif | 52cc234 | 2017-05-18 07:49:47 -0400 | [diff] [blame] | 37 | - ccache -c -s --max-size=2000M |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 38 | - > |
Anas Nashif | 036dde2 | 2017-11-08 20:02:34 -0500 | [diff] [blame] | 39 | if [ "$MATRIX_BUILD" = "4" -a "$IS_PULL_REQUEST" = "true" ]; then |
Anas Nashif | 0ea8e3e | 2017-07-19 10:37:39 +0300 | [diff] [blame] | 40 | export COMMIT_RANGE=origin/${PULL_REQUEST_BASE_BRANCH}..HEAD |
Anas Nashif | 2dc9ae4 | 2017-04-28 20:30:13 -0400 | [diff] [blame] | 41 | echo "Building a Pull Request"; |
Anas Nashif | 3a212f8 | 2017-04-29 22:36:11 -0400 | [diff] [blame] | 42 | echo "- Building Documentation"; |
Kumar Gala | 9b874d6 | 2017-05-04 10:04:34 -0500 | [diff] [blame] | 43 | echo "Commit range:" ${COMMIT_RANGE} |
Anas Nashif | 706ac7f | 2017-11-10 08:27:08 -0500 | [diff] [blame] | 44 | make htmldocs |
| 45 | if [ -s doc/doc.warnings ]; then |
Anas Nashif | 3a212f8 | 2017-04-29 22:36:11 -0400 | [diff] [blame] | 46 | echo " => New documentation warnings/errors"; |
Anas Nashif | e8391cb | 2017-11-15 07:34:11 -0500 | [diff] [blame] | 47 | cp doc/doc.warnings doc.warnings |
Anas Nashif | 3a212f8 | 2017-04-29 22:36:11 -0400 | [diff] [blame] | 48 | fi; |
David B. Kinder | d3b0cd4 | 2017-09-21 11:55:15 -0700 | [diff] [blame] | 49 | echo "- Verify commit message, coding style, doc build"; |
Anas Nashif | 2f117af | 2017-05-09 16:57:00 -0400 | [diff] [blame] | 50 | ./scripts/ci/check-compliance.py --commits ${COMMIT_RANGE} || true; |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 51 | fi; |
| 52 | - > |
Anas Nashif | b127aff | 2017-10-06 08:41:09 -0400 | [diff] [blame] | 53 | if [ "$IS_PULL_REQUEST" = "true" ]; then |
| 54 | ./scripts/ci/get_modified_tests.py --commits origin/${PULL_REQUEST_BASE_BRANCH}..HEAD > modified_tests.args; |
| 55 | ./scripts/ci/get_modified_boards.py --commits origin/${PULL_REQUEST_BASE_BRANCH}..HEAD > modified_boards.args; |
Anas Nashif | 31df3b2 | 2017-07-27 08:45:01 -0400 | [diff] [blame] | 56 | |
Anas Nashif | b127aff | 2017-10-06 08:41:09 -0400 | [diff] [blame] | 57 | if [ -s modified_boards.args ]; then |
| 58 | ./scripts/sanitycheck +modified_boards.args --save-tests test_file.txt; |
| 59 | fi; |
| 60 | if [ -s modified_tests.args ]; then |
| 61 | ./scripts/sanitycheck +modified_tests.args --save-tests test_file.txt; |
| 62 | fi; |
| 63 | rm -f modified_tests.args modified_boards.args; |
Anas Nashif | c1cafb1 | 2017-08-09 23:34:14 -0400 | [diff] [blame] | 64 | fi; |
Anas Nashif | f8aa9e6 | 2017-09-02 14:37:51 -0400 | [diff] [blame] | 65 | - ./scripts/sanitycheck ${SANITYCHECK_OPTIONS} --save-tests test_file.txt |
Anas Nashif | 2ed5eb3 | 2017-09-12 22:00:39 -0400 | [diff] [blame] | 66 | - ./scripts/sanitycheck --load-tests test_file.txt --subset ${MATRIX_BUILD}/${MATRIX_BUILDS} || ./scripts/sanitycheck ${SANITYCHECK_OPTIONS_RETRY} || ./scripts/sanitycheck ${SANITYCHECK_OPTIONS_RETRY} |
Anas Nashif | f8aa9e6 | 2017-09-02 14:37:51 -0400 | [diff] [blame] | 67 | - rm test_file.txt |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 68 | - ccache -s |
Anas Nashif | aa05b95 | 2017-08-02 12:34:24 -0400 | [diff] [blame] | 69 | on_failure: |
| 70 | - rm -rf sanity-out out-2nd-pass |
| 71 | - mkdir -p shippable/testresults |
| 72 | - > |
| 73 | if [ -e compliance.xml ]; then |
| 74 | cp compliance.xml shippable/testresults/; |
Anas Nashif | aa05b95 | 2017-08-02 12:34:24 -0400 | [diff] [blame] | 75 | fi; |
| 76 | - > |
| 77 | if [ -e ./scripts/sanity_chk/last_sanity.xml ]; then |
| 78 | cp ./scripts/sanity_chk/last_sanity.xml shippable/testresults/; |
Anas Nashif | aa05b95 | 2017-08-02 12:34:24 -0400 | [diff] [blame] | 79 | fi; |
Anas Nashif | aa05b95 | 2017-08-02 12:34:24 -0400 | [diff] [blame] | 80 | on_success: |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 81 | - rm -rf sanity-out out-2nd-pass |
| 82 | - mkdir -p shippable/testresults |
| 83 | - > |
| 84 | if [ -e compliance.xml ]; then |
| 85 | cp compliance.xml shippable/testresults/; |
| 86 | fi; |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 87 | - > |
| 88 | if [ -e ./scripts/sanity_chk/last_sanity.xml ]; then |
| 89 | cp ./scripts/sanity_chk/last_sanity.xml shippable/testresults/; |
| 90 | fi; |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 91 | |
| 92 | integrations: |
| 93 | notifications: |
Anas Nashif | 3a212f8 | 2017-04-29 22:36:11 -0400 | [diff] [blame] | 94 | - integrationName: slack_integration |
| 95 | type: slack |
| 96 | recipients: |
| 97 | - "#ci" |
| 98 | branches: |
| 99 | only: |
| 100 | - master |
| 101 | on_success: never |
| 102 | on_failure: always |
Anas Nashif | acedb70 | 2017-04-25 23:12:08 -0400 | [diff] [blame] | 103 | - integrationName: email |
| 104 | type: email |
| 105 | recipients: |
| 106 | - builds@zephyrproject.org |
| 107 | branches: |
| 108 | only: |
| 109 | - master |
| 110 | - net |
| 111 | - bluetooth |
| 112 | - arm |
| 113 | on_success: never |
| 114 | on_failure: never |