77 workflow_dispatch :
88 push :
99 branches :
10- - ' main'
11- - ' 3.11'
12- - ' 3.10'
13- - ' 3.9'
14- - ' 3.8'
15- - ' 3.7'
10+ - ' pylbbv'
11+
1612 pull_request :
1713 branches :
18- - ' main'
19- - ' 3.11'
20- - ' 3.10'
21- - ' 3.9'
22- - ' 3.8'
23- - ' 3.7'
14+ - ' pylbbv'
2415
2516permissions :
2617 contents : read
5950 # https://github.com/python/core-workflow/issues/373
6051 git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo "run_tests=true" >> $GITHUB_OUTPUT || true
6152 fi
62-
63- check_generated_files :
64- name : ' Check if generated files are up to date'
65- runs-on : ubuntu-latest
66- needs : check_source
67- if : needs.check_source.outputs.run_tests == 'true'
68- steps :
69- - uses : actions/checkout@v3
70- - uses : actions/setup-python@v3
71- - name : Install Dependencies
72- run : sudo ./.github/workflows/posix-deps-apt.sh
73- - name : Add ccache to PATH
74- run : echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
75- - name : Configure ccache action
76- uses : hendrikmuhs/ccache-action@v1.2
77- - name : Check Autoconf version 2.69 and aclocal 1.16.3
78- run : |
79- grep "Generated by GNU Autoconf 2.69" configure
80- grep "aclocal 1.16.3" aclocal.m4
81- grep -q "runstatedir" configure
82- grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
83- - name : Configure CPython
84- run : |
85- # Build Python with the libpython dynamic library
86- ./configure --with-pydebug --enable-shared
87- - name : Regenerate autoconf files with container image
88- run : make regen-configure
89- - name : Build CPython
90- run : |
91- # Deepfreeze will usually cause global objects to be added or removed,
92- # so we run it before regen-global-objects gets rum (in regen-all).
93- make regen-deepfreeze
94- make -j4 regen-all
95- make regen-stdlib-module-names
96- - name : Check for changes
97- run : |
98- git add -u
99- changes=$(git status --porcelain)
100- # Check for changes in regenerated files
101- if test -n "$changes"; then
102- echo "Generated files not up to date."
103- echo "Perhaps you forgot to run make regen-all or build.bat --regen. ;)"
104- echo "configure files must be regenerated with a specific version of autoconf."
105- echo "$changes"
106- echo ""
107- git diff --staged || true
108- exit 1
109- fi
110- - name : Check exported libpython symbols
111- run : make smelly
112- - name : Check limited ABI symbols
113- run : make check-limited-abi
114- - name : Check for unsupported C global variables
115- if : github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
116- run : make check-c-globals
117-
118- build_win32 :
119- name : ' Windows (x86)'
120- runs-on : windows-latest
121- needs : check_source
122- if : needs.check_source.outputs.run_tests == 'true'
123- env :
124- IncludeUwp : ' true'
125- steps :
126- - uses : actions/checkout@v3
127- - name : Build CPython
128- run : .\PCbuild\build.bat -e -d -p Win32
129- timeout-minutes : 30
130- - name : Display build info
131- run : .\python.bat -m test.pythoninfo
132- - name : Tests
133- run : .\PCbuild\rt.bat -p Win32 -d -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
134-
13553 build_win_amd64 :
13654 name : ' Windows (x64)'
13755 runs-on : windows-latest
@@ -146,186 +64,64 @@ jobs:
14664 - name : Build CPython
14765 run : .\PCbuild\build.bat -e -d -p x64
14866 timeout-minutes : 30
149- - name : Display build info
150- run : .\python.bat -m test.pythoninfo
151- - name : Tests
152- run : .\PCbuild\rt.bat -p x64 -d -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
153-
154- build_macos :
155- name : ' macOS'
156- runs-on : macos-latest
157- needs : check_source
158- if : needs.check_source.outputs.run_tests == 'true'
159- env :
160- HOMEBREW_NO_ANALYTICS : 1
161- HOMEBREW_NO_AUTO_UPDATE : 1
162- HOMEBREW_NO_INSTALL_CLEANUP : 1
163- PYTHONSTRICTEXTENSIONBUILD : 1
164- steps :
165- - uses : actions/checkout@v3
166- - name : Install Homebrew dependencies
167- run : brew install pkg-config openssl@1.1 xz gdbm tcl-tk
168- - name : Configure CPython
169- run : |
170- CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \
171- LDFLAGS="-L$(brew --prefix gdbm)/lib -I$(brew --prefix xz)/lib" \
172- PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \
173- ./configure \
174- --with-pydebug \
175- --prefix=/opt/python-dev \
176- --with-openssl="$(brew --prefix openssl@1.1)"
177- - name : Build CPython
178- run : make -j4
179- - name : Display build info
180- run : make pythoninfo
181- - name : Tests
182- run : make buildbottest TESTOPTS="-j4 -uall,-cpu"
183-
184- build_ubuntu :
185- name : ' Ubuntu'
186- runs-on : ubuntu-20.04
187- needs : check_source
188- if : needs.check_source.outputs.run_tests == 'true'
189- env :
190- OPENSSL_VER : 1.1.1t
191- PYTHONSTRICTEXTENSIONBUILD : 1
192- steps :
193- - uses : actions/checkout@v3
194- - name : Register gcc problem matcher
195- run : echo "::add-matcher::.github/problem-matchers/gcc.json"
196- - name : Install Dependencies
197- run : sudo ./.github/workflows/posix-deps-apt.sh
198- - name : Configure OpenSSL env vars
199- run : |
200- echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
201- echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
202- echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
203- - name : ' Restore OpenSSL build'
204- id : cache-openssl
205- uses : actions/cache@v3
206- with :
207- path : ./multissl/openssl/${{ env.OPENSSL_VER }}
208- key : ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
209- - name : Install OpenSSL
210- if : steps.cache-openssl.outputs.cache-hit != 'true'
211- run : python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
212- - name : Add ccache to PATH
213- run : |
214- echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
215- - name : Configure ccache action
216- uses : hendrikmuhs/ccache-action@v1.2
217- - name : Setup directory envs for out-of-tree builds
218- run : |
219- echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
220- echo "CPYTHON_BUILDDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-builddir)" >> $GITHUB_ENV
221- - name : Create directories for read-only out-of-tree builds
222- run : mkdir -p $CPYTHON_RO_SRCDIR $CPYTHON_BUILDDIR
223- - name : Bind mount sources read-only
224- run : sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR
225- - name : Configure CPython out-of-tree
226- working-directory : ${{ env.CPYTHON_BUILDDIR }}
227- run : ../cpython-ro-srcdir/configure --with-pydebug --with-openssl=$OPENSSL_DIR
228- - name : Build CPython out-of-tree
229- working-directory : ${{ env.CPYTHON_BUILDDIR }}
230- run : make -j4
231- - name : Display build info
232- working-directory : ${{ env.CPYTHON_BUILDDIR }}
233- run : make pythoninfo
234- - name : Remount sources writable for tests
235- # some tests write to srcdir, lack of pyc files slows down testing
236- run : sudo mount $CPYTHON_RO_SRCDIR -oremount,rw
67+ # - name: Display build info
68+ # run: .\python.bat -m test.pythoninfo
23769 - name : Tests
238- working-directory : ${{ env.CPYTHON_BUILDDIR }}
239- run : xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"
70+ run : .\python.bat tier2_test.py
24071
241- build_ubuntu_ssltests :
242- name : ' Ubuntu SSL tests with OpenSSL'
243- runs-on : ubuntu-20.04
244- needs : check_source
245- if : needs.check_source.outputs.run_tests == 'true'
246- strategy :
247- fail-fast : false
248- matrix :
249- openssl_ver : [1.1.1t, 3.0.8, 3.1.0-beta1]
250- env :
251- OPENSSL_VER : ${{ matrix.openssl_ver }}
252- MULTISSL_DIR : ${{ github.workspace }}/multissl
253- OPENSSL_DIR : ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}
254- LD_LIBRARY_PATH : ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
255- steps :
256- - uses : actions/checkout@v3
257- - name : Register gcc problem matcher
258- run : echo "::add-matcher::.github/problem-matchers/gcc.json"
259- - name : Install Dependencies
260- run : sudo ./.github/workflows/posix-deps-apt.sh
261- - name : Configure OpenSSL env vars
262- run : |
263- echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
264- echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
265- echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
266- - name : ' Restore OpenSSL build'
267- id : cache-openssl
268- uses : actions/cache@v3
269- with :
270- path : ./multissl/openssl/${{ env.OPENSSL_VER }}
271- key : ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
272- - name : Install OpenSSL
273- if : steps.cache-openssl.outputs.cache-hit != 'true'
274- run : python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
275- - name : Add ccache to PATH
276- run : |
277- echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
278- - name : Configure ccache action
279- uses : hendrikmuhs/ccache-action@v1.2
280- - name : Configure CPython
281- run : ./configure --with-pydebug --with-openssl=$OPENSSL_DIR
282- - name : Build CPython
283- run : make -j4
284- - name : Display build info
285- run : make pythoninfo
286- - name : SSL tests
287- run : ./python Lib/test/ssltests.py
288-
289-
290- build_asan :
291- name : ' Address sanitizer'
292- runs-on : ubuntu-20.04
293- needs : check_source
294- if : needs.check_source.outputs.run_tests == 'true'
295- env :
296- OPENSSL_VER : 1.1.1t
297- PYTHONSTRICTEXTENSIONBUILD : 1
298- ASAN_OPTIONS : detect_leaks=0:allocator_may_return_null=1:handle_segv=0
299- steps :
300- - uses : actions/checkout@v3
301- - name : Register gcc problem matcher
302- run : echo "::add-matcher::.github/problem-matchers/gcc.json"
303- - name : Install Dependencies
304- run : sudo ./.github/workflows/posix-deps-apt.sh
305- - name : Configure OpenSSL env vars
306- run : |
307- echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
308- echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
309- echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
310- - name : ' Restore OpenSSL build'
311- id : cache-openssl
312- uses : actions/cache@v3
313- with :
314- path : ./multissl/openssl/${{ env.OPENSSL_VER }}
315- key : ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
316- - name : Install OpenSSL
317- if : steps.cache-openssl.outputs.cache-hit != 'true'
318- run : python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
319- - name : Add ccache to PATH
320- run : |
321- echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
322- - name : Configure ccache action
323- uses : hendrikmuhs/ccache-action@v1.2
324- - name : Configure CPython
325- run : ./configure --with-address-sanitizer --without-pymalloc
326- - name : Build CPython
327- run : make -j4
328- - name : Display build info
329- run : make pythoninfo
330- - name : Tests
331- run : xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"
72+ # build_ubuntu:
73+ # name: 'Ubuntu'
74+ # runs-on: ubuntu-20.04
75+ # needs: check_source
76+ # if: needs.check_source.outputs.run_tests == 'true'
77+ # env:
78+ # OPENSSL_VER: 1.1.1t
79+ # PYTHONSTRICTEXTENSIONBUILD: 1
80+ # steps:
81+ # - uses: actions/checkout@v3
82+ # - name: Register gcc problem matcher
83+ # run: echo "::add-matcher::.github/problem-matchers/gcc.json"
84+ # - name: Install Dependencies
85+ # run: sudo ./.github/workflows/posix-deps-apt.sh
86+ # - name: Configure OpenSSL env vars
87+ # run: |
88+ # echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
89+ # echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
90+ # echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
91+ # - name: 'Restore OpenSSL build'
92+ # id: cache-openssl
93+ # uses: actions/cache@v3
94+ # with:
95+ # path: ./multissl/openssl/${{ env.OPENSSL_VER }}
96+ # key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
97+ # - name: Install OpenSSL
98+ # if: steps.cache-openssl.outputs.cache-hit != 'true'
99+ # run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
100+ # - name: Add ccache to PATH
101+ # run: |
102+ # echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
103+ # - name: Configure ccache action
104+ # uses: hendrikmuhs/ccache-action@v1.2
105+ # - name: Setup directory envs for out-of-tree builds
106+ # run: |
107+ # echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
108+ # echo "CPYTHON_BUILDDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-builddir)" >> $GITHUB_ENV
109+ # - name: Create directories for read-only out-of-tree builds
110+ # run: mkdir -p $CPYTHON_RO_SRCDIR $CPYTHON_BUILDDIR
111+ # - name: Bind mount sources read-only
112+ # run: sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR
113+ # - name: Configure CPython out-of-tree
114+ # working-directory: ${{ env.CPYTHON_BUILDDIR }}
115+ # run: ../cpython-ro-srcdir/configure --with-pydebug --with-openssl=$OPENSSL_DIR
116+ # - name: Build CPython out-of-tree
117+ # working-directory: ${{ env.CPYTHON_BUILDDIR }}
118+ # run: make -j4
119+ # # - name: Display build info
120+ # # working-directory: ${{ env.CPYTHON_BUILDDIR }}
121+ # # run: make pythoninfo
122+ # - name: Remount sources writable for tests
123+ # # some tests write to srcdir, lack of pyc files slows down testing
124+ # run: sudo mount $CPYTHON_RO_SRCDIR -oremount,rw
125+ # - name: Tests
126+ # working-directory: ${{ env.CPYTHON_BUILDDIR }}
127+ # run: xvfb-run ./python tier2_test.py
0 commit comments