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: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
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: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
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: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
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: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
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: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
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}
113 os: [freebsd-13.2, ubuntu-arm64-22.04]
114 runs-on: ${{ matrix.os }}-self-hosted
115 continue-on-error: true
117 - uses: actions/checkout@v4
119 run: ./config enable-fips enable-ec_nistp_64_gcc_128 enable-md2 enable-rc5 enable-ssl3 enable-ssl3-method enable-trace
121 run: ./configdata.pm --dump
125 run: ./util/opensslwrap.sh version -c
127 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
130 runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
132 - uses: actions/checkout@v4
133 - name: checkout fuzz/corpora submodule
134 run: git submodule update --init --depth 1 fuzz/corpora
136 run: ./config --banner=Configured --strict-warnings no-bulk no-pic no-asm -DOPENSSL_NO_SECURE_MEMORY -DOPENSSL_SMALL_FOOTPRINT && perl configdata.pm --dump
138 run: make -j4 # verbose, so no -s here
142 ./util/opensslwrap.sh version -c
144 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
147 runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
149 - uses: actions/checkout@v4
150 - name: checkout fuzz/corpora submodule
151 run: git submodule update --init --depth 1 fuzz/corpora
153 run: ./config --banner=Configured --strict-warnings no-deprecated enable-fips && perl configdata.pm --dump
159 ./util/opensslwrap.sh version -c
161 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
164 runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
166 - uses: actions/checkout@v4
167 - name: checkout fuzz/corpora submodule
168 run: git submodule update --init --depth 1 fuzz/corpora
170 run: ./config --banner=Configured --strict-warnings no-shared no-fips && perl configdata.pm --dump
176 ./util/opensslwrap.sh version -c
178 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
181 runs-on: macos-latest
182 if: github.server_url == 'https://github.com'
184 - uses: actions/checkout@v4
185 - name: checkout fuzz/corpora submodule
186 run: git submodule update --init --depth 1 fuzz/corpora
188 run: ./config --banner=Configured --strict-warnings no-shared no-fips && perl configdata.pm --dump
194 ./util/opensslwrap.sh version -c
196 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
199 runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
201 - uses: actions/checkout@v4
202 - name: checkout fuzz/corpora submodule
203 run: git submodule update --init --depth 1 fuzz/corpora
205 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
211 ./util/opensslwrap.sh version -c
213 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]"
215 address_ub_sanitizer:
216 runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
218 - uses: actions/checkout@v4
219 - name: checkout fuzz/corpora submodule
220 run: git submodule update --init --depth 1 fuzz/corpora
222 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
228 ./util/opensslwrap.sh version -c
230 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0
233 runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
235 - uses: actions/checkout@v4
236 - name: checkout fuzz/corpora submodule
237 run: git submodule update --init --depth 1 fuzz/corpora
239 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
245 ./util/opensslwrap.sh version -c
247 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0 TESTS="test_fuzz*"
250 runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
252 - uses: actions/checkout@v4
253 - name: checkout fuzz/corpora submodule
254 run: git submodule update --init --depth 1 fuzz/corpora
256 # --debug -O1 is to produce a debug build that runs in a reasonable amount of time
257 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
263 ./util/opensslwrap.sh version -c
265 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0
268 runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
270 - uses: actions/checkout@v4
271 - name: checkout fuzz/corpora submodule
272 run: git submodule update --init --depth 1 fuzz/corpora
274 run: CC=clang ./config --banner=Configured no-fips --strict-warnings -fsanitize=thread && perl configdata.pm --dump
280 ./util/opensslwrap.sh version -c
282 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}
284 enable_non-default_options:
285 runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
287 - uses: actions/checkout@v4
288 - name: checkout fuzz/corpora submodule
289 run: git submodule update --init --depth 1 fuzz/corpora
291 run: sudo modprobe tls
293 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
299 ./util/opensslwrap.sh version -c
301 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
304 runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
306 - uses: actions/checkout@v4
307 - name: checkout fuzz/corpora submodule
308 run: git submodule update --init --depth 1 fuzz/corpora
310 run: sudo modprobe tls
312 run: sudo modprobe sctp
313 - name: Enable auth in sctp
314 run: sudo sysctl -w net.sctp.auth_enable=1
315 - name: install extra config support
316 run: sudo apt-get -y install libsctp-dev abigail-tools libzstd-dev zstd
318 run: ./config --banner=Configured --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
324 ./util/opensslwrap.sh version -c
326 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
329 runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
331 - uses: actions/checkout@v4
332 - name: checkout fuzz/corpora submodule
333 run: git submodule update --init --depth 1 fuzz/corpora
335 run: ./config --banner=Configured --strict-warnings no-legacy enable-fips && perl configdata.pm --dump
341 ./util/opensslwrap.sh version -c
343 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
346 runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
348 - uses: actions/checkout@v4
349 - name: checkout fuzz/corpora submodule
350 run: git submodule update --init --depth 1 fuzz/corpora
352 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
358 ./util/opensslwrap.sh version -c
360 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
362 # out-of-source-and-install checks multiple things at the same time:
363 # - That building, testing and installing works from an out-of-source
365 # - That building, testing and installing works with a read-only source
367 out-of-readonly-source-and-install-ubuntu:
368 runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
370 - uses: actions/checkout@v4
373 - name: checkout fuzz/corpora submodule
374 run: git submodule update --init --depth 1 fuzz/corpora
375 working-directory: ./source
376 - name: make source read-only
377 run: chmod -R a-w ./source
378 - name: create build and install directories
384 ../source/config --banner=Configured enable-fips enable-quic enable-acvp-tests --strict-warnings --prefix=$(cd ../install; pwd)
385 perl configdata.pm --dump
386 working-directory: ./build
389 working-directory: ./build
393 ./util/opensslwrap.sh version -c
394 working-directory: ./build
396 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
397 working-directory: ./build
400 working-directory: ./build
402 out-of-readonly-source-and-install-macos:
403 runs-on: macos-latest
404 if: github.server_url == 'https://github.com'
406 - uses: actions/checkout@v4
409 - name: checkout fuzz/corpora submodule
410 run: git submodule update --init --depth 1 fuzz/corpora
411 working-directory: ./source
412 - name: make source read-only
413 run: chmod -R a-w ./source
414 - name: create build and install directories
420 ../source/config --banner=Configured enable-fips enable-quic enable-acvp-tests --strict-warnings --prefix=$(cd ../install; pwd)
421 perl configdata.pm --dump
422 working-directory: ./build
425 working-directory: ./build
429 ./util/opensslwrap.sh version -c
430 working-directory: ./build
432 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
433 working-directory: ./build
436 working-directory: ./build
439 runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
441 - uses: actions/checkout@v4
443 submodules: recursive
444 - name: package installs
447 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
448 - name: install cpanm and Test2::V0 for gost_engine testing
449 uses: perl-actions/install-with-cpanm@v1
452 - name: setup hostname workaround
453 run: sudo hostname localhost
455 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
461 ./util/opensslwrap.sh version -c
462 - name: test external gost-engine
463 run: make test TESTS="test_external_gost_engine"
464 - name: test external krb5
465 run: make test TESTS="test_external_krb5"
466 - name: test external_tlsfuzzer
467 run: make test TESTS="test_external_tlsfuzzer"
468 - name: test external oqs-provider
469 run: make test TESTS="test_external_oqsprovider"
472 runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
480 - uses: actions/checkout@v4
482 submodules: recursive
483 - name: Configure OpenSSL
484 run: ./config --banner=Configured --strict-warnings --debug enable-external-tests && perl configdata.pm --dump
488 uses: actions/setup-python@v5.0.0
490 python-version: ${{ matrix.PYTHON }}
491 - uses: actions-rs/toolchain@v1
494 toolchain: ${{ matrix.RUST }}
500 ./util/opensslwrap.sh version -c
501 - name: test external pyca
502 run: make test TESTS="test_external_pyca" VERBOSE=1
504 external-test-cf-quiche:
505 runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}
507 - uses: actions/checkout@v4
509 submodules: recursive
510 - name: Configure OpenSSL
511 run: ./config --banner=Configured --strict-warnings enable-external-tests && perl configdata.pm --dump
514 - uses: actions-rs/toolchain@v1
522 ./util/opensslwrap.sh version -c
523 - name: test external Cloudflare quiche
524 run: make test TESTS="test_external_cf_quiche" VERBOSE=1