ci.yml 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. ---
  2. name: GitHub CI for 1.1.1
  3. on: [pull_request, push]
  4. # for some reason, this does not work:
  5. # variables:
  6. # BUILDOPTS: "-j4"
  7. # not implemented for v1.1.1: HARNESS_JOBS: "${HARNESS_JOBS:-4}"
  8. # for some reason, this does not work:
  9. # before_script:
  10. # - make="make -s"
  11. permissions:
  12. contents: read
  13. jobs:
  14. check_update:
  15. runs-on: ubuntu-latest
  16. steps:
  17. - uses: actions/checkout@v4
  18. with:
  19. fetch-depth: 0
  20. - name: config
  21. run: ./config --strict-warnings && perl configdata.pm --dump
  22. - name: make build_generated
  23. run: make -s build_generated
  24. - name: make update
  25. run: make update
  26. - name: git diff
  27. run: git diff --exit-code
  28. check_docs:
  29. runs-on: ubuntu-latest
  30. steps:
  31. - uses: actions/checkout@v4
  32. - name: config
  33. run: ./config --strict-warnings && perl configdata.pm --dump
  34. - name: make build_generated
  35. run: make -s build_generated
  36. - name: make doc-nits
  37. run: make doc-nits
  38. # This checks that we use ANSI C language syntax and semantics.
  39. # We are not as strict with libraries, but rather adapt to what's
  40. # expected to be available in a certain version of each platform.
  41. check-ansi:
  42. runs-on: ubuntu-latest
  43. steps:
  44. - uses: actions/checkout@v4
  45. - name: config
  46. run: CPPFLAGS=-ansi ./config no-asm no-makedepend enable-buildtest-c++ --strict-warnings -D_DEFAULT_SOURCE && perl configdata.pm --dump
  47. - name: make
  48. run: make -s -j4
  49. basic_gcc:
  50. runs-on: ubuntu-latest
  51. steps:
  52. - uses: actions/checkout@v4
  53. - name: config
  54. run: CC=gcc ./config --strict-warnings && perl configdata.pm --dump
  55. - name: make
  56. run: make -s -j4
  57. - name: make test
  58. run: make test
  59. basic_clang:
  60. runs-on: ubuntu-latest
  61. steps:
  62. - uses: actions/checkout@v4
  63. - name: config
  64. run: CC=clang ./config --strict-warnings && perl configdata.pm --dump
  65. - name: make
  66. run: make -s -j4
  67. - name: make test
  68. run: make test
  69. minimal:
  70. runs-on: ubuntu-latest
  71. steps:
  72. - uses: actions/checkout@v4
  73. - name: config
  74. run: ./config --strict-warnings no-shared no-dso no-pic no-aria no-async no-autoload-config no-blake2 no-bf no-camellia no-cast no-chacha no-cmac no-cms no-comp no-ct no-des no-dgram no-dh no-dsa no-dtls no-ec2m no-engine no-filenames no-gost no-idea no-mdc2 no-md4 no-multiblock no-nextprotoneg no-ocsp no-ocb no-poly1305 no-psk no-rc2 no-rc4 no-rmd160 no-seed no-siphash no-sm2 no-sm3 no-sm4 no-srp no-srtp no-ssl3 no-ssl3-method no-ts no-ui-console no-whirlpool no-asm -DOPENSSL_NO_SECURE_MEMORY -DOPENSSL_SMALL_FOOTPRINT && perl configdata.pm --dump
  75. - name: make
  76. run: make -j4 # verbose, so no -s here
  77. - name: make test
  78. run: make test
  79. no-deprecated:
  80. runs-on: ubuntu-latest
  81. steps:
  82. - uses: actions/checkout@v4
  83. - name: config
  84. run: ./config --strict-warnings no-deprecated && perl configdata.pm --dump
  85. - name: make
  86. run: make -s -j4
  87. - name: make test
  88. run: make test
  89. no-shared:
  90. strategy:
  91. matrix:
  92. os: [ ubuntu-latest, macos-latest ]
  93. runs-on: ${{matrix.os}}
  94. steps:
  95. - uses: actions/checkout@v4
  96. - name: config
  97. run: ./config --strict-warnings no-shared && perl configdata.pm --dump
  98. - name: make
  99. run: make -s -j4
  100. - name: make test
  101. run: make test
  102. address_ub_sanitizer:
  103. runs-on: ubuntu-latest
  104. steps:
  105. - uses: actions/checkout@v4
  106. - name: config
  107. run: ./config --debug enable-asan enable-ubsan enable-rc5 enable-md2 enable-ec_nistp_64_gcc_128 -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION && perl configdata.pm --dump
  108. - name: make
  109. run: make -s -j4
  110. - name: make test
  111. run: make test OPENSSL_TEST_RAND_ORDER=0
  112. # The memory sanitizer build is temporarily disabled as in 1.1.1 we do
  113. # not support running tests in parallel and this build configuration
  114. # requires more than 3h to run all tests sequentially.
  115. # memory_sanitizer:
  116. # runs-on: ubuntu-latest
  117. # steps:
  118. # - uses: actions/checkout@v4
  119. # - name: config
  120. # # --debug -O1 is to produce a debug build that runs in a reasonable amount of time
  121. # run: CC=clang ./config --debug -O1 -fsanitize=memory -DOSSL_SANITIZE_MEMORY -fno-optimize-sibling-calls enable-rc5 enable-md2 enable-ec_nistp_64_gcc_128 && perl configdata.pm --dump
  122. # - name: make
  123. # run: make -s -j4
  124. # - name: make test
  125. # run: make test
  126. threads_sanitizer:
  127. runs-on: ubuntu-latest
  128. steps:
  129. - uses: actions/checkout@v4
  130. - name: config
  131. run: CC=clang ./config --strict-warnings -fsanitize=thread && perl configdata.pm --dump
  132. - name: make
  133. run: make -s -j4
  134. - name: make test
  135. run: make TESTS=test_threads test
  136. enable_non-default_options:
  137. runs-on: ubuntu-latest
  138. steps:
  139. - uses: actions/checkout@v4
  140. - name: config
  141. run: ./config --strict-warnings no-ec enable-ssl-trace enable-zlib enable-zlib-dynamic enable-crypto-mdebug enable-crypto-mdebug-backtrace enable-egd && perl configdata.pm --dump
  142. - name: make
  143. run: make -s -j4
  144. - name: make test
  145. run: make test
  146. legacy:
  147. runs-on: ubuntu-latest
  148. steps:
  149. - uses: actions/checkout@v4
  150. - name: config
  151. run: ./config -Werror --debug no-afalgeng no-shared enable-crypto-mdebug enable-rc5 enable-md2 enable-ssl3 enable-ssl3-method enable-weak-ssl-ciphers enable-zlib enable-ec_nistp_64_gcc_128 && perl configdata.pm --dump
  152. - name: make
  153. run: make -s -j4
  154. - name: make test
  155. run: make test
  156. buildtest:
  157. runs-on: ubuntu-latest
  158. steps:
  159. - uses: actions/checkout@v4
  160. - name: config
  161. run: ./config no-asm no-makedepend enable-buildtest-c++ --strict-warnings -D_DEFAULT_SOURCE && perl configdata.pm --dump
  162. - name: make
  163. run: make -s -j4
  164. - name: make test
  165. run: make test
  166. out-of-tree_build:
  167. runs-on: ubuntu-latest
  168. steps:
  169. - uses: actions/checkout@v4
  170. - name: setup build dir
  171. run: |
  172. set -eux
  173. mkdir -p ${myblddir:=../_build/nest/a/little/more}
  174. echo "mysrcdir=$(realpath .)" | tee -a $GITHUB_ENV
  175. echo "myblddir=$(realpath $myblddir)" | tee -a $GITHUB_ENV
  176. - name: config
  177. run: set -eux ; cd ${{ env.myblddir }} && ${{ env.mysrcdir }}/config --strict-warnings && perl configdata.pm --dump
  178. - name: make build_generated
  179. run: set -eux; cd ${{ env.myblddir }} && make -s build_generated
  180. - name: make update
  181. run: set -eux; cd ${{ env.myblddir }} && make update
  182. - name: make
  183. run: set -eux; cd ${{ env.myblddir }} && make -s -j4
  184. - name: make test (minimal subset)
  185. run: set -eux; cd ${{ env.myblddir }} && make test TESTS='0[0-9]'
  186. out-of-source-and-install:
  187. strategy:
  188. matrix:
  189. os: [ubuntu-latest, macos-latest ]
  190. runs-on: ${{matrix.os}}
  191. steps:
  192. - uses: actions/checkout@v4
  193. - name: extra preparations
  194. run: |
  195. mkdir ./build
  196. mkdir ./install_dir
  197. - name: config
  198. run: ../config --strict-warnings --prefix=$(cd ../install_dir; pwd) && perl configdata.pm --dump
  199. working-directory: ./build
  200. - name: make
  201. run: make -s -j4
  202. working-directory: ./build
  203. - name: make test
  204. run: make test
  205. working-directory: ./build
  206. - name: make install
  207. run: make install
  208. working-directory: ./build
  209. external-tests:
  210. runs-on: ubuntu-latest
  211. steps:
  212. - uses: actions/checkout@v4
  213. with:
  214. submodules: recursive
  215. - name: package installs
  216. run: |
  217. sudo apt-get update
  218. sudo apt-get -yq install bison gettext keyutils ldap-utils libldap2-dev libkeyutils-dev python3 python3-paste python3-pyrad slapd tcsh python3-virtualenv virtualenv python3-kdcproxy
  219. - name: install cpanm and Test2::V0 for gost_engine testing
  220. uses: perl-actions/install-with-cpanm@v1
  221. with:
  222. install: Test2::V0
  223. - name: setup hostname workaround
  224. run: sudo hostname localhost
  225. - name: config
  226. run: ./config --strict-warnings --debug no-afalgeng enable-rc5 enable-md2 enable-ssl3 enable-ssl3-method enable-weak-ssl-ciphers enable-zlib enable-ec_nistp_64_gcc_128 enable-external-tests && perl configdata.pm --dump
  227. - name: make
  228. run: make -s -j4
  229. - name: test external gost-engine
  230. run: make test TESTS="test_external_gost_engine" VERBOSE=1
  231. # krb5 testing temporarily disabled due to failures to be investigated separately
  232. # - name: test external krb5
  233. # run: make test TESTS="test_external_krb5" VERBOSE=1
  234. external-test-pyca:
  235. runs-on: ubuntu-latest
  236. strategy:
  237. matrix:
  238. RUST:
  239. - 1.51.0
  240. PYTHON:
  241. - 3.9
  242. steps:
  243. - uses: actions/checkout@v4
  244. with:
  245. submodules: recursive
  246. - name: Configure OpenSSL
  247. run: ./config --strict-warnings --debug enable-external-tests && perl configdata.pm --dump
  248. - name: make
  249. run: make -s -j4
  250. - name: Setup Python
  251. uses: actions/setup-python@v4.3.0
  252. with:
  253. python-version: ${{ matrix.PYTHON }}
  254. - uses: actions-rs/toolchain@v1
  255. with:
  256. profile: minimal
  257. toolchain: ${{ matrix.RUST }}
  258. override: true
  259. default: true
  260. - name: test external pyca
  261. run: make test TESTS="test_external_pyca" VERBOSE=1