gitlab-ci.yml.in 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. .check-check-package_base:
  2. script:
  3. - python3 -m pytest -v utils/checkpackagelib/
  4. .check-DEVELOPERS_base:
  5. # get-developers should print just "No action specified"; if it prints
  6. # anything else, it's a parse error.
  7. # The initial ! is removed by YAML so we need to quote it.
  8. script:
  9. - "! utils/get-developers | grep -v 'No action specified'"
  10. .check-flake8_base:
  11. script:
  12. - make check-flake8
  13. .check-package_base:
  14. script:
  15. - make check-package
  16. .defconfig_check:
  17. before_script:
  18. - DEFCONFIG_NAME=$(echo ${CI_JOB_NAME} | sed -e 's,_check$,,g')
  19. script:
  20. - echo "Configure Buildroot for ${DEFCONFIG_NAME}"
  21. - make ${DEFCONFIG_NAME}
  22. - support/scripts/check-dotconfig.py .config configs/${DEFCONFIG_NAME}
  23. artifacts:
  24. when: on_failure
  25. expire_in: 2 weeks
  26. paths:
  27. - .config
  28. .run_make: &run_make
  29. |
  30. make O=${OUTPUT_DIR} > >(tee build.log |grep '>>>') 2>&1 || {
  31. echo 'Failed build last output'
  32. tail -200 build.log
  33. exit 1
  34. }
  35. .defconfig_base:
  36. before_script:
  37. - DEFCONFIG_NAME=${CI_JOB_NAME}
  38. - OUTPUT_DIR=output
  39. script:
  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. before_script:
  64. - TEST_CASE_NAME=${CI_JOB_NAME}
  65. # Keep build directories so the rootfs can be an artifact of the job. The
  66. # runner will clean up those files for us.
  67. # Multiply every emulator timeout by 10 to avoid sporadic failures in
  68. # elastic runners.
  69. script:
  70. - echo "Starting runtime test ${TEST_CASE_NAME}"
  71. - ./support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${TEST_CASE_NAME}
  72. artifacts:
  73. when: always
  74. expire_in: 2 weeks
  75. paths:
  76. - test-output/*.log
  77. - test-output/*/.config
  78. - test-output/*/images/*
  79. .test_pkg:
  80. stage: build
  81. before_script:
  82. - OUTPUT_DIR=${CI_JOB_NAME}
  83. script:
  84. - echo "Configure Buildroot for ${OUTPUT_DIR}"
  85. - make O=${OUTPUT_DIR} syncconfig
  86. - make O=${OUTPUT_DIR} savedefconfig
  87. - echo 'Build buildroot'
  88. - *run_make
  89. needs:
  90. - pipeline: $PARENT_PIPELINE_ID
  91. job: generate-gitlab-ci-yml
  92. artifacts:
  93. when: always
  94. expire_in: 2 weeks
  95. paths:
  96. - build.log
  97. - br-test-pkg/*/.config
  98. - br-test-pkg/*/defconfig
  99. - br-test-pkg/*/build/build-time.log
  100. - br-test-pkg/*/build/packages-file-list*.txt