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