6464 - uses : actions/setup-python@v2
6565 - name : Install Dependencies
6666 run : sudo ./.github/workflows/posix-deps-apt.sh
67+ - name : Add ccache to PATH
68+ run : echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
69+ - name : Configure ccache action
70+ uses : hendrikmuhs/ccache-action@v1
71+ - name : Check Autoconf version 2.69 and aclocal 1.16.3
72+ run : |
73+ grep "Generated by GNU Autoconf 2.69" configure
74+ grep "aclocal 1.16.3" aclocal.m4
75+ grep -q "runstatedir" configure
76+ grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
77+ - name : Regenerate autoconf files
78+ run : docker run --rm -v $(pwd):/src quay.io/tiran/cpython_autoconf:269
6779 - name : Build CPython
6880 run : |
6981 # Build Python with the libpython dynamic library
@@ -75,20 +87,19 @@ jobs:
7587 git add -u
7688 changes=$(git status --porcelain)
7789 # Check for changes in regenerated files
78- if ! test -z "$changes"
79- then
80- echo "Generated files not up to date. Perhaps you forgot to run make regen-all or build.bat --regen ;)"
90+ if test -n "$changes"; then
91+ echo "Generated files not up to date."
92+ echo "Perhaps you forgot to run make regen-all or build.bat --regen. ;)"
93+ echo "configure files must be regenerated with a specific version of autoconf."
8194 echo "$changes"
95+ echo ""
96+ git diff --staged || true
8297 exit 1
8398 fi
8499 - name : Check exported libpython symbols
85100 run : make smelly
86101 - name : Check limited ABI symbols
87102 run : make check-limited-abi
88- - name : Check Autoconf version 2.69
89- run : |
90- grep "Generated by GNU Autoconf 2.69" configure
91- grep "PKG_PROG_PKG_CONFIG" aclocal.m4
92103
93104 build_win32 :
94105 name : ' Windows (x86)'
@@ -152,7 +163,7 @@ jobs:
152163 needs : check_source
153164 if : needs.check_source.outputs.run_tests == 'true'
154165 env :
155- OPENSSL_VER : 1.1.1l
166+ OPENSSL_VER : 1.1.1m
156167 PYTHONSTRICTEXTENSIONBUILD : 1
157168 steps :
158169 - uses : actions/checkout@v2
@@ -167,7 +178,7 @@ jobs:
167178 echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
168179 - name : ' Restore OpenSSL build'
169180 id : cache-openssl
170- 181+ 171182 with :
172183 path : ./multissl/openssl/${{ env.OPENSSL_VER }}
173184 key : ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -179,13 +190,28 @@ jobs:
179190 echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
180191 - name : Configure ccache action
181192 uses : hendrikmuhs/ccache-action@v1
182- - name : Configure CPython
183- run : ./configure --with-pydebug --with-openssl=$OPENSSL_DIR
184- - name : Build CPython
193+ - name : Setup directory envs for out-of-tree builds
194+ run : |
195+ echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
196+ echo "CPYTHON_BUILDDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-builddir)" >> $GITHUB_ENV
197+ - name : Create directories for read-only out-of-tree builds
198+ run : mkdir -p $CPYTHON_RO_SRCDIR $CPYTHON_BUILDDIR
199+ - name : Bind mount sources read-only
200+ run : sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR
201+ - name : Configure CPython out-of-tree
202+ working-directory : ${{ env.CPYTHON_BUILDDIR }}
203+ run : ../cpython-ro-srcdir/configure --with-pydebug --with-openssl=$OPENSSL_DIR
204+ - name : Build CPython out-of-tree
205+ working-directory : ${{ env.CPYTHON_BUILDDIR }}
185206 run : make -j4
186207 - name : Display build info
208+ working-directory : ${{ env.CPYTHON_BUILDDIR }}
187209 run : make pythoninfo
210+ - name : Remount sources writable for tests
211+ # some tests write to srcdir, lack of pyc files slows down testing
212+ run : sudo mount $CPYTHON_RO_SRCDIR -oremount,rw
188213 - name : Tests
214+ working-directory : ${{ env.CPYTHON_BUILDDIR }}
189215 run : xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"
190216
191217 build_ubuntu_ssltests :
@@ -196,7 +222,7 @@ jobs:
196222 strategy :
197223 fail-fast : false
198224 matrix :
199- openssl_ver : [1.1.1l , 3.0.0 ]
225+ openssl_ver : [1.1.1m , 3.0.1 ]
200226 env :
201227 OPENSSL_VER : ${{ matrix.openssl_ver }}
202228 MULTISSL_DIR : ${{ github.workspace }}/multissl
@@ -215,7 +241,7 @@ jobs:
215241 echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
216242 - name : ' Restore OpenSSL build'
217243 id : cache-openssl
218- 244+ 219245 with :
220246 path : ./multissl/openssl/${{ env.OPENSSL_VER }}
221247 key : ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -243,7 +269,7 @@ jobs:
243269 needs : check_source
244270 if : needs.check_source.outputs.run_tests == 'true'
245271 env :
246- OPENSSL_VER : 1.1.1l
272+ OPENSSL_VER : 1.1.1m
247273 PYTHONSTRICTEXTENSIONBUILD : 1
248274 ASAN_OPTIONS : detect_leaks=0:allocator_may_return_null=1:handle_segv=0
249275 steps :
@@ -259,7 +285,7 @@ jobs:
259285 echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
260286 - name : ' Restore OpenSSL build'
261287 id : cache-openssl
262- 288+ 263289 with :
264290 path : ./multissl/openssl/${{ env.OPENSSL_VER }}
265291 key : ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
0 commit comments