.gitlab-ci.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. # we utilize the images generated by the build-images project, to
  2. # speed up CI runs. We also use ccache and store config.cache
  3. # to speed up compilation. We include a version number in cache
  4. # name to allow expiration of old caches.
  5. cache:
  6. key: "$CI_JOB_NAME-ver1"
  7. paths:
  8. - cache/
  9. before_script:
  10. # CCache Config
  11. - mkdir -p cache
  12. - export CCACHE_BASEDIR="${PWD}"
  13. - export CCACHE_DIR="${PWD}/cache"
  14. - export CC="ccache gcc"
  15. after_script:
  16. # somehow after_script looses environment
  17. - export CCACHE_BASEDIR="${PWD}"
  18. - export CCACHE_DIR="${PWD}/cache"
  19. - ccache -s
  20. variables:
  21. BUILD_IMAGES_PROJECT: libmicrohttpd/build-images
  22. DEBIAN_BUILD: buildenv-debian-stretch
  23. MINGW_BUILD: buildenv-debian-mingw
  24. GET_SOURCES_ATTEMPTS: "3"
  25. CONFIGURE_BASE_FLAGS: --cache-file cache/config.cache
  26. CFLAGS_DEFAULT: ""
  27. # In this build we combine
  28. # * gcc
  29. # * check
  30. gcc/Stretch:
  31. image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_BUILD
  32. script:
  33. - export CFLAGS="$CFLAGS_DEFAULT"
  34. - ./bootstrap
  35. - ./configure $CONFIGURE_BASE_FLAGS --enable-build-type=debug --disable-sanitizers
  36. - make -j$(nproc) && make check
  37. artifacts:
  38. expire_in: 2 weeks
  39. when: on_failure
  40. paths:
  41. - ./*.log
  42. - src/*/*.log
  43. - src/*/*/*.log
  44. # In this build we combine
  45. # * clang
  46. # * ASan, UBSan
  47. # * check
  48. Sanitizers/Stretch:
  49. image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_BUILD
  50. script:
  51. - export CFLAGS="$CFLAGS_DEFAULT"
  52. - ./bootstrap
  53. - export CC="ccache clang"
  54. - export ASAN_SYMBOLIZER_PATH=/usr/lib/llvm-3.8/bin/llvm-symbolizer
  55. - ./configure $CONFIGURE_BASE_FLAGS --disable-doc --enable-build-type=debug --enable-sanitizers
  56. - make -j$(nproc) && make check
  57. artifacts:
  58. expire_in: 2 weeks
  59. when: on_failure
  60. paths:
  61. - ./*.log
  62. - src/*/*.log
  63. - src/*/*/*.log
  64. Scan-Build/Debian:
  65. image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_BUILD
  66. script:
  67. - export CFLAGS="$CFLAGS_DEFAULT"
  68. - export CC="clang-3.8"
  69. - ./bootstrap
  70. - scan-build --use-cc=clang-3.8 ./configure $CONFIGURE_BASE_FLAGS --enable-build-type=debug --disable-sanitizers
  71. - scan-build --use-cc="ccache clang-3.8" -v -enable-checker security,nullability --status-bugs -o scan-build make -j$(nproc)
  72. - scan-build --use-cc="ccache clang-3.8" -v -enable-checker security,nullability --status-bugs -o scan-build make -k check
  73. except:
  74. - tags
  75. artifacts:
  76. expire_in: 2 weeks
  77. when: on_failure
  78. paths:
  79. - scan-build/*
  80. MinGW/Debian:
  81. image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$MINGW_BUILD
  82. script:
  83. - export CFLAGS="$CFLAGS_DEFAULT"
  84. - export CC="ccache $PREFIX-gcc"
  85. - ./bootstrap
  86. - ./configure $CONFIGURE_BASE_FLAGS --build=x86_64-pc-linux-gnu --host=$PREFIX --enable-build-type=release
  87. - make -j$(nproc)
  88. dist/Stretch:
  89. image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_BUILD
  90. script:
  91. - export CFLAGS="$CFLAGS_DEFAULT"
  92. - ./bootstrap
  93. - ./configure $CONFIGURE_BASE_FLAGS --enable-build-type=release
  94. - make -j$(nproc) dist
  95. artifacts:
  96. name: "$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA"
  97. expire_in: 2 weeks
  98. when: on_success
  99. paths:
  100. - ./libmicrohttpd-*.*.*.tar.??