gitlab-ci.yml.in 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. artifacts:
  52. when: always
  53. expire_in: 2 weeks
  54. paths:
  55. - .config
  56. - build.log
  57. - output/images/
  58. - output/build/build-time.log
  59. - output/build/packages-file-list.txt
  60. - output/build/*/.config
  61. - runtime-test.log
  62. .runtime_test_base:
  63. # Keep build directories so the rootfs can be an artifact of the job. The
  64. # runner will clean up those files for us.
  65. # Multiply every emulator timeout by 10 to avoid sporadic failures in
  66. # elastic runners.
  67. script:
  68. - TEST_CASE_NAME=${CI_JOB_NAME}
  69. - echo "Starting runtime test ${TEST_CASE_NAME}"
  70. - ./support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${TEST_CASE_NAME}
  71. artifacts:
  72. when: always
  73. expire_in: 2 weeks
  74. paths:
  75. - test-output/*.log
  76. - test-output/*/.config
  77. - test-output/*/images/*
  78. .test_pkg:
  79. stage: build
  80. script:
  81. - OUTPUT_DIR=${CI_JOB_NAME}
  82. - echo "Configure Buildroot for ${OUTPUT_DIR}"
  83. - make O=${OUTPUT_DIR} syncconfig
  84. - make O=${OUTPUT_DIR} savedefconfig
  85. - echo 'Build buildroot'
  86. - *run_make
  87. needs:
  88. - pipeline: $PARENT_PIPELINE_ID
  89. job: generate-gitlab-ci-yml
  90. artifacts:
  91. when: always
  92. expire_in: 2 weeks
  93. paths:
  94. - build.log
  95. - br-test-pkg/*/.config
  96. - br-test-pkg/*/defconfig
  97. - br-test-pkg/*/build/build-time.log
  98. - br-test-pkg/*/build/packages-file-list*.txt