.gitlab-ci.yml.in 2.7 KB

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