.gitlab-ci.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. variables:
  2. CCACHE_COMPILERCHECK: content
  3. CCACHE_DIR: "${CI_PROJECT_DIR}/.ccache"
  4. SAST_EXCLUDED_ANALYZERS: "bandit,semgrep"
  5. build:
  6. stage: build
  7. image: alpine:latest
  8. tags: [docker]
  9. before_script:
  10. - echo 'https://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories
  11. - apk update && apk add meson git python3 py3-flask lcov gcovr curl-dev libevent-dev spdlog-dev grep g++ cmake pkgconf openssl
  12. - ./scripts/run_tls_testserver.sh &
  13. - ./scripts/run_testserver.sh &
  14. script:
  15. - meson setup builddir -Db_coverage=true -Dtests=true -Dexamples=true
  16. - meson compile -C builddir
  17. - ./builddir/tests/requests_tls -d --reporters=junit --out=https.xml
  18. - ./builddir/tests/requests -d --reporters=junit --out=http.xml
  19. - ./builddir/examples/coeurl_example
  20. - ninja -C builddir coverage-text
  21. - grep TOTAL builddir/meson-logs/coverage.txt
  22. artifacts:
  23. reports:
  24. junit: http*.xml
  25. build-with-wraps:
  26. stage: build
  27. image: alpine:latest
  28. tags: [docker]
  29. before_script:
  30. - echo 'https://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories
  31. - apk update && apk add meson git python3 py3-flask g++ cmake pkgconf openssl openssl-dev make
  32. - ./scripts/run_tls_testserver.sh &
  33. - ./scripts/run_testserver.sh &
  34. script:
  35. - meson setup builddir -Dtests=true -Dexamples=true --wrap-mode=forcefallback -Ddefault_library=static
  36. - meson compile -C builddir
  37. - ./builddir/tests/requests_tls -d --reporters=junit --out=https.xml
  38. - ./builddir/tests/requests -d --reporters=junit --out=http.xml
  39. - ./builddir/examples/coeurl_example
  40. artifacts:
  41. reports:
  42. junit: http*.xml
  43. build-cmake:
  44. stage: build
  45. image: alpine:latest
  46. tags: [docker]
  47. before_script:
  48. - apk update && apk add git curl-dev libevent-dev spdlog-dev g++ cmake pkgconf openssl samurai
  49. script:
  50. - cmake -GNinja -S tests/ -B build
  51. - ninja -C build
  52. build-hunter:
  53. stage: build
  54. image: alpine:latest
  55. tags: [docker]
  56. before_script:
  57. - apk update && apk add git curl-dev libevent-dev spdlog-dev g++ cmake pkgconf openssl samurai perl make linux-headers
  58. script:
  59. - cmake -GNinja -S tests/ -B build -DHUNTER_ENABLED=ON
  60. - ninja -C build
  61. test-pages:
  62. stage: build
  63. tags: [docker]
  64. image: alpine
  65. except:
  66. - master
  67. needs: []
  68. before_script:
  69. - apk update
  70. - apk add doxygen git texlive-full py3-jinja2 py3-pygments
  71. - git clone https://github.com/mosra/m.css.git
  72. script:
  73. - ./m.css/documentation/doxygen.py Doxyfile-mcss
  74. - mv generated-docs/html/ public/
  75. artifacts:
  76. paths:
  77. - public
  78. pages:
  79. stage: build
  80. tags: [docker]
  81. image: alpine
  82. only:
  83. - master
  84. needs: []
  85. before_script:
  86. - apk update
  87. - apk add doxygen git texlive-full py3-jinja2 py3-pygments
  88. - git clone https://github.com/mosra/m.css.git
  89. script:
  90. - ./m.css/documentation/doxygen.py Doxyfile-mcss
  91. - mv generated-docs/html/ public/
  92. artifacts:
  93. paths:
  94. - public
  95. sast:
  96. stage: build
  97. tags: [docker]
  98. include:
  99. - template: Security/SAST.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml