.gitlab-ci.yml 3.4 KB

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