]> git.ipfire.org Git - thirdparty/openssl.git/blob - .github/workflows/ci.yml
CI: have enable-acvp-tests in some CI build
[thirdparty/openssl.git] / .github / workflows / ci.yml
1 name: GitHub CI
2
3 on: [pull_request, push]
4
5 # for some reason, this does not work:
6 # variables:
7 # BUILDOPTS: "-j4"
8 # HARNESS_JOBS: "${HARNESS_JOBS:-4}"
9
10 # for some reason, this does not work:
11 # before_script:
12 # - make="make -s"
13
14 jobs:
15 check_update:
16 runs-on: ubuntu-latest
17 steps:
18 - name: install unifdef
19 run: |
20 sudo apt-get update
21 sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install unifdef
22 - uses: actions/checkout@v2
23 - name: config
24 run: ./config --banner=Configured --strict-warnings enable-fips && perl configdata.pm --dump
25 - name: make build_generated
26 run: make -s build_generated
27 - name: make update
28 run: make update
29 - name: git diff
30 run: git diff --exit-code
31
32 check_docs:
33 runs-on: ubuntu-latest
34 steps:
35 - uses: actions/checkout@v2
36 - name: config
37 run: ./config --banner=Configured --strict-warnings enable-fips && perl configdata.pm --dump
38 - name: make build_generated
39 run: make -s build_generated
40 - name: make doc-nits
41 run: make doc-nits
42 - name: make md-nits
43 run: |
44 sudo gem install mdl
45 make md-nits
46
47 # This checks that we use ANSI C language syntax and semantics.
48 # We are not as strict with libraries, but rather adapt to what's
49 # expected to be available in a certain version of each platform.
50 check-ansi:
51 runs-on: ubuntu-latest
52 steps:
53 - uses: actions/checkout@v2
54 - name: config
55 run: CPPFLAGS=-ansi ./config --banner=Configured no-asm no-makedepend enable-buildtest-c++ enable-fips --strict-warnings -D_DEFAULT_SOURCE && perl configdata.pm --dump
56 - name: make
57 run: make -s -j4
58
59 basic_gcc:
60 runs-on: ubuntu-latest
61 steps:
62 - uses: actions/checkout@v2
63 - name: config
64 run: ./config --banner=Configured enable-fips --strict-warnings && perl configdata.pm --dump
65 - name: make
66 run: make -s -j4
67 - name: make test
68 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
69
70 basic_clang:
71 runs-on: ubuntu-latest
72 steps:
73 - uses: actions/checkout@v2
74 - name: config
75 run: CC=clang ./config --banner=Configured no-fips --strict-warnings && perl configdata.pm --dump
76 - name: make
77 run: make -s -j4
78 - name: make test
79 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
80
81 minimal:
82 runs-on: ubuntu-latest
83 steps:
84 - uses: actions/checkout@v2
85 - name: config
86 run: ./config --banner=Configured --strict-warnings no-bulk no-pic no-asm -DOPENSSL_NO_SECURE_MEMORY -DOPENSSL_SMALL_FOOTPRINT && perl configdata.pm --dump
87 - name: make
88 run: make -j4 # verbose, so no -s here
89 - name: make test
90 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
91
92 no-deprecated:
93 runs-on: ubuntu-latest
94 steps:
95 - uses: actions/checkout@v2
96 - name: config
97 run: ./config --banner=Configured --strict-warnings no-deprecated enable-fips && perl configdata.pm --dump
98 - name: make
99 run: make -s -j4
100 - name: make test
101 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
102
103 no-shared:
104 strategy:
105 matrix:
106 os: [ ubuntu-latest, macos-latest ]
107 runs-on: ${{matrix.os}}
108 steps:
109 - uses: actions/checkout@v2
110 - name: config
111 run: ./config --banner=Configured --strict-warnings no-shared no-fips && perl configdata.pm --dump
112 - name: make
113 run: make -s -j4
114 - name: make test
115 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
116
117 non-caching:
118 runs-on: ubuntu-latest
119 steps:
120 - uses: actions/checkout@v2
121 - name: config
122 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
123 - name: make
124 run: make -s -j4
125 - name: make test
126 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0 TESTS="-test_fuzz* -test_ssl_* -test_evp -test_cmp_http -test_verify -test_cms -test_store -test_enc -[01][0-9]"
127
128 address_ub_sanitizer:
129 runs-on: ubuntu-latest
130 steps:
131 - uses: actions/checkout@v2
132 - name: config
133 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
134 - name: make
135 run: make -s -j4
136 - name: make test
137 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0
138
139 memory_sanitizer:
140 runs-on: ubuntu-latest
141 steps:
142 - uses: actions/checkout@v2
143 - name: config
144 # --debug -O1 is to produce a debug build that runs in a reasonable amount of time
145 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
146 - name: make
147 run: make -s -j4
148 - name: make test
149 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0
150
151 threads_sanitizer:
152 runs-on: ubuntu-latest
153 steps:
154 - uses: actions/checkout@v2
155 - name: config
156 run: CC=clang ./config --banner=Configured no-fips --strict-warnings -fsanitize=thread && perl configdata.pm --dump
157 - name: make
158 run: make -s -j4
159 - name: make test
160 run: make TESTS=test_threads test HARNESS_JOBS=${HARNESS_JOBS:-4}
161
162 enable_non-default_options:
163 runs-on: ubuntu-latest
164 steps:
165 - uses: actions/checkout@v2
166 - name: config
167 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-fips && perl configdata.pm --dump
168 - name: make
169 run: make -s -j4
170 - name: make test
171 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
172
173 no-legacy:
174 runs-on: ubuntu-latest
175 steps:
176 - uses: actions/checkout@v2
177 - name: config
178 run: ./config --banner=Configured --strict-warnings no-legacy 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 legacy:
185 runs-on: ubuntu-latest
186 steps:
187 - uses: actions/checkout@v2
188 - name: config
189 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
190 - name: make
191 run: make -s -j4
192 - name: make test
193 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
194
195 buildtest:
196 runs-on: ubuntu-latest
197 steps:
198 - uses: actions/checkout@v2
199 - name: config
200 run: ./config --banner=Configured no-asm no-makedepend enable-buildtest-c++ enable-fips --strict-warnings -D_DEFAULT_SOURCE && perl configdata.pm --dump
201 - name: make
202 run: make -s -j4
203 - name: make test
204 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
205
206 out-of-source-and-install:
207 strategy:
208 matrix:
209 os: [ubuntu-latest, macos-latest ]
210 runs-on: ${{matrix.os}}
211 steps:
212 - uses: actions/checkout@v2
213 - name: extra preparations
214 run: |
215 mkdir ./build
216 mkdir ./install
217 - name: config
218 run: ../config --banner=Configured enable-fips enable-acvp-tests --strict-warnings --prefix=$(cd ../install; pwd) && perl configdata.pm --dump
219 working-directory: ./build
220 - name: make
221 run: make -s -j4
222 working-directory: ./build
223 - name: make test
224 run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
225 working-directory: ./build
226 - name: make install
227 run: make install
228 working-directory: ./build
229
230 external-tests:
231 runs-on: ubuntu-latest
232 steps:
233 - uses: actions/checkout@v2
234 with:
235 submodules: recursive
236 - name: package installs
237 run: |
238 sudo apt-get update
239 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
240 - name: install cpanm and Test2::V0 for gost_engine testing
241 uses: perl-actions/install-with-cpanm@v1
242 with:
243 install: Test2::V0
244 - name: setup hostname workaround
245 run: sudo hostname localhost
246 - name: config
247 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
248 - name: make
249 run: make -s -j4
250 - name: test external gost-engine
251 run: make test TESTS="test_external_gost_engine"
252 - name: test external krb5
253 run: make test TESTS="test_external_krb5"
254
255 external-test-pyca:
256 runs-on: ubuntu-latest
257 strategy:
258 matrix:
259 RUST:
260 - 1.51.0
261 PYTHON:
262 - 3.9
263 steps:
264 - uses: actions/checkout@v2
265 with:
266 submodules: recursive
267 - name: Configure OpenSSL
268 run: ./config --banner=Configured --strict-warnings --debug enable-external-tests && perl configdata.pm --dump
269 - name: make
270 run: make -s -j4
271 - name: Setup Python
272 uses: actions/setup-python@v2.2.2
273 with:
274 python-version: ${{ matrix.PYTHON }}
275 - uses: actions-rs/toolchain@v1
276 with:
277 profile: minimal
278 toolchain: ${{ matrix.RUST }}
279 override: true
280 default: true
281 - name: test external pyca
282 run: make test TESTS="test_external_pyca" VERBOSE=1