.gitlab-ci.yml.in 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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:20180205.0730
  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-package:
  29. script:
  30. - find . -type f \( -name '*.mk' -o -name '*.hash' \) -exec ./utils/check-package {} +
  31. .defconfig: &defconfig
  32. # Running the defconfigs for every push is too much, so limit to
  33. # explicit triggers through the API.
  34. only:
  35. - triggers
  36. - tags
  37. script: *defconfig_script
  38. artifacts:
  39. when: always
  40. expire_in: 2 weeks
  41. paths:
  42. - build.log
  43. - output/images/
  44. - output/build/build-time.log
  45. - output/build/packages-file-list.txt
  46. .runtime_test: &runtime_test
  47. # Keep build directories so the rootfs can be an artifact of the job. The
  48. # runner will clean up those files for us.
  49. # Multiply every emulator timeout by 10 to avoid sporadic failures in
  50. # elastic runners.
  51. script: ./support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${CI_JOB_NAME}
  52. artifacts:
  53. when: always
  54. expire_in: 2 weeks
  55. paths:
  56. - test-output/*.log
  57. - test-output/*/.config
  58. - test-output/*/images/*