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".
7 image: buildroot/base:20191027.2027
11 - if: '$CI_COMMIT_REF_NAME =~ /^.*-.*_defconfig$/ || $CI_COMMIT_REF_NAME =~ /^.*-tests\..*$/'
17 # get-developers should print just "No action specified"; if it prints
18 # anything else, it's a parse error.
19 # The initial ! is removed by YAML so we need to quote it.
21 - "! utils/get-developers | grep -v 'No action specified'"
26 # Help flake8 to find the Python files without .py extension.
27 - find * -type f -name '*.py' > files.txt
28 - find * -type f -print0 | xargs -0 file | grep 'Python script' | cut -d':' -f1 >> files.txt
29 - sort -u files.txt | tee files.processed
31 - python -m flake8 --statistics --count --max-line-length=132 $(cat files.processed)
33 - wc -l files.processed
38 - mv .gitlab-ci.yml .gitlab-ci.yml.orig
40 - diff -u .gitlab-ci.yml.orig .gitlab-ci.yml
49 - echo "Configure Buildroot for ${DEFCONFIG_NAME}"
50 - make ${DEFCONFIG_NAME}
51 - echo 'Build buildroot'
53 make > >(tee build.log |grep '>>>') 2>&1 || {
54 echo 'Failed build last output'
59 ./support/scripts/boot-qemu-image.py "${DEFCONFIG_NAME}" > >(tee runtime-test.log) 2>&1 || {
60 echo 'Failed runtime test last output'
61 tail -200 runtime-test.log
71 - output/build/build-time.log
72 - output/build/packages-file-list.txt
73 - output/build/*/.config
77 extends: .defconfig_base
78 # Running the defconfigs for every push is too much, so limit to
79 # explicit triggers through the API.
81 # For tags, create a pipeline.
82 - if: '$CI_COMMIT_TAG'
83 # For pipeline created by using a trigger token.
84 - if: '$CI_PIPELINE_TRIGGERED'
85 # For the branch or tag name named *-defconfigs, create a pipeline.
86 - if: '$CI_COMMIT_REF_NAME =~ /^.*-defconfigs$/'
88 - DEFCONFIG_NAME=${CI_JOB_NAME}
91 extends: .defconfig_base
93 # For the branch or tag name named *-*_defconfigs, create a pipeline.
94 - if: '$CI_COMMIT_REF_NAME =~ /^.*-.*_defconfig$/'
96 - DEFCONFIG_NAME=$(echo ${CI_COMMIT_REF_NAME} | sed -e 's,^.*-,,g')
99 # Keep build directories so the rootfs can be an artifact of the job. The
100 # runner will clean up those files for us.
101 # Multiply every emulator timeout by 10 to avoid sporadic failures in
104 - echo "Starting runtime test ${TEST_CASE_NAME}"
105 - ./support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${TEST_CASE_NAME}
111 - test-output/*/.config
112 - test-output/*/images/*
115 extends: .runtime_test_base
116 # Running the runtime tests for every push is too much, so limit to
117 # explicit triggers through the API.
119 # For tags, create a pipeline.
120 - if: '$CI_COMMIT_TAG'
121 # For pipeline created by using a trigger token.
122 - if: '$CI_PIPELINE_TRIGGERED'
123 # For the branch or tag name named *-runtime-tests, create a pipeline.
124 - if: '$CI_COMMIT_REF_NAME =~ /^.*-runtime-tests$/'
126 - TEST_CASE_NAME=${CI_JOB_NAME}
129 extends: .runtime_test_base
131 - if: '$CI_COMMIT_REF_NAME =~ /^.*-tests\..*$/'
133 - TEST_CASE_NAME=$(echo ${CI_COMMIT_REF_NAME} | sed -e 's,^.*-,,g')