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 | |
| 7 | image: debian:stable |
| 8 | |
| 9 | before_script: |
| 10 | - dpkg --add-architecture i386 |
| 11 | # The container has no package lists, so need to update first |
| 12 | - apt-get update -qq |
| 13 | - apt-get install -y -qq --no-install-recommends |
Arnout Vandecappelle | 512a083 | 2017-03-10 13:35:58 +0100 | [diff] [blame^] | 14 | build-essential locales bc ca-certificates file rsync gcc-multilib |
Arnout Vandecappelle | 4f863d7 | 2017-02-14 00:23:03 +0100 | [diff] [blame] | 15 | git bzr cvs mercurial subversion libc6:i386 unzip wget cpio |
| 16 | # To be able to generate a toolchain with locales, enable one UTF-8 locale |
| 17 | - sed -i 's/# \(en_US.UTF-8\)/\1/' /etc/locale.gen |
| 18 | - /usr/sbin/locale-gen |
| 19 | |
| 20 | .defconfig_script: &defconfig_script |
| 21 | - echo 'Configure Buildroot' |
| 22 | - make ${CI_BUILD_NAME} |
| 23 | - echo 'Build buildroot' |
| 24 | - | |
| 25 | make > >(tee build.log |grep '>>>') 2>&1 || { |
| 26 | echo 'Failed build last output' |
| 27 | tail -200 build.log |
| 28 | exit 1 |
| 29 | } |
| 30 | |
| 31 | check-gitlab-ci.yml: |
| 32 | script: |
| 33 | - mv .gitlab-ci.yml .gitlab-ci.yml.orig |
| 34 | - make .gitlab-ci.yml |
| 35 | - diff -u .gitlab-ci.yml.orig .gitlab-ci.yml |
| 36 | |
| 37 | .defconfig: &defconfig |
| 38 | # Running the defconfigs for every push is too much, so limit to |
| 39 | # explicit triggers through the API. |
| 40 | only: |
| 41 | - triggers |
| 42 | - tags |
| 43 | script: *defconfig_script |
| 44 | artifacts: |
| 45 | when: always |
| 46 | expire_in: 2 weeks |
| 47 | paths: |
| 48 | - build.log |
| 49 | - output/images/ |
| 50 | - output/build/build-time.log |
| 51 | - output/build/packages-file-list.txt |
| 52 | |