.gitlab-ci.yml.in 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. - /-defconfigs$/
  48. script: *defconfig_script
  49. artifacts:
  50. when: always
  51. expire_in: 2 weeks
  52. paths:
  53. - .config
  54. - build.log
  55. - output/images/
  56. - output/build/build-time.log
  57. - output/build/packages-file-list.txt
  58. - output/build/*/.config
  59. .runtime_test: &runtime_test
  60. # Running the runtime tests for every push is too much, so limit to
  61. # explicit triggers through the API.
  62. only:
  63. - triggers
  64. - tags
  65. - /-runtime-tests$/
  66. # Keep build directories so the rootfs can be an artifact of the job. The
  67. # runner will clean up those files for us.
  68. # Multiply every emulator timeout by 10 to avoid sporadic failures in
  69. # elastic runners.
  70. script: ./support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${CI_JOB_NAME}
  71. artifacts:
  72. when: always
  73. expire_in: 2 weeks
  74. paths:
  75. - test-output/*.log
  76. - test-output/*/.config
  77. - test-output/*/images/*