Arnout Vandecappelle | 4f863d7 | 2017-02-14 00:23:03 +0100 | [diff] [blame] | 1 | # Configuration for Gitlab-CI. |
| 2 | # Builds appear on https://gitlab.com/buildroot.org/buildroot/pipelines |
| 3 | # The .gitlab-ci.yml file is generated from .gitlab-ci.yml.in. |
| 4 | # It needs to be regenerated every time a defconfig is added, using |
| 5 | # "make .gitlab-ci.yml". |
| 6 | |
Ricardo Martincoski | 12b08c2 | 2018-03-30 20:10:55 -0300 | [diff] [blame] | 7 | image: buildroot/base:20180318.1724 |
Arnout Vandecappelle | 4f863d7 | 2017-02-14 00:23:03 +0100 | [diff] [blame] | 8 | |
| 9 | .defconfig_script: &defconfig_script |
| 10 | - echo 'Configure Buildroot' |
Thomas Preston | 3e869e0 | 2017-10-23 15:26:14 +0100 | [diff] [blame] | 11 | - make ${CI_JOB_NAME} |
Arnout Vandecappelle | 4f863d7 | 2017-02-14 00:23:03 +0100 | [diff] [blame] | 12 | - echo 'Build buildroot' |
| 13 | - | |
| 14 | make > >(tee build.log |grep '>>>') 2>&1 || { |
| 15 | echo 'Failed build last output' |
| 16 | tail -200 build.log |
| 17 | exit 1 |
| 18 | } |
| 19 | |
| 20 | check-gitlab-ci.yml: |
| 21 | script: |
| 22 | - mv .gitlab-ci.yml .gitlab-ci.yml.orig |
| 23 | - make .gitlab-ci.yml |
| 24 | - diff -u .gitlab-ci.yml.orig .gitlab-ci.yml |
| 25 | |
Arnout Vandecappelle | d498aa4 | 2017-06-30 18:42:53 +0200 | [diff] [blame] | 26 | check-DEVELOPERS: |
Arnout Vandecappelle | 29ba13e | 2017-07-01 20:22:27 +0200 | [diff] [blame] | 27 | # get-developers should print just "No action specified"; if it prints |
| 28 | # anything else, it's a parse error. |
| 29 | # The initial ! is removed by YAML so we need to quote it. |
Arnout Vandecappelle | d498aa4 | 2017-06-30 18:42:53 +0200 | [diff] [blame] | 30 | script: |
Arnout Vandecappelle | 29ba13e | 2017-07-01 20:22:27 +0200 | [diff] [blame] | 31 | - "! utils/get-developers | grep -v 'No action specified'" |
Arnout Vandecappelle | d498aa4 | 2017-06-30 18:42:53 +0200 | [diff] [blame] | 32 | |
Ricardo Martincoski | 1960eda | 2018-03-13 00:09:44 -0300 | [diff] [blame] | 33 | check-flake8: |
| 34 | before_script: |
| 35 | # Help flake8 to find the Python files without .py extension. |
| 36 | - find * -type f -name '*.py' > files.txt |
| 37 | - find * -type f -print0 | xargs -0 file | grep 'Python script' | cut -d':' -f1 >> files.txt |
| 38 | - sort -u files.txt | tee files.processed |
| 39 | script: |
| 40 | - python -m flake8 --statistics --count $(cat files.processed) |
| 41 | after_script: |
| 42 | - wc -l files.processed |
| 43 | |
Yann E. MORIN | b58059a | 2017-11-30 00:08:45 +0100 | [diff] [blame] | 44 | check-package: |
| 45 | script: |
Thomas Petazzoni | 1290241 | 2018-08-11 12:44:23 +0200 | [diff] [blame^] | 46 | - make check-package |
Yann E. MORIN | b58059a | 2017-11-30 00:08:45 +0100 | [diff] [blame] | 47 | |
Arnout Vandecappelle | 4f863d7 | 2017-02-14 00:23:03 +0100 | [diff] [blame] | 48 | .defconfig: &defconfig |
| 49 | # Running the defconfigs for every push is too much, so limit to |
| 50 | # explicit triggers through the API. |
| 51 | only: |
| 52 | - triggers |
| 53 | - tags |
| 54 | script: *defconfig_script |
| 55 | artifacts: |
| 56 | when: always |
| 57 | expire_in: 2 weeks |
| 58 | paths: |
| 59 | - build.log |
| 60 | - output/images/ |
| 61 | - output/build/build-time.log |
| 62 | - output/build/packages-file-list.txt |
| 63 | |
Thomas Petazzoni | b287ea6 | 2017-07-02 18:13:22 +0200 | [diff] [blame] | 64 | .runtime_test: &runtime_test |
Ricardo Martincoski | af6b583 | 2017-07-30 01:49:43 -0300 | [diff] [blame] | 65 | # Keep build directories so the rootfs can be an artifact of the job. The |
| 66 | # runner will clean up those files for us. |
Ricardo Martincoski | 3cc7bd2 | 2017-08-04 23:05:20 -0300 | [diff] [blame] | 67 | # Multiply every emulator timeout by 10 to avoid sporadic failures in |
| 68 | # elastic runners. |
Thomas Preston | 3e869e0 | 2017-10-23 15:26:14 +0100 | [diff] [blame] | 69 | script: ./support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${CI_JOB_NAME} |
Thomas Petazzoni | b287ea6 | 2017-07-02 18:13:22 +0200 | [diff] [blame] | 70 | artifacts: |
| 71 | when: always |
| 72 | expire_in: 2 weeks |
| 73 | paths: |
| 74 | - test-output/*.log |
Yann E. MORIN | 2438d90 | 2017-12-20 15:19:33 +0100 | [diff] [blame] | 75 | - test-output/*/.config |
Ricardo Martincoski | af6b583 | 2017-07-30 01:49:43 -0300 | [diff] [blame] | 76 | - test-output/*/images/* |