gitlab-ci.yml.in 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. .check-DEVELOPERS_base:
  2. # get-developers should print just "No action specified"; if it prints
  3. # anything else, it's a parse error.
  4. # The initial ! is removed by YAML so we need to quote it.
  5. script:
  6. - "! utils/get-developers | grep -v 'No action specified'"
  7. .check-flake8_base:
  8. script:
  9. - make check-flake8
  10. .check-package_base:
  11. script:
  12. - make check-package
  13. .defconfig_check:
  14. before_script:
  15. - DEFCONFIG_NAME=$(echo ${CI_JOB_NAME} | sed -e 's,_check$,,g')
  16. script:
  17. - echo "Configure Buildroot for ${DEFCONFIG_NAME}"
  18. - make ${DEFCONFIG_NAME}
  19. - support/scripts/check-dotconfig.py .config configs/${DEFCONFIG_NAME}
  20. artifacts:
  21. when: on_failure
  22. expire_in: 2 weeks
  23. paths:
  24. - .config
  25. .run_make: &run_make
  26. |
  27. make O=${OUTPUT_DIR} > >(tee build.log |grep '>>>') 2>&1 || {
  28. echo 'Failed build last output'
  29. tail -200 build.log
  30. exit 1
  31. }
  32. .defconfig_base:
  33. before_script:
  34. - DEFCONFIG_NAME=${CI_JOB_NAME}
  35. - OUTPUT_DIR=output
  36. script:
  37. - echo "Configure Buildroot for ${DEFCONFIG_NAME}"
  38. - make ${DEFCONFIG_NAME}
  39. - ./support/scripts/check-dotconfig.py .config ./configs/${DEFCONFIG_NAME}
  40. - echo 'Build buildroot'
  41. - *run_make
  42. - |
  43. ./support/scripts/boot-qemu-image.py "${DEFCONFIG_NAME}" > >(tee runtime-test.log) 2>&1 || {
  44. echo 'Failed runtime test last output'
  45. tail -200 runtime-test.log
  46. exit 1
  47. }
  48. artifacts:
  49. when: always
  50. expire_in: 2 weeks
  51. paths:
  52. - .config
  53. - build.log
  54. - output/images/
  55. - output/build/build-time.log
  56. - output/build/packages-file-list.txt
  57. - output/build/*/.config
  58. - runtime-test.log
  59. .runtime_test_base:
  60. before_script:
  61. - TEST_CASE_NAME=${CI_JOB_NAME}
  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:
  67. - echo "Starting runtime test ${TEST_CASE_NAME}"
  68. - ./support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${TEST_CASE_NAME}
  69. artifacts:
  70. when: always
  71. expire_in: 2 weeks
  72. paths:
  73. - test-output/*.log
  74. - test-output/*/.config
  75. - test-output/*/images/*
  76. .test_pkg:
  77. stage: build
  78. before_script:
  79. - OUTPUT_DIR=${CI_JOB_NAME}
  80. script:
  81. - echo "Configure Buildroot for ${OUTPUT_DIR}"
  82. - make O=${OUTPUT_DIR} syncconfig
  83. - make O=${OUTPUT_DIR} savedefconfig
  84. - echo 'Build buildroot'
  85. - *run_make
  86. needs:
  87. - pipeline: $PARENT_PIPELINE_ID
  88. job: generate-gitlab-ci-yml
  89. artifacts:
  90. when: always
  91. expire_in: 2 weeks
  92. paths:
  93. - build.log
  94. - br-test-pkg/*/.config
  95. - br-test-pkg/*/defconfig
  96. - br-test-pkg/*/build/build-time.log
  97. - br-test-pkg/*/build/packages-file-list*.txt