1 # Copyright 2021 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:
23 runs-on: ubuntu-latest
25 - name: install unifdef
28 sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install unifdef
29 - uses: actions/checkout@v2
33 run: ./config --banner=Configured --strict-warnings enable-fips && perl configdata.pm --dump
34 - name: make build_generated
35 run: make -s build_generated
39 run: git diff --exit-code
42 runs-on: ubuntu-latest
44 - uses: actions/checkout@v2
46 run: ./config --banner=Configured --strict-warnings enable-fips && perl configdata.pm --dump
47 - name: make build_generated
48 run: make -s build_generated
56 # This checks that we use ANSI C language syntax and semantics.
57 # We are not as strict with libraries, but rather adapt to what's
58 # expected to be available in a certain version of each platform.
60 runs-on: ubuntu-latest
62 - uses: actions/checkout@v2
64 run: CPPFLAGS=-ansi ./config --banner=Configured no-asm no-makedepend enable-buildtest-c++ enable-fips --strict-warnings -D_DEFAULT_SOURCE && perl configdata.pm --dump
69 runs-on: ubuntu-latest
71 - uses: actions/checkout@v2
73 run: CC=gcc ./config --banner=Configured enable-fips --strict-warnings && perl configdata.pm --dump
77 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
80 runs-on: ubuntu-latest
82 - uses: actions/checkout@v2
84 run: CC=clang ./config --banner=Configured no-fips --strict-warnings && perl configdata.pm --dump
88 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
91 runs-on: ubuntu-latest
93 - uses: actions/checkout@v2
95 run: ./config --banner=Configured --strict-warnings no-bulk no-pic no-asm -DOPENSSL_NO_SECURE_MEMORY -DOPENSSL_SMALL_FOOTPRINT && perl configdata.pm --dump
97 run: make -j4 # verbose, so no -s here
99 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
102 runs-on: ubuntu-latest
104 - uses: actions/checkout@v2
106 run: ./config --banner=Configured --strict-warnings no-deprecated enable-fips && perl configdata.pm --dump
110 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
115 os: [ ubuntu-latest, macos-latest ]
116 runs-on: ${{matrix.os}}
118 - uses: actions/checkout@v2
120 run: ./config --banner=Configured --strict-warnings no-shared no-fips && perl configdata.pm --dump
124 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
127 runs-on: ubuntu-latest
129 - uses: actions/checkout@v2
131 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
135 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]"
137 address_ub_sanitizer:
138 runs-on: ubuntu-latest
140 - uses: actions/checkout@v2
142 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
146 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0
149 runs-on: ubuntu-latest
151 - uses: actions/checkout@v2
153 # --debug -O1 is to produce a debug build that runs in a reasonable amount of time
154 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
158 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0
161 runs-on: ubuntu-latest
163 - uses: actions/checkout@v2
165 run: CC=clang ./config --banner=Configured no-fips --strict-warnings -fsanitize=thread && perl configdata.pm --dump
169 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 HARNESS_JOBS=${HARNESS_JOBS:-4}
171 enable_non-default_options:
172 runs-on: ubuntu-latest
174 - uses: actions/checkout@v2
176 run: sudo modprobe tls
178 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 && perl configdata.pm --dump
182 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
185 runs-on: ubuntu-latest
187 - uses: actions/checkout@v2
189 run: sudo modprobe tls
191 run: ./config --banner=Configured --strict-warnings enable-ktls enable-fips && perl configdata.pm --dump
195 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
198 runs-on: ubuntu-latest
200 - uses: actions/checkout@v2
202 run: ./config --banner=Configured --strict-warnings no-legacy enable-fips && perl configdata.pm --dump
206 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
209 runs-on: ubuntu-latest
211 - uses: actions/checkout@v2
213 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
217 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
220 runs-on: ubuntu-latest
222 - uses: actions/checkout@v2
224 run: ./config --banner=Configured no-asm no-makedepend enable-buildtest-c++ enable-fips --strict-warnings -D_DEFAULT_SOURCE && perl configdata.pm --dump
228 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
230 out-of-source-and-install:
233 os: [ubuntu-latest, macos-latest ]
234 runs-on: ${{matrix.os}}
236 - uses: actions/checkout@v2
237 - name: extra preparations
242 run: ../config --banner=Configured enable-fips enable-acvp-tests --strict-warnings --prefix=$(cd ../install; pwd) && perl configdata.pm --dump
243 working-directory: ./build
246 working-directory: ./build
248 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
249 working-directory: ./build
252 working-directory: ./build
255 runs-on: ubuntu-latest
257 - uses: actions/checkout@v2
259 submodules: recursive
260 - name: package installs
263 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
264 - name: install cpanm and Test2::V0 for gost_engine testing
265 uses: perl-actions/install-with-cpanm@v1
268 - name: setup hostname workaround
269 run: sudo hostname localhost
271 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
274 - name: test external gost-engine
275 run: make test TESTS="test_external_gost_engine"
276 - name: test external krb5
277 run: make test TESTS="test_external_krb5"
278 - name: test external_tlsfuzzer
279 run: make test TESTS="test_external_tlsfuzzer"
282 runs-on: ubuntu-latest
290 - uses: actions/checkout@v2
292 submodules: recursive
293 - name: Configure OpenSSL
294 run: ./config --banner=Configured --strict-warnings --debug enable-external-tests && perl configdata.pm --dump
298 uses: actions/setup-python@v2.2.2
300 python-version: ${{ matrix.PYTHON }}
301 - uses: actions-rs/toolchain@v1
304 toolchain: ${{ matrix.RUST }}
307 - name: test external pyca
308 run: make test TESTS="test_external_pyca" VERBOSE=1