gitlab-ci.yml.in 3.2 KB

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