1 # Copyright 2021-2023 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@v4
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@v4
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@v4
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@v4
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
89 ./util/opensslwrap.sh version -c
91 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
94 runs-on: ubuntu-latest
96 - uses: actions/checkout@v4
97 - name: checkout fuzz/corpora submodule
98 run: git submodule update --init --depth 1 fuzz/corpora
100 run: CC=clang ./config --banner=Configured no-fips --strict-warnings && perl configdata.pm --dump
106 ./util/opensslwrap.sh version -c
108 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
111 runs-on: ubuntu-latest
113 - uses: actions/checkout@v4
114 - name: checkout fuzz/corpora submodule
115 run: git submodule update --init --depth 1 fuzz/corpora
117 run: ./config --banner=Configured --strict-warnings no-bulk no-pic no-asm -DOPENSSL_NO_SECURE_MEMORY -DOPENSSL_SMALL_FOOTPRINT && perl configdata.pm --dump
119 run: make -j4 # verbose, so no -s here
123 ./util/opensslwrap.sh version -c
125 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
128 runs-on: ubuntu-latest
130 - uses: actions/checkout@v4
131 - name: checkout fuzz/corpora submodule
132 run: git submodule update --init --depth 1 fuzz/corpora
134 run: ./config --banner=Configured --strict-warnings no-deprecated enable-fips && perl configdata.pm --dump
140 ./util/opensslwrap.sh version -c
142 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
147 os: [ ubuntu-latest, macos-latest ]
148 runs-on: ${{matrix.os}}
150 - uses: actions/checkout@v4
151 - name: checkout fuzz/corpora submodule
152 run: git submodule update --init --depth 1 fuzz/corpora
154 run: ./config --banner=Configured --strict-warnings no-shared no-fips && perl configdata.pm --dump
158 run: ./util/opensslwrap.sh version -c
160 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
163 runs-on: ubuntu-latest
165 - uses: actions/checkout@v4
166 - name: checkout fuzz/corpora submodule
167 run: git submodule update --init --depth 1 fuzz/corpora
169 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
175 ./util/opensslwrap.sh version -c
177 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]"
179 address_ub_sanitizer:
180 runs-on: ubuntu-latest
182 - uses: actions/checkout@v4
183 - name: checkout fuzz/corpora submodule
184 run: git submodule update --init --depth 1 fuzz/corpora
186 run: ./config --banner=Configured --debug enable-asan enable-ubsan enable-rc5 enable-md2 enable-ec_nistp_64_gcc_128 enable-fips && perl configdata.pm --dump
192 ./util/opensslwrap.sh version -c
194 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0
197 runs-on: ubuntu-latest
199 - uses: actions/checkout@v4
200 - name: checkout fuzz/corpora submodule
201 run: git submodule update --init --depth 1 fuzz/corpora
203 run: ./config --banner=Configured --debug -DPEDANTIC -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION enable-asan enable-ubsan enable-rc5 enable-md2 enable-ec_nistp_64_gcc_128 enable-weak-ssl-ciphers enable-ssl3 enable-ssl3-method enable-nextprotoneg && perl configdata.pm --dump
209 ./util/opensslwrap.sh version -c
211 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0 TESTS="test_fuzz*"
214 runs-on: ubuntu-latest
216 - uses: actions/checkout@v4
217 - name: checkout fuzz/corpora submodule
218 run: git submodule update --init --depth 1 fuzz/corpora
220 # --debug -O1 is to produce a debug build that runs in a reasonable amount of time
221 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
227 ./util/opensslwrap.sh version -c
229 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0
232 runs-on: ubuntu-latest
234 - uses: actions/checkout@v4
235 - name: checkout fuzz/corpora submodule
236 run: git submodule update --init --depth 1 fuzz/corpora
238 run: CC=clang ./config --banner=Configured no-fips --strict-warnings -fsanitize=thread && perl configdata.pm --dump
244 ./util/opensslwrap.sh version -c
246 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}
248 enable_non-default_options:
249 runs-on: ubuntu-latest
251 - uses: actions/checkout@v4
252 - name: checkout fuzz/corpora submodule
253 run: git submodule update --init --depth 1 fuzz/corpora
255 run: sudo modprobe tls
257 run: ./config --banner=Configured --strict-warnings no-ec enable-ssl-trace enable-zlib enable-zlib-dynamic enable-crypto-mdebug enable-egd enable-ktls enable-fips no-threads && perl configdata.pm --dump
263 ./util/opensslwrap.sh version -c
265 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
268 runs-on: ubuntu-latest
270 - uses: actions/checkout@v4
271 - name: checkout fuzz/corpora submodule
272 run: git submodule update --init --depth 1 fuzz/corpora
274 run: sudo modprobe tls
276 run: sudo modprobe sctp
277 - name: Enable auth in sctp
278 run: sudo sysctl -w net.sctp.auth_enable=1
279 - name: install extra config support
280 run: sudo apt-get -y install libsctp-dev abigail-tools libzstd-dev zstd
282 run: ./config --banner=Configured -g --strict-warnings enable-ktls enable-fips enable-egd enable-ec_nistp_64_gcc_128 enable-md2 enable-rc5 enable-sctp enable-ssl3 enable-ssl3-method enable-trace enable-zlib enable-zstd && perl configdata.pm --dump
288 ./util/opensslwrap.sh version -c
289 - name: Check ABI compatibility for libcrypto
291 if ! abidiff ./.github/workflows/libcrypto-abi.xml ./libcrypto.so ; then
292 abidw --out-file libcrypto-abi-new.xml ./libcrypto.so
293 diff -u ./.github/workflows/libcrypto-abi.xml libcrypto-abi-new.xml
295 - name: Check ABI compatibility for libssl
297 if ! abidiff ./.github/workflows/libssl-abi.xml ./libssl.so ; then
298 abidw --out-file libssl-abi-new.xml ./libssl.so
299 diff -u ./.github/workflows/libssl-abi.xml libssl-abi-new.xml
302 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
305 runs-on: ubuntu-latest
307 - uses: actions/checkout@v4
308 - name: checkout fuzz/corpora submodule
309 run: git submodule update --init --depth 1 fuzz/corpora
311 run: ./config --banner=Configured --strict-warnings no-legacy enable-fips && perl configdata.pm --dump
317 ./util/opensslwrap.sh version -c
319 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
322 runs-on: ubuntu-latest
324 - uses: actions/checkout@v4
325 - name: checkout fuzz/corpora submodule
326 run: git submodule update --init --depth 1 fuzz/corpora
328 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
334 ./util/opensslwrap.sh version -c
336 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
338 out-of-source-and-install:
341 os: [ubuntu-latest, macos-latest ]
342 runs-on: ${{matrix.os}}
344 - uses: actions/checkout@v4
345 - name: checkout fuzz/corpora submodule
346 run: git submodule update --init --depth 1 fuzz/corpora
347 - name: extra preparations
352 run: ../config --banner=Configured enable-fips enable-acvp-tests --strict-warnings --prefix=$(cd ../install; pwd) && perl configdata.pm --dump
353 working-directory: ./build
356 working-directory: ./build
358 run: ./util/opensslwrap.sh version -c
359 working-directory: ./build
361 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
362 working-directory: ./build
365 working-directory: ./build
368 runs-on: ubuntu-latest
370 - uses: actions/checkout@v4
372 submodules: recursive
373 - name: package installs
376 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
377 - name: install cpanm and Test2::V0 for gost_engine testing
378 uses: perl-actions/install-with-cpanm@v1
381 - name: setup hostname workaround
382 run: sudo hostname localhost
384 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
390 ./util/opensslwrap.sh version -c
391 - name: test external gost-engine
392 run: make test TESTS="test_external_gost_engine"
393 - name: test external krb5
394 run: make test TESTS="test_external_krb5"
395 - name: test external_tlsfuzzer
396 run: make test TESTS="test_external_tlsfuzzer"
397 - name: test external oqs-provider
398 run: make test TESTS="test_external_oqsprovider"
401 runs-on: ubuntu-latest
409 - uses: actions/checkout@v4
411 submodules: recursive
412 - name: Configure OpenSSL
413 run: ./config --banner=Configured --strict-warnings --debug enable-external-tests && perl configdata.pm --dump
417 uses: actions/setup-python@v4.7.1
419 python-version: ${{ matrix.PYTHON }}
420 - uses: actions-rs/toolchain@v1
423 toolchain: ${{ matrix.RUST }}
429 ./util/opensslwrap.sh version -c
430 - name: test external pyca
431 run: make test TESTS="test_external_pyca" VERBOSE=1
433 external-test-cf-quiche:
434 runs-on: ubuntu-latest
436 - uses: actions/checkout@v4
438 submodules: recursive
439 - name: Configure OpenSSL
440 run: ./config --banner=Configured --strict-warnings enable-external-tests && perl configdata.pm --dump
443 - uses: actions-rs/toolchain@v1
451 ./util/opensslwrap.sh version -c
452 - name: test external Cloudflare quiche
453 run: make test TESTS="test_external_cf_quiche" VERBOSE=1