]> git.ipfire.org Git - thirdparty/openssl.git/blob - .github/workflows/ci.yml
Add TFO support to socket BIO and s_client/s_server
[thirdparty/openssl.git] / .github / workflows / ci.yml
1 # Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
2 #
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
7
8 name: GitHub CI
9
10 on: [pull_request, push]
11
12 # for some reason, this does not work:
13 # variables:
14 # BUILDOPTS: "-j4"
15 # HARNESS_JOBS: "${HARNESS_JOBS:-4}"
16
17 # for some reason, this does not work:
18 # before_script:
19 # - make="make -s"
20
21 jobs:
22 check_update:
23 runs-on: ubuntu-latest
24 steps:
25 - name: install unifdef
26 run: |
27 sudo apt-get update
28 sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install unifdef
29 - uses: actions/checkout@v2
30 with:
31 fetch-depth: 0
32 - name: config
33 run: ./config --banner=Configured --strict-warnings enable-fips && perl configdata.pm --dump
34 - name: make build_generated
35 run: make -s build_generated
36 - name: make update
37 run: make update
38 - name: git diff
39 run: git diff --exit-code
40
41 check_docs:
42 runs-on: ubuntu-latest
43 steps:
44 - uses: actions/checkout@v2
45 - name: config
46 run: ./config --banner=Configured --strict-warnings enable-fips && perl configdata.pm --dump
47 - name: make build_generated
48 run: make -s build_generated
49 - name: make doc-nits
50 run: make doc-nits
51 - name: make md-nits
52 run: |
53 sudo gem install mdl
54 make md-nits
55
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.
59 check-ansi:
60 runs-on: ubuntu-latest
61 steps:
62 - uses: actions/checkout@v2
63 - name: config
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
65 - name: make
66 run: make -s -j4
67
68 basic_gcc:
69 runs-on: ubuntu-latest
70 steps:
71 - uses: actions/checkout@v2
72 - name: config
73 run: CC=gcc ./config --banner=Configured enable-fips --strict-warnings && perl configdata.pm --dump
74 - name: make
75 run: make -s -j4
76 - name: make test
77 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
78
79 basic_clang:
80 runs-on: ubuntu-latest
81 steps:
82 - uses: actions/checkout@v2
83 - name: config
84 run: CC=clang ./config --banner=Configured no-fips --strict-warnings && perl configdata.pm --dump
85 - name: make
86 run: make -s -j4
87 - name: make test
88 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
89
90 minimal:
91 runs-on: ubuntu-latest
92 steps:
93 - uses: actions/checkout@v2
94 - name: config
95 run: ./config --banner=Configured --strict-warnings no-bulk no-pic no-asm -DOPENSSL_NO_SECURE_MEMORY -DOPENSSL_SMALL_FOOTPRINT && perl configdata.pm --dump
96 - name: make
97 run: make -j4 # verbose, so no -s here
98 - name: make test
99 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
100
101 no-deprecated:
102 runs-on: ubuntu-latest
103 steps:
104 - uses: actions/checkout@v2
105 - name: config
106 run: ./config --banner=Configured --strict-warnings no-deprecated enable-fips && perl configdata.pm --dump
107 - name: make
108 run: make -s -j4
109 - name: make test
110 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
111
112 no-shared:
113 strategy:
114 matrix:
115 os: [ ubuntu-latest, macos-latest ]
116 runs-on: ${{matrix.os}}
117 steps:
118 - uses: actions/checkout@v2
119 - name: config
120 run: ./config --banner=Configured --strict-warnings no-shared no-fips && perl configdata.pm --dump
121 - name: make
122 run: make -s -j4
123 - name: make test
124 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
125
126 non-caching:
127 runs-on: ubuntu-latest
128 steps:
129 - uses: actions/checkout@v2
130 - name: config
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
132 - name: make
133 run: make -s -j4
134 - name: make test
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]"
136
137 address_ub_sanitizer:
138 runs-on: ubuntu-latest
139 steps:
140 - uses: actions/checkout@v2
141 - name: config
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
143 - name: make
144 run: make -s -j4
145 - name: make test
146 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0
147
148 memory_sanitizer:
149 runs-on: ubuntu-latest
150 steps:
151 - uses: actions/checkout@v2
152 - name: config
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
155 - name: make
156 run: make -s -j4
157 - name: make test
158 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0
159
160 threads_sanitizer:
161 runs-on: ubuntu-latest
162 steps:
163 - uses: actions/checkout@v2
164 - name: config
165 run: CC=clang ./config --banner=Configured no-fips --strict-warnings -fsanitize=thread && perl configdata.pm --dump
166 - name: make
167 run: make -s -j4
168 - name: make test
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}
170
171 enable_non-default_options:
172 runs-on: ubuntu-latest
173 steps:
174 - uses: actions/checkout@v2
175 - name: modprobe tls
176 run: sudo modprobe tls
177 - name: config
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
179 - name: make
180 run: make -s -j4
181 - name: make test
182 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
183
184 fips_and_ktls:
185 runs-on: ubuntu-latest
186 steps:
187 - uses: actions/checkout@v2
188 - name: modprobe tls
189 run: sudo modprobe tls
190 - name: config
191 run: ./config --banner=Configured --strict-warnings enable-ktls enable-fips && perl configdata.pm --dump
192 - name: make
193 run: make -s -j4
194 - name: make test
195 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
196
197 no-legacy:
198 runs-on: ubuntu-latest
199 steps:
200 - uses: actions/checkout@v2
201 - name: config
202 run: ./config --banner=Configured --strict-warnings no-legacy enable-fips && perl configdata.pm --dump
203 - name: make
204 run: make -s -j4
205 - name: make test
206 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
207
208 legacy:
209 runs-on: ubuntu-latest
210 steps:
211 - uses: actions/checkout@v2
212 - name: config
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
214 - name: make
215 run: make -s -j4
216 - name: make test
217 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
218
219 enable-tfo:
220 strategy:
221 matrix:
222 os: [ ubuntu-latest, macos-latest ]
223 runs-on: ${{matrix.os}}
224 steps:
225 - uses: actions/checkout@v2
226 - name: config
227 run: CC=gcc ./config --banner=Configured enable-tfo --strict-warnings && perl configdata.pm --dump
228 - name: make
229 run: make -s -j4
230 - name: make test
231 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
232
233 buildtest:
234 runs-on: ubuntu-latest
235 steps:
236 - uses: actions/checkout@v2
237 - name: config
238 run: ./config --banner=Configured no-asm no-makedepend enable-buildtest-c++ enable-fips --strict-warnings -D_DEFAULT_SOURCE && perl configdata.pm --dump
239 - name: make
240 run: make -s -j4
241 - name: make test
242 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
243
244 out-of-source-and-install:
245 strategy:
246 matrix:
247 os: [ubuntu-latest, macos-latest ]
248 runs-on: ${{matrix.os}}
249 steps:
250 - uses: actions/checkout@v2
251 - name: extra preparations
252 run: |
253 mkdir ./build
254 mkdir ./install
255 - name: config
256 run: ../config --banner=Configured enable-fips enable-acvp-tests --strict-warnings --prefix=$(cd ../install; pwd) && perl configdata.pm --dump
257 working-directory: ./build
258 - name: make
259 run: make -s -j4
260 working-directory: ./build
261 - name: make test
262 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
263 working-directory: ./build
264 - name: make install
265 run: make install
266 working-directory: ./build
267
268 external-tests:
269 runs-on: ubuntu-latest
270 steps:
271 - uses: actions/checkout@v2
272 with:
273 submodules: recursive
274 - name: package installs
275 run: |
276 sudo apt-get update
277 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
278 - name: install cpanm and Test2::V0 for gost_engine testing
279 uses: perl-actions/install-with-cpanm@v1
280 with:
281 install: Test2::V0
282 - name: setup hostname workaround
283 run: sudo hostname localhost
284 - name: config
285 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
286 - name: make
287 run: make -s -j4
288 - name: test external gost-engine
289 run: make test TESTS="test_external_gost_engine"
290 - name: test external krb5
291 run: make test TESTS="test_external_krb5"
292 - name: test external_tlsfuzzer
293 run: make test TESTS="test_external_tlsfuzzer"
294 - name: test external oqs-provider
295 run: make test TESTS="test_external_oqsprovider"
296
297 external-test-pyca:
298 runs-on: ubuntu-latest
299 strategy:
300 matrix:
301 RUST:
302 - 1.51.0
303 PYTHON:
304 - 3.9
305 steps:
306 - uses: actions/checkout@v2
307 with:
308 submodules: recursive
309 - name: Configure OpenSSL
310 run: ./config --banner=Configured --strict-warnings --debug enable-external-tests && perl configdata.pm --dump
311 - name: make
312 run: make -s -j4
313 - name: Setup Python
314 uses: actions/setup-python@v2.2.2
315 with:
316 python-version: ${{ matrix.PYTHON }}
317 - uses: actions-rs/toolchain@v1
318 with:
319 profile: minimal
320 toolchain: ${{ matrix.RUST }}
321 override: true
322 default: true
323 - name: test external pyca
324 run: make test TESTS="test_external_pyca" VERBOSE=1