gitlab-ci.yml.in 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. .check-check-package_base:
  2. script:
  3. - python3 -m pytest -v utils/checkpackagelib/
  4. .check-check-symbol_base:
  5. script:
  6. - python3 -m pytest -v utils/checksymbolslib/
  7. .check-DEVELOPERS_base:
  8. script:
  9. - utils/get-developers -v
  10. .check-flake8_base:
  11. script:
  12. - make check-flake8
  13. .check-package_base:
  14. script:
  15. - make check-package
  16. .check-symbol_base:
  17. script:
  18. - utils/check-symbols
  19. .defconfig_check:
  20. before_script:
  21. - DEFCONFIG_NAME=$(echo ${CI_JOB_NAME} | sed -e 's,_check$,,g')
  22. script:
  23. - echo "Configure Buildroot for ${DEFCONFIG_NAME}"
  24. - make ${DEFCONFIG_NAME}
  25. - support/scripts/check-dotconfig.py .config configs/${DEFCONFIG_NAME}
  26. artifacts:
  27. when: on_failure
  28. expire_in: 2 weeks
  29. paths:
  30. - .config
  31. .run_make: &run_make
  32. |
  33. make O=${OUTPUT_DIR} > >(tee build.log |grep '>>>') 2>&1 || {
  34. echo 'Failed build last output'
  35. tail -200 build.log
  36. exit 1
  37. }
  38. .defconfig_base:
  39. before_script:
  40. - DEFCONFIG_NAME=${CI_JOB_NAME}
  41. - OUTPUT_DIR=output
  42. script:
  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. before_script:
  67. - TEST_CASE_NAME=${CI_JOB_NAME}
  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. - echo "Starting runtime test ${TEST_CASE_NAME}"
  74. - ./support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${TEST_CASE_NAME}
  75. artifacts:
  76. when: always
  77. expire_in: 2 weeks
  78. paths:
  79. - test-output/*.log
  80. - test-output/*/.config
  81. - test-output/*/images/*
  82. .test_pkg:
  83. stage: build
  84. before_script:
  85. - OUTPUT_DIR=${CI_JOB_NAME}
  86. script:
  87. - echo "Configure Buildroot for ${OUTPUT_DIR}"
  88. - make O=${OUTPUT_DIR} syncconfig
  89. - make O=${OUTPUT_DIR} savedefconfig
  90. - echo 'Build buildroot'
  91. - *run_make
  92. needs:
  93. - pipeline: $PARENT_PIPELINE_ID
  94. job: generate-gitlab-ci-yml
  95. artifacts:
  96. when: always
  97. expire_in: 2 weeks
  98. paths:
  99. - build.log
  100. - br-test-pkg/*/.config
  101. - br-test-pkg/*/defconfig
  102. - br-test-pkg/*/build/build-time.log
  103. - br-test-pkg/*/build/packages-file-list*.txt