1 # Copyright 2021-2022 The OpenSSL Project Authors. All Rights Reserved.
3 # Licensed under the Apache License 2.0 (the "License"). You may not use
4 # this file except in compliance with the License. You can obtain a copy
5 # in the file LICENSE in the source distribution or at
6 # https://www.openssl.org/source/license.html
10 on: [pull_request, push]
12 # for some reason, this does not work:
15 # HARNESS_JOBS: "${HARNESS_JOBS:-4}"
17 # for some reason, this does not work:
26 runs-on: ubuntu-latest
28 - name: install unifdef
31 sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install unifdef
32 - uses: actions/checkout@v3
36 run: ./config --banner=Configured --strict-warnings enable-fips && perl configdata.pm --dump
37 - name: make build_generated
38 run: make -s build_generated
42 run: git diff --exit-code
45 runs-on: ubuntu-latest
47 - uses: actions/checkout@v3
49 run: ./config --banner=Configured --strict-warnings enable-fips && perl configdata.pm --dump
50 - name: make build_generated
51 run: make -s build_generated
61 # This checks that we use ANSI C language syntax and semantics.
62 # We are not as strict with libraries, but rather adapt to what's
63 # expected to be available in a certain version of each platform.
65 runs-on: ubuntu-latest
67 - uses: actions/checkout@v3
69 run: CPPFLAGS=-ansi ./config --banner=Configured no-asm no-makedepend enable-buildtest-c++ enable-fips --strict-warnings -D_DEFAULT_SOURCE && perl configdata.pm --dump
74 runs-on: ubuntu-latest
76 - uses: actions/checkout@v3
77 - name: checkout fuzz/corpora submodule
78 run: git submodule update --init --depth 1 fuzz/corpora
80 run: sudo locale-gen tr_TR.UTF-8
82 # enable-quic is on by default, but we leave it here to check we're testing the explicit enable somewhere
83 run: CC=gcc ./config --banner=Configured enable-fips enable-quic --strict-warnings && perl configdata.pm --dump
87 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
90 runs-on: ubuntu-latest
92 - uses: actions/checkout@v3
93 - name: checkout fuzz/corpora submodule
94 run: git submodule update --init --depth 1 fuzz/corpora
96 run: CC=clang ./config --banner=Configured no-fips --strict-warnings && perl configdata.pm --dump
100 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
103 runs-on: ubuntu-latest
105 - uses: actions/checkout@v3
106 - name: checkout fuzz/corpora submodule
107 run: git submodule update --init --depth 1 fuzz/corpora
109 run: ./config --banner=Configured --strict-warnings no-bulk no-pic no-asm -DOPENSSL_NO_SECURE_MEMORY -DOPENSSL_SMALL_FOOTPRINT && perl configdata.pm --dump
111 run: make -j4 # verbose, so no -s here
113 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
116 runs-on: ubuntu-latest
118 - uses: actions/checkout@v3
119 - name: checkout fuzz/corpora submodule
120 run: git submodule update --init --depth 1 fuzz/corpora
122 run: ./config --banner=Configured --strict-warnings no-deprecated enable-fips && perl configdata.pm --dump
126 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
131 os: [ ubuntu-latest, macos-latest ]
132 runs-on: ${{matrix.os}}
134 - uses: actions/checkout@v3
135 - name: checkout fuzz/corpora submodule
136 run: git submodule update --init --depth 1 fuzz/corpora
138 run: ./config --banner=Configured --strict-warnings no-shared no-fips && perl configdata.pm --dump
142 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
145 runs-on: ubuntu-latest
147 - uses: actions/checkout@v3
148 - name: checkout fuzz/corpora submodule
149 run: git submodule update --init --depth 1 fuzz/corpora
151 run: ./config --banner=Configured --debug enable-asan enable-ubsan no-cached-fetch no-fips no-dtls no-tls1 no-tls1-method no-tls1_1 no-tls1_1-method no-async && perl configdata.pm --dump
155 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0 TESTS="-test_fuzz* -test_ssl_* -test_sslapi -test_evp -test_cmp_http -test_verify -test_cms -test_store -test_enc -[01][0-9]"
157 address_ub_sanitizer:
158 runs-on: ubuntu-latest
160 - uses: actions/checkout@v3
161 - name: checkout fuzz/corpora submodule
162 run: git submodule update --init --depth 1 fuzz/corpora
164 run: ./config --banner=Configured --debug enable-asan enable-ubsan enable-rc5 enable-md2 enable-ec_nistp_64_gcc_128 enable-fips -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION && perl configdata.pm --dump
168 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0
171 runs-on: ubuntu-latest
173 - uses: actions/checkout@v3
174 - name: checkout fuzz/corpora submodule
175 run: git submodule update --init --depth 1 fuzz/corpora
177 # --debug -O1 is to produce a debug build that runs in a reasonable amount of time
178 run: CC=clang ./config --banner=Configured --debug -O1 -fsanitize=memory -DOSSL_SANITIZE_MEMORY -fno-optimize-sibling-calls enable-rc5 enable-md2 enable-ec_nistp_64_gcc_128 enable-fips && perl configdata.pm --dump
182 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0
185 runs-on: ubuntu-latest
187 - uses: actions/checkout@v3
188 - name: checkout fuzz/corpora submodule
189 run: git submodule update --init --depth 1 fuzz/corpora
191 run: CC=clang ./config --banner=Configured no-fips --strict-warnings -fsanitize=thread && perl configdata.pm --dump
195 run: make V=1 TESTS="test_threads test_internal_provider test_provfetch test_provider test_pbe test_evp_kdf test_pkcs12 test_store test_evp test_quic*" test HARNESS_JOBS=${HARNESS_JOBS:-4}
197 enable_non-default_options:
198 runs-on: ubuntu-latest
200 - uses: actions/checkout@v3
201 - name: checkout fuzz/corpora submodule
202 run: git submodule update --init --depth 1 fuzz/corpora
204 run: sudo modprobe tls
206 run: ./config --banner=Configured --strict-warnings no-ec enable-ssl-trace enable-zlib enable-zlib-dynamic enable-crypto-mdebug enable-crypto-mdebug-backtrace enable-egd enable-ktls enable-fips no-threads && perl configdata.pm --dump
210 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
213 runs-on: ubuntu-latest
215 - uses: actions/checkout@v3
216 - name: checkout fuzz/corpora submodule
217 run: git submodule update --init --depth 1 fuzz/corpora
219 run: sudo modprobe tls
221 run: ./config --banner=Configured --strict-warnings enable-ktls enable-fips && perl configdata.pm --dump
225 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
227 enable_brotli_dynamic:
228 runs-on: ubuntu-latest
230 - name: install brotli
233 sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install brotli libbrotli1 libbrotli-dev
234 - name: checkout openssl
235 uses: actions/checkout@v3
236 - name: checkout fuzz/corpora submodule
237 run: git submodule update --init --depth 1 fuzz/corpora
239 run: ./config enable-comp enable-brotli enable-brotli-dynamic && perl configdata.pm --dump
243 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
246 runs-on: ubuntu-latest
251 sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install zstd libzstd1 libzstd-dev
252 - name: checkout openssl
253 uses: actions/checkout@v3
254 - name: checkout fuzz/corpora submodule
255 run: git submodule update --init --depth 1 fuzz/corpora
257 run: ./config enable-comp enable-zstd enable-zstd-dynamic && perl configdata.pm --dump
261 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
263 enable_brotli_and_zstd_dynamic:
264 runs-on: ubuntu-latest
266 - name: install brotli and zstd
269 sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install brotli libbrotli1 libbrotli-dev
270 sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install zstd libzstd1 libzstd-dev
271 - name: checkout openssl
272 uses: actions/checkout@v3
273 - name: checkout fuzz/corpora submodule
274 run: git submodule update --init --depth 1 fuzz/corpora
276 run: ./config enable-comp enable-brotli enable-brotli-dynamic enable-zstd enable-zstd-dynamic && perl configdata.pm --dump
280 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
282 enable_brotli_and_asan_ubsan:
283 runs-on: ubuntu-latest
285 - name: install brotli
288 sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install brotli libbrotli1 libbrotli-dev
289 - name: checkout openssl
290 uses: actions/checkout@v3
291 - name: checkout fuzz/corpora submodule
292 run: git submodule update --init --depth 1 fuzz/corpora
294 run: ./config --banner=Configured --debug enable-asan enable-ubsan enable-comp enable-brotli -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -DPEDANTIC && perl configdata.pm --dump
298 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0
300 enable_zstd_and_asan_ubsan:
301 runs-on: ubuntu-latest
306 sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install zstd libzstd1 libzstd-dev
307 - name: checkout openssl
308 uses: actions/checkout@v3
309 - name: checkout fuzz/corpora submodule
310 run: git submodule update --init --depth 1 fuzz/corpora
312 run: ./config --banner=Configured --debug enable-asan enable-ubsan enable-comp enable-zstd -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -DPEDANTIC && perl configdata.pm --dump
316 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0
319 runs-on: ubuntu-latest
321 - uses: actions/checkout@v3
322 - name: checkout fuzz/corpora submodule
323 run: git submodule update --init --depth 1 fuzz/corpora
325 run: ./config --banner=Configured --strict-warnings no-legacy enable-fips && perl configdata.pm --dump
329 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
332 runs-on: ubuntu-latest
334 - uses: actions/checkout@v3
335 - name: checkout fuzz/corpora submodule
336 run: git submodule update --init --depth 1 fuzz/corpora
338 run: ./config --banner=Configured -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 no-fips && perl configdata.pm --dump
342 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
347 os: [ ubuntu-latest, macos-latest ]
348 runs-on: ${{matrix.os}}
350 - uses: actions/checkout@v3
351 - name: checkout fuzz/corpora submodule
352 run: git submodule update --init --depth 1 fuzz/corpora
354 run: CC=gcc ./config --banner=Configured enable-tfo --strict-warnings && perl configdata.pm --dump
358 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
361 runs-on: ubuntu-latest
363 - uses: actions/checkout@v3
364 - name: checkout fuzz/corpora submodule
365 run: git submodule update --init --depth 1 fuzz/corpora
367 run: ./config --banner=Configured no-asm no-makedepend enable-buildtest-c++ enable-fips --strict-warnings -D_DEFAULT_SOURCE && perl configdata.pm --dump
371 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
373 out-of-source-and-install:
376 os: [ubuntu-latest, macos-latest ]
377 runs-on: ${{matrix.os}}
379 - uses: actions/checkout@v3
380 - name: checkout fuzz/corpora submodule
381 run: git submodule update --init --depth 1 fuzz/corpora
382 - name: extra preparations
387 run: ../config --banner=Configured enable-fips enable-acvp-tests --strict-warnings --prefix=$(cd ../install; pwd) && perl configdata.pm --dump
388 working-directory: ./build
391 working-directory: ./build
393 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
394 working-directory: ./build
397 working-directory: ./build
400 runs-on: ubuntu-latest
402 - uses: actions/checkout@v3
404 submodules: recursive
405 - name: package installs
408 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
409 - name: install cpanm and Test2::V0 for gost_engine testing
410 uses: perl-actions/install-with-cpanm@v1
413 - name: setup hostname workaround
414 run: sudo hostname localhost
416 run: ./config --banner=Configured --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 no-fips && perl configdata.pm --dump
419 - name: test external gost-engine
420 run: make test TESTS="test_external_gost_engine"
421 - name: test external krb5
422 run: make test TESTS="test_external_krb5"
423 - name: test external_tlsfuzzer
424 run: make test TESTS="test_external_tlsfuzzer"
425 - name: test external oqs-provider
426 run: make test TESTS="test_external_oqsprovider"
429 runs-on: ubuntu-latest
437 - uses: actions/checkout@v3
439 submodules: recursive
440 - name: Configure OpenSSL
441 run: ./config --banner=Configured --strict-warnings --debug enable-external-tests && perl configdata.pm --dump
445 uses: actions/setup-python@v4.7.0
447 python-version: ${{ matrix.PYTHON }}
448 - uses: actions-rs/toolchain@v1
451 toolchain: ${{ matrix.RUST }}
454 - name: test external pyca
455 run: make test TESTS="test_external_pyca" VERBOSE=1
457 external-test-cf-quiche:
458 runs-on: ubuntu-latest
460 - uses: actions/checkout@v3
462 submodules: recursive
463 - name: Configure OpenSSL
464 run: ./config --banner=Configured --strict-warnings enable-external-tests && perl configdata.pm --dump
467 - uses: actions-rs/toolchain@v1
472 - name: test external Cloudflare quiche
473 run: make test TESTS="test_external_cf_quiche" VERBOSE=1