@@ -16,13 +16,15 @@ jobs:
16
16
runs-on : ubuntu-latest
17
17
outputs :
18
18
run_tests : ${{ steps.check.outputs.run_tests }}
19
+ run_ssl_tests : ${{ steps.check.outputs.run_ssl_tests }}
19
20
steps :
20
21
- uses : actions/checkout@v2
21
22
- name : Check for source changes
22
23
id : check
23
24
run : |
24
25
if [ -z "$GITHUB_BASE_REF" ]; then
25
26
echo '::set-output name=run_tests::true'
27
+ echo '::set-output name=run_ssl_tests::true'
26
28
else
27
29
git fetch origin $GITHUB_BASE_REF --depth=1
28
30
# git diff "origin/$GITHUB_BASE_REF..." (3 dots) may be more
39
41
#
40
42
# https://github.com/python/core-workflow/issues/373
41
43
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
44
+ git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qE '(ssl|hashlib|hmac|^.github)' && echo '::set-output name=run_ssl_tests::true' || true
42
45
fi
43
46
44
47
check_abi :
@@ -145,6 +148,11 @@ jobs:
145
148
- uses : actions/checkout@v2
146
149
- name : Install Dependencies
147
150
run : sudo ./.github/workflows/posix-deps-apt.sh
151
+ - name : Configure OpenSSL env vars
152
+ run : |
153
+ echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
154
+ echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
155
+ echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
148
156
- name : ' Restore OpenSSL build'
149
157
id : cache-openssl
150
158
uses : actions/cache@v2.1.3
@@ -153,12 +161,63 @@ jobs:
153
161
key : ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
154
162
- name : Install OpenSSL
155
163
if : steps.cache-openssl.outputs.cache-hit != 'true'
156
- run : python3 Tools/ssl/multissltests.py --steps=library --base-directory $PWD/multissl --openssl $OPENSSL_VER --system Linux
164
+ run : python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
165
+ - name : Add ccache to PATH
166
+ run : |
167
+ echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
168
+ - name : Configure ccache action
169
+ uses : hendrikmuhs/ccache-action@v1
157
170
- name : Configure CPython
158
- run : ./configure --with-pydebug --with-openssl=$PWD/multissl/openssl/$OPENSSL_VER
171
+ run : ./configure --with-pydebug --with-openssl=$OPENSSL_DIR
159
172
- name : Build CPython
160
173
run : make -j4
161
174
- name : Display build info
162
175
run : make pythoninfo
163
176
- name : Tests
164
177
run : xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"
178
+
179
+ build_ubuntu_ssltests :
180
+ name : ' Ubuntu SSL tests with OpenSSL ${{ matrix.openssl_ver }}'
181
+ runs-on : ubuntu-20.04
182
+ needs : check_source
183
+ if : needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_ssl_tests == 'true'
184
+ strategy :
185
+ fail-fast : false
186
+ matrix :
187
+ openssl_ver : [1.0.2u, 1.1.0l, 1.1.1k, 3.0.0-alpha14]
188
+ env :
189
+ OPENSSL_VER : ${{ matrix.openssl_ver }}
190
+ MULTISSL_DIR : ${{ github.workspace }}/multissl
191
+ OPENSSL_DIR : ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}
192
+ LD_LIBRARY_PATH : ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
193
+ steps :
194
+ - uses : actions/checkout@v2
195
+ - name : Install Dependencies
196
+ run : sudo ./.github/workflows/posix-deps-apt.sh
197
+ - name : Configure OpenSSL env vars
198
+ run : |
199
+ echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
200
+ echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
201
+ echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
202
+ - name : ' Restore OpenSSL build'
203
+ id : cache-openssl
204
+ uses : actions/cache@v2.1.4
205
+ with :
206
+ path : ./multissl/openssl/${{ env.OPENSSL_VER }}
207
+ key : ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
208
+ - name : Install OpenSSL
209
+ if : steps.cache-openssl.outputs.cache-hit != 'true'
210
+ run : python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
211
+ - name : Add ccache to PATH
212
+ run : |
213
+ echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
214
+ - name : Configure ccache action
215
+ uses : hendrikmuhs/ccache-action@v1
216
+ - name : Configure CPython
217
+ run : ./configure --with-pydebug --with-openssl=$OPENSSL_DIR
218
+ - name : Build CPython
219
+ run : make -j4
220
+ - name : Display build info
221
+ run : make pythoninfo
222
+ - name : SSL tests
223
+ run : ./python Lib/test/ssltests.py
0 commit comments