gitlab-ci.yml.in 3.5 KB

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