.gitlab-ci.yml.in 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. image: buildroot/base:20180318.1724
  7. .defconfig_script: &defconfig_script
  8. - echo 'Configure Buildroot'
  9. - make ${CI_JOB_NAME}
  10. - echo 'Build buildroot'
  11. - |
  12. make > >(tee build.log |grep '>>>') 2>&1 || {
  13. echo 'Failed build last output'
  14. tail -200 build.log
  15. exit 1
  16. }
  17. check-gitlab-ci.yml:
  18. script:
  19. - mv .gitlab-ci.yml .gitlab-ci.yml.orig
  20. - make .gitlab-ci.yml
  21. - diff -u .gitlab-ci.yml.orig .gitlab-ci.yml
  22. check-DEVELOPERS:
  23. # get-developers should print just "No action specified"; if it prints
  24. # anything else, it's a parse error.
  25. # The initial ! is removed by YAML so we need to quote it.
  26. script:
  27. - "! utils/get-developers | grep -v 'No action specified'"
  28. check-flake8:
  29. before_script:
  30. # Help flake8 to find the Python files without .py extension.
  31. - find * -type f -name '*.py' > files.txt
  32. - find * -type f -print0 | xargs -0 file | grep 'Python script' | cut -d':' -f1 >> files.txt
  33. - sort -u files.txt | tee files.processed
  34. script:
  35. - python -m flake8 --statistics --count $(cat files.processed)
  36. after_script:
  37. - wc -l files.processed
  38. check-package:
  39. script:
  40. - make check-package
  41. .defconfig: &defconfig
  42. # Running the defconfigs for every push is too much, so limit to
  43. # explicit triggers through the API.
  44. only:
  45. - triggers
  46. - tags
  47. script: *defconfig_script
  48. artifacts:
  49. when: always
  50. expire_in: 2 weeks
  51. paths:
  52. - build.log
  53. - output/images/
  54. - output/build/build-time.log
  55. - output/build/packages-file-list.txt
  56. .runtime_test: &runtime_test
  57. # Running the runtime tests for every push is too much, so limit to
  58. # explicit triggers through the API.
  59. only:
  60. - triggers
  61. - tags
  62. # Keep build directories so the rootfs can be an artifact of the job. The
  63. # runner will clean up those files for us.
  64. # Multiply every emulator timeout by 10 to avoid sporadic failures in
  65. # elastic runners.
  66. script: ./support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${CI_JOB_NAME}
  67. artifacts:
  68. when: always
  69. expire_in: 2 weeks
  70. paths:
  71. - test-output/*.log
  72. - test-output/*/.config
  73. - test-output/*/images/*