1 # Copyright 2021-2025 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:
29 runs-on: ubuntu-latest
31 - name: install unifdef
34 sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install unifdef
35 - uses: actions/checkout@v4
39 run: ./config --strict-warnings --banner=Configured enable-fips && perl configdata.pm --dump
40 - name: make build_generated
41 run: make -s build_generated
45 run: git diff --exit-code
48 runs-on: ubuntu-latest
50 - uses: actions/checkout@v4
52 run: ./config --strict-warnings --banner=Configured enable-fips && perl configdata.pm --dump
53 - name: make build_generated
54 run: make -s build_generated
64 # This checks that we use ANSI C language syntax and semantics.
65 # We are not as strict with libraries, but rather adapt to what's
66 # expected to be available in a certain version of each platform.
68 runs-on: ubuntu-latest
70 - uses: actions/checkout@v4
72 run: CPPFLAGS='-std=c99 -D_XOPEN_SOURCE=1 -D_POSIX_C_SOURCE=200809L' ./config --strict-warnings --banner=Configured enable-sslkeylog no-asm no-secure-memory no-makedepend enable-buildtest-c++ enable-fips enable-lms && perl configdata.pm --dump
77 runs-on: ubuntu-latest
79 - uses: actions/checkout@v4
80 - name: checkout fuzz/corpora submodule
81 run: git submodule update --init --depth 1 fuzz/corpora
83 run: sudo locale-gen tr_TR.UTF-8
85 # Make one fips build use a customized FIPS vendor
86 run: echo "FIPS_VENDOR=CI" >> VERSION.dat
88 # enable-quic is on by default, but we leave it here to check we're testing the explicit enable somewhere
89 run: CC=gcc ./config --strict-warnings --banner=Configured enable-demos enable-h3demo enable-sslkeylog enable-fips enable-quic enable-lms && perl configdata.pm --dump
95 ./util/opensslwrap.sh version -c
97 run: .github/workflows/make-test
98 - name: check fipsvendor
100 util/wrap.pl -fips apps/openssl list -providers | grep 'name: CI FIPS Provider for OpenSSL$'
101 - name: save artifacts
102 if: success() || failure()
103 uses: actions/upload-artifact@v4
106 path: artifacts.tar.gz
109 runs-on: ubuntu-latest
111 - uses: actions/checkout@v4
112 - name: checkout fuzz/corpora submodule
113 run: git submodule update --init --depth 1 fuzz/corpora
115 run: CC=clang ./config --strict-warnings --banner=Configured enable-demos enable-h3demo no-fips && perl configdata.pm --dump
121 ./util/opensslwrap.sh version -c
123 run: .github/workflows/make-test
124 - name: save artifacts
125 if: success() || failure()
126 uses: actions/upload-artifact@v4
128 name: "ci@basic-clang"
129 path: artifacts.tar.gz
132 runs-on: ${{ github.repository == 'openssl/openssl' && 'linux-arm64' || 'ubuntu-24.04-arm' }}
134 - uses: actions/checkout@v4
136 run: ./config --strict-warnings enable-demos enable-fips enable-lms enable-ec_nistp_64_gcc_128 enable-md2 enable-rc5 enable-ssl3 enable-ssl3-method enable-trace
138 run: ./configdata.pm --dump
144 ./util/opensslwrap.sh version -c
146 run: .github/workflows/make-test
147 - name: save artifacts
148 if: success() || failure()
149 uses: actions/upload-artifact@v4
151 name: "ci@linux-arm64"
152 path: artifacts.tar.gz
155 runs-on: ubuntu-latest
157 - uses: actions/checkout@v4
159 uses: cross-platform-actions/action@v0.26.0
161 operating_system: freebsd
165 sudo pkg install -y gcc perl5
166 ./config --strict-warnings enable-fips enable-lms enable-ec_nistp_64_gcc_128 enable-md2 enable-rc5 enable-ssl3 enable-ssl3-method enable-trace
168 uses: cross-platform-actions/action@v0.26.0
170 operating_system: freebsd
173 run: ./configdata.pm --dump
175 uses: cross-platform-actions/action@v0.26.0
177 operating_system: freebsd
182 uses: cross-platform-actions/action@v0.26.0
184 operating_system: freebsd
187 ./util/opensslwrap.sh version -c
188 .github/workflows/make-test
189 - name: save artifacts
190 if: success() || failure()
191 uses: actions/upload-artifact@v4
193 name: "ci@BSD-x86_64"
194 path: artifacts.tar.gz
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 --strict-warnings --banner=Configured enable-demos enable-h3demo no-bulk no-pic no-asm no-lms -DOPENSSL_NO_SECURE_MEMORY -DOPENSSL_SMALL_FOOTPRINT && perl configdata.pm --dump
205 run: make -j4 # verbose, so no -s here
209 ./util/opensslwrap.sh version -c
211 run: .github/workflows/make-test
212 - name: save artifacts
213 if: success() || failure()
214 uses: actions/upload-artifact@v4
217 path: artifacts.tar.gz
220 runs-on: ubuntu-latest
222 - uses: actions/checkout@v4
223 - name: checkout fuzz/corpora submodule
224 run: git submodule update --init --depth 1 fuzz/corpora
226 run: ./config --strict-warnings --banner=Configured enable-demos enable-h3demo no-deprecated enable-fips && perl configdata.pm --dump
232 ./util/opensslwrap.sh version -c
234 run: .github/workflows/make-test
235 - name: save artifacts
236 if: success() || failure()
237 uses: actions/upload-artifact@v4
239 name: "ci@no-deprecated"
240 path: artifacts.tar.gz
243 runs-on: ubuntu-latest
245 - uses: actions/checkout@v4
246 - name: checkout fuzz/corpora submodule
247 run: git submodule update --init --depth 1 fuzz/corpora
249 run: ./config --strict-warnings --banner=Configured enable-demos enable-h3demo no-shared no-fips && perl configdata.pm --dump
255 ./util/opensslwrap.sh version -c
257 run: .github/workflows/make-test
258 - name: save artifacts
259 if: success() || failure()
260 uses: actions/upload-artifact@v4
262 name: "ci@no-shared-ubuntu"
263 path: artifacts.tar.gz
269 os: [macos-13, macos-14]
270 runs-on: ${{ matrix.os }}
272 - uses: actions/checkout@v4
273 - name: checkout fuzz/corpora submodule
274 run: git submodule update --init --depth 1 fuzz/corpora
276 run: ./config --strict-warnings --banner=Configured enable-demos enable-h3demo no-shared no-fips && perl configdata.pm --dump
282 ./util/opensslwrap.sh version -c
284 run: .github/workflows/make-test
285 - name: save artifacts
286 if: success() || failure()
287 uses: actions/upload-artifact@v4
289 name: "ci@no-shared-${{ matrix.os }}"
290 path: artifacts.tar.gz
293 runs-on: ubuntu-latest
295 - uses: actions/checkout@v4
296 - name: checkout fuzz/corpora submodule
297 run: git submodule update --init --depth 1 fuzz/corpora
298 - name: Adjust ASLR for sanitizer
300 sudo cat /proc/sys/vm/mmap_rnd_bits
301 sudo sysctl -w vm.mmap_rnd_bits=28
303 run: ./config --strict-warnings --banner=Configured --debug enable-demos enable-h3demo 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
309 ./util/opensslwrap.sh version -c
311 run: .github/workflows/make-test 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]"
312 - name: save artifacts
313 if: success() || failure()
314 uses: actions/upload-artifact@v4
316 name: "ci@non-caching"
317 path: artifacts.tar.gz
319 address_ub_sanitizer:
320 runs-on: ubuntu-latest
322 - uses: actions/checkout@v4
323 - name: checkout fuzz/corpora submodule
324 run: git submodule update --init --depth 1 fuzz/corpora
325 - name: Adjust ASLR for sanitizer
327 sudo cat /proc/sys/vm/mmap_rnd_bits
328 sudo sysctl -w vm.mmap_rnd_bits=28
330 run: ./config --strict-warnings --banner=Configured --debug enable-demos enable-h3demo enable-asan enable-ubsan enable-rc5 enable-md2 enable-ec_nistp_64_gcc_128 enable-fips enable-lms && perl configdata.pm --dump
336 ./util/opensslwrap.sh version -c
338 run: .github/workflows/make-test OPENSSL_TEST_RAND_ORDER=0
339 - name: save artifacts
340 if: success() || failure()
341 uses: actions/upload-artifact@v4
343 name: "ci@address_ub_sanitizer"
344 path: artifacts.tar.gz
347 runs-on: ubuntu-latest
349 - uses: actions/checkout@v4
350 - name: checkout fuzz/corpora submodule
351 run: git submodule update --init --depth 1 fuzz/corpora
352 - name: Adjust ASLR for sanitizer
354 sudo cat /proc/sys/vm/mmap_rnd_bits
355 sudo sysctl -w vm.mmap_rnd_bits=28
357 run: ./config --strict-warnings --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
363 ./util/opensslwrap.sh version -c
365 run: .github/workflows/make-test OPENSSL_TEST_RAND_ORDER=0 TESTS="test_fuzz*"
366 - name: save artifacts
367 if: success() || failure()
368 uses: actions/upload-artifact@v4
370 name: "ci@fuzz_tests"
371 path: artifacts.tar.gz
372 if-no-files-found: ignore
375 runs-on: ubuntu-latest
377 - uses: actions/checkout@v4
378 - name: checkout fuzz/corpora submodule
379 run: git submodule update --init --depth 1 fuzz/corpora
380 - name: Adjust ASLR for sanitizer
382 sudo cat /proc/sys/vm/mmap_rnd_bits
383 sudo sysctl -w vm.mmap_rnd_bits=28
385 # --debug -O1 is to produce a debug build that runs in a reasonable amount of time
386 run: CC=clang ./config --strict-warnings --banner=Configured --debug no-shared -O1 -fsanitize=memory -DOSSL_SANITIZE_MEMORY -fno-optimize-sibling-calls enable-rc5 enable-md2 enable-ec_nistp_64_gcc_128 enable-fips enable-lms no-slh-dsa && perl configdata.pm --dump
392 ./util/opensslwrap.sh version -c
394 run: .github/workflows/make-test OPENSSL_TEST_RAND_ORDER=0
395 - name: save artifacts
396 if: success() || failure()
397 uses: actions/upload-artifact@v4
399 name: "ci@memory_sanitizer"
400 path: artifacts.tar.gz
403 runs-on: ubuntu-latest
405 - uses: actions/checkout@v4
406 - name: checkout fuzz/corpora submodule
407 run: git submodule update --init --depth 1 fuzz/corpora
408 - name: Adjust ASLR for sanitizer
410 sudo cat /proc/sys/vm/mmap_rnd_bits
411 sudo sysctl -w vm.mmap_rnd_bits=28
413 run: CC=clang ./config --strict-warnings --banner=Configured no-shared no-fips -g -fsanitize=thread && perl configdata.pm --dump
419 ./util/opensslwrap.sh version -c
421 run: .github/workflows/make-test V=1 TESTS="test_lhash test_threads test_internal_provider test_provfetch test_provider test_pbe test_evp_kdf test_pkcs12 test_store test_evp test_quic*"
422 - name: save artifacts
423 if: success() || failure()
424 uses: actions/upload-artifact@v4
426 name: "ci@threads_sanitizer"
427 path: artifacts.tar.gz
429 enable_non-default_options:
430 runs-on: ubuntu-latest
432 - uses: actions/checkout@v4
433 - name: checkout fuzz/corpora submodule
434 run: git submodule update --init --depth 1 fuzz/corpora
436 run: sudo modprobe tls
438 run: ./config --strict-warnings --banner=Configured enable-demos enable-h3demo no-ec enable-ssl-trace enable-zlib enable-zlib-dynamic enable-crypto-mdebug enable-egd enable-ktls enable-fips enable-lms no-threads && perl configdata.pm --dump
444 ./util/opensslwrap.sh version -c
446 run: .github/workflows/make-test
447 - name: save artifacts
448 if: success() || failure()
449 uses: actions/upload-artifact@v4
451 name: "ci@enable_non-default_options"
452 path: artifacts.tar.gz
455 runs-on: ubuntu-latest
457 - uses: actions/checkout@v4
458 - name: checkout fuzz/corpora submodule
459 run: git submodule update --init --depth 1 fuzz/corpora
461 run: sudo modprobe tls
463 run: sudo modprobe sctp
464 - name: Enable auth in sctp
465 run: sudo sysctl -w net.sctp.auth_enable=1
466 - name: install extra config support
467 run: sudo apt-get -y install libsctp-dev abigail-tools libzstd-dev zstd
469 run: ./config --strict-warnings --banner=Configured enable-demos enable-h3demo enable-ktls enable-fips enable-lms enable-egd enable-ec_nistp_64_gcc_128 enable-md2 enable-rc5 enable-sctp enable-ssl3 enable-ssl3-method enable-weak-ssl-ciphers enable-trace enable-zlib enable-zstd && perl configdata.pm --dump
475 ./util/opensslwrap.sh version -c
477 run: .github/workflows/make-test
478 - name: save artifacts
479 if: success() || failure()
480 uses: actions/upload-artifact@v4
482 name: "ci@full_featured"
483 path: artifacts.tar.gz
486 runs-on: ubuntu-latest
488 - uses: actions/checkout@v4
489 - name: checkout fuzz/corpora submodule
490 run: git submodule update --init --depth 1 fuzz/corpora
492 run: ./config --strict-warnings --banner=Configured enable-demos enable-h3demo no-legacy enable-fips enable-lms && perl configdata.pm --dump
498 ./util/opensslwrap.sh version -c
500 run: .github/workflows/make-test
501 - name: save artifacts
502 if: success() || failure()
503 uses: actions/upload-artifact@v4
506 path: artifacts.tar.gz
509 runs-on: ubuntu-latest
511 - uses: actions/checkout@v4
512 - name: checkout fuzz/corpora submodule
513 run: git submodule update --init --depth 1 fuzz/corpora
515 run: ./config --strict-warnings --banner=Configured --debug no-afalgeng enable-demos enable-h3demo 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
521 ./util/opensslwrap.sh version -c
523 run: .github/workflows/make-test
524 - name: save artifacts
525 if: success() || failure()
526 uses: actions/upload-artifact@v4
529 path: artifacts.tar.gz
531 # out-of-source-and-install checks multiple things at the same time:
532 # - That building, testing and installing works from an out-of-source
534 # - That building, testing and installing works with a read-only source
536 out-of-readonly-source-and-install-ubuntu:
537 runs-on: ubuntu-latest
539 - uses: actions/checkout@v4
542 - name: checkout fuzz/corpora submodule
543 run: git submodule update --init --depth 1 fuzz/corpora
544 working-directory: ./source
545 - name: make source read-only
546 run: chmod -R a-w ./source
547 - name: create build and install directories
553 ../source/config --banner=Configured enable-demos enable-h3demo enable-fips enable-lms enable-quic enable-acvp-tests --strict-warnings --prefix=$(cd ../install; pwd)
554 perl configdata.pm --dump
555 working-directory: ./build
558 working-directory: ./build
562 ./util/opensslwrap.sh version -c
563 working-directory: ./build
565 run: ../source/.github/workflows/make-test
566 working-directory: ./build
567 - name: save artifacts
568 if: success() || failure()
569 uses: actions/upload-artifact@v4
571 name: "ci@out-of-readonly-source-and-install-ubuntu"
572 path: build/artifacts.tar.gz
575 working-directory: ./build
577 out-of-readonly-source-and-install-macos:
581 os: [macos-13, macos-14]
582 runs-on: ${{ matrix.os }}
584 - uses: actions/checkout@v4
587 - name: checkout fuzz/corpora submodule
588 run: git submodule update --init --depth 1 fuzz/corpora
589 working-directory: ./source
590 - name: make source read-only
591 run: chmod -R a-w ./source
592 - name: create build and install directories
598 ../source/config --banner=Configured enable-fips enable-lms enable-demos enable-h3demo enable-quic enable-acvp-tests --strict-warnings --prefix=$(cd ../install; pwd)
599 perl configdata.pm --dump
600 working-directory: ./build
603 working-directory: ./build
607 ./util/opensslwrap.sh version -c
608 working-directory: ./build
610 run: ../source/.github/workflows/make-test
611 working-directory: ./build
612 - name: save artifacts
613 if: success() || failure()
614 uses: actions/upload-artifact@v4
616 name: "ci@out-of-readonly-source-and-install-${{ matrix.os }}"
617 path: build/artifacts.tar.gz
620 working-directory: ./build
623 runs-on: ubuntu-latest
625 - uses: actions/checkout@v4
627 submodules: recursive
628 - name: package installs
631 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 gdb libtls-dev
632 - name: install cpanm and Test2::V0 for gost_engine testing
633 uses: perl-actions/install-with-cpanm@stable
636 - name: setup hostname workaround
637 run: sudo hostname localhost
639 run: ./config --strict-warnings --banner=Configured --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
642 - uses: dtolnay/rust-toolchain@stable
646 ./util/opensslwrap.sh version -c
647 - name: test external gost-engine
648 run: make test TESTS="test_external_gost_engine"
649 - name: test external krb5
650 run: make test TESTS="test_external_krb5"
651 - name: test external tlsfuzzer
652 run: make test TESTS="test_external_tlsfuzzer"
653 - name: test external Cloudflare quiche
654 run: make test TESTS="test_external_cf_quiche" VERBOSE=1
655 - name: test external rpki client
656 run: make test TESTS="test_external_rpki-client-portable"
657 - name: test ability to produce debuginfo files
660 gdb < <(echo -e "file ./libcrypto.so.3\nquit") > ./results
661 grep -q "Reading symbols from.*libcrypto\.so\.3\.debug" results
663 external-tests-oqs-provider:
664 runs-on: ubuntu-latest
666 - uses: actions/checkout@v4
668 submodules: recursive
670 run: ./config --strict-warnings --banner=Configured --debug enable-external-tests && perl configdata.pm --dump
676 ./util/opensslwrap.sh version -c
677 - name: test external oqs-provider
678 run: make test TESTS="test_external_oqsprovider"
680 external-tests-pkcs11-provider:
681 runs-on: ubuntu-latest
682 container: fedora:latest
684 - name: package installs
686 dnf install -y perl-FindBin perl-IPC-Cmd perl-File-Compare perl-File-Copy perl-Test-Simple perl-Test-Harness python3 make g++ perl git meson opensc expect kryoptic
687 - uses: actions/checkout@v4
688 - name: checkout fuzz/corpora and pkcs11-provider submodule
690 git config --global --add safe.directory /__w/openssl/openssl
691 git submodule update --init --depth 1 fuzz/corpora
692 git submodule update --init --depth 1 pkcs11-provider
694 run: ./config --strict-warnings --banner=Configured --debug enable-external-tests no-fips && perl configdata.pm --dump
697 # Run all tests except external tests to make sure they work fine on Fedora because
698 # this is the only job running on Fedora, only then execute pkcs11-provider external
700 - name: test (except external tests)
701 run: make test TESTS="-test_external_*"
702 - name: test external pkcs11-provider
703 run: make test TESTS="test_external_pkcs11_provider" VERBOSE=1
707 ./util/opensslwrap.sh version -c
710 runs-on: ubuntu-latest
716 - uses: actions/checkout@v4
718 submodules: recursive
719 - name: package installs
722 sudo apt-get -yq install pkgconf libssl-dev
723 - name: Configure OpenSSL
724 run: ./config --strict-warnings --banner=Configured --debug enable-external-tests && perl configdata.pm --dump
728 uses: actions/setup-python@v5.3.0
730 python-version: ${{ matrix.PYTHON }}
731 - uses: dtolnay/rust-toolchain@stable
737 ./util/opensslwrap.sh version -c
738 - name: test external pyca
739 run: make test TESTS="test_external_pyca" VERBOSE=1