gitlab-ci.yml.in 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. before_script:
  2. - git config --global --add safe.directory ${CI_PROJECT_DIR}
  3. .check-check-package_base:
  4. script:
  5. - python3 -m pytest -v utils/checkpackagelib/
  6. .check-check-symbol_base:
  7. script:
  8. - python3 -m pytest -v utils/checksymbolslib/
  9. .check-DEVELOPERS_base:
  10. script:
  11. - utils/get-developers -v
  12. .check-package_base:
  13. script:
  14. - make check-package
  15. .check-symbol_base:
  16. script:
  17. - utils/check-symbols
  18. .defconfig_check:
  19. script:
  20. - DEFCONFIG_NAME=$(echo ${CI_JOB_NAME} | sed -e 's,_check$,,g')
  21. - echo "Configure Buildroot for ${DEFCONFIG_NAME}"
  22. - make ${DEFCONFIG_NAME}
  23. - support/scripts/check-dotconfig.py .config configs/${DEFCONFIG_NAME}
  24. artifacts:
  25. when: on_failure
  26. expire_in: 2 weeks
  27. paths:
  28. - .config
  29. .run_make: &run_make
  30. |
  31. make O=${OUTPUT_DIR} > >(tee build.log |grep '>>>') 2>&1 || {
  32. echo 'Failed build last output'
  33. tail -200 build.log
  34. exit 1
  35. }
  36. .defconfig_base:
  37. script:
  38. - DEFCONFIG_NAME=${CI_JOB_NAME}
  39. - OUTPUT_DIR=output
  40. - echo "Configure Buildroot for ${DEFCONFIG_NAME}"
  41. - make ${DEFCONFIG_NAME}
  42. - ./support/scripts/check-dotconfig.py .config ./configs/${DEFCONFIG_NAME}
  43. - echo 'Build buildroot'
  44. - *run_make
  45. - |
  46. ./support/scripts/boot-qemu-image.py "${DEFCONFIG_NAME}" > >(tee runtime-test.log) 2>&1 || {
  47. echo 'Failed runtime test last output'
  48. tail -200 runtime-test.log
  49. exit 1
  50. }
  51. retry:
  52. max: 2
  53. when:
  54. - runner_system_failure
  55. - stuck_or_timeout_failure
  56. artifacts:
  57. when: always
  58. expire_in: 2 weeks
  59. paths:
  60. - .config
  61. - build.log
  62. - output/images/
  63. - output/build/build-time.log
  64. - output/build/packages-file-list.txt
  65. - output/build/*/.config
  66. - runtime-test.log
  67. .runtime_test_base:
  68. # Keep build directories so the rootfs can be an artifact of the job. The
  69. # runner will clean up those files for us.
  70. # Multiply every emulator timeout by 10 to avoid sporadic failures in
  71. # elastic runners.
  72. script:
  73. - TEST_CASE_NAME=${CI_JOB_NAME}
  74. - echo "Starting runtime test ${TEST_CASE_NAME}"
  75. - ./support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${TEST_CASE_NAME}
  76. retry:
  77. max: 2
  78. when:
  79. - runner_system_failure
  80. - stuck_or_timeout_failure
  81. artifacts:
  82. when: always
  83. expire_in: 2 weeks
  84. paths:
  85. - test-output/*.log
  86. - test-output/*/.config
  87. - test-output/*/images/*
  88. .test_pkg:
  89. stage: build
  90. script:
  91. - OUTPUT_DIR=${CI_JOB_NAME}
  92. - echo "Configure Buildroot for ${OUTPUT_DIR}"
  93. - make O=${OUTPUT_DIR} syncconfig
  94. - make O=${OUTPUT_DIR} savedefconfig
  95. - echo 'Build buildroot'
  96. - *run_make
  97. needs:
  98. - pipeline: $PARENT_PIPELINE_ID
  99. job: generate-gitlab-ci-yml
  100. retry:
  101. max: 2
  102. when:
  103. - runner_system_failure
  104. - stuck_or_timeout_failure
  105. artifacts:
  106. when: always
  107. expire_in: 2 weeks
  108. paths:
  109. - build.log
  110. - br-test-pkg/*/.config
  111. - br-test-pkg/*/defconfig
  112. - br-test-pkg/*/build/build-time.log
  113. - br-test-pkg/*/build/packages-file-list*.txt