@@ -31,67 +31,81 @@ jobs:
3131 include :
3232 # Make sure to run mypyc compiled unit tests for both
3333 # the oldest and newest supported Python versions
34- - name : Test suite with py38 -ubuntu, mypyc-compiled
35- python : ' 3.8 '
34+ - name : Test suite with py39 -ubuntu, mypyc-compiled
35+ python : ' 3.9 '
3636 arch : x64
3737 os : ubuntu-latest
3838 toxenv : py
39- tox_extra_args : " -n 2 "
39+ tox_extra_args : " -n 4 "
4040 test_mypyc : true
41- - name : Test suite with py38-windows-64
42- python : ' 3.8'
43- arch : x64
44- os : windows-latest
45- toxenv : py38
46- tox_extra_args : " -n 2"
47- - name : Test suite with py39-ubuntu
41+ - name : Test suite with py39-windows-64
4842 python : ' 3.9'
4943 arch : x64
50- os : ubuntu -latest
51- toxenv : py
52- tox_extra_args : " -n 2 "
44+ os : windows -latest
45+ toxenv : py39
46+ tox_extra_args : " -n 4 "
5347 - name : Test suite with py310-ubuntu
5448 python : ' 3.10'
5549 arch : x64
5650 os : ubuntu-latest
5751 toxenv : py
58- tox_extra_args : " -n 2 "
52+ tox_extra_args : " -n 4 "
5953 - name : Test suite with py311-ubuntu, mypyc-compiled
6054 python : ' 3.11'
6155 arch : x64
6256 os : ubuntu-latest
6357 toxenv : py
64- tox_extra_args : " -n 2 "
58+ tox_extra_args : " -n 4 "
6559 test_mypyc : true
6660 - name : Test suite with py312-ubuntu, mypyc-compiled
67- python : ' 3.12-dev '
61+ python : ' 3.12'
6862 arch : x64
6963 os : ubuntu-latest
7064 toxenv : py
71- tox_extra_args : " -n 2 "
65+ tox_extra_args : " -n 4 "
7266 test_mypyc : true
73-
74- - name : mypyc runtime tests with py38-macos
75- python : ' 3.8.17'
67+ - name : Test suite with py313-ubuntu, mypyc-compiled
68+ python : ' 3.13'
7669 arch : x64
77- os : macos -latest
70+ os : ubuntu -latest
7871 toxenv : py
79- tox_extra_args : " -n 2 mypyc/test/test_run.py mypyc/test/test_external.py"
80- - name : mypyc runtime tests with py38-debug-build-ubuntu
81- python : ' 3.8.17'
72+ tox_extra_args : " -n 4"
73+ test_mypyc : true
74+
75+ # - name: Test suite with py314-dev-ubuntu
76+ # python: '3.14-dev'
77+ # arch: x64
78+ # os: ubuntu-latest
79+ # toxenv: py
80+ # tox_extra_args: "-n 4"
81+ # allow_failure: true
82+ # test_mypyc: true
83+
84+ - name : mypyc runtime tests with py39-macos
85+ python : ' 3.9.21'
8286 arch : x64
83- os : ubuntu-latest
87+ # TODO: macos-13 is the last one to support Python 3.9, change it to macos-latest when updating the Python version
88+ os : macos-13
8489 toxenv : py
85- tox_extra_args : " -n 2 mypyc/test/test_run.py mypyc/test/test_external.py"
86- debug_build : true
90+ tox_extra_args : " -n 3 mypyc/test/test_run.py mypyc/test/test_external.py"
91+ # This is broken. See
92+ # - https://github.com/python/mypy/issues/17819
93+ # - https://github.com/python/mypy/pull/17822
94+ # - name: mypyc runtime tests with py38-debug-build-ubuntu
95+ # python: '3.9.21'
96+ # arch: x64
97+ # os: ubuntu-latest
98+ # toxenv: py
99+ # tox_extra_args: "-n 4 mypyc/test/test_run.py mypyc/test/test_external.py"
100+ # debug_build: true
87101
88- - name : Type check our own code (py38 -ubuntu)
89- python : ' 3.8 '
102+ - name : Type check our own code (py39 -ubuntu)
103+ python : ' 3.9 '
90104 arch : x64
91105 os : ubuntu-latest
92106 toxenv : type
93- - name : Type check our own code (py38 -windows-64)
94- python : ' 3.8 '
107+ - name : Type check our own code (py39 -windows-64)
108+ python : ' 3.9 '
95109 arch : x64
96110 os : windows-latest
97111 toxenv : type
@@ -106,10 +120,11 @@ jobs:
106120 toxenv : lint
107121
108122 name : ${{ matrix.name }}
123+ timeout-minutes : 60
109124 env :
110125 TOX_SKIP_MISSING_INTERPRETERS : False
111- # Rich (pip)
112- FORCE_COLOR : 1
126+ # Rich (pip) -- Disable color for windows + pytest
127+ FORCE_COLOR : ${{ !(startsWith(matrix.os, 'windows-') && startsWith(matrix.toxenv, 'py')) && 1 || 0 }}
113128 # Tox
114129 PY_COLORS : 1
115130 # Mypy (see https://github.com/python/mypy/issues/7771)
@@ -118,35 +133,74 @@ jobs:
118133 MYPY_FORCE_TERMINAL_WIDTH : 200
119134 # Pytest
120135 PYTEST_ADDOPTS : --color=yes
136+
121137 steps :
122- - uses : actions/checkout@v3
123- - uses : actions/setup-python@v4
124- with :
125- python-version : ${{ matrix.python }}
126- architecture : ${{ matrix.arch }}
138+ - uses : actions/checkout@v4
139+
127140 - name : Debug build
128141 if : ${{ matrix.debug_build }}
129142 run : |
130143 PYTHONVERSION=${{ matrix.python }}
131144 PYTHONDIR=~/python-debug/python-$PYTHONVERSION
132145 VENV=$PYTHONDIR/env
133146 ./misc/build-debug-python.sh $PYTHONVERSION $PYTHONDIR $VENV
147+ # TODO: does this do anything? env vars aren't passed to the next step right
134148 source $VENV/bin/activate
149+ - name : Latest dev build
150+ if : ${{ endsWith(matrix.python, '-dev') }}
151+ run : |
152+ git clone --depth 1 https://github.com/python/cpython.git /tmp/cpython --branch $( echo ${{ matrix.python }} | sed 's/-dev//' )
153+ cd /tmp/cpython
154+ echo git rev-parse HEAD; git rev-parse HEAD
155+ git show --no-patch
156+ sudo apt-get update
157+ sudo apt-get install -y --no-install-recommends \
158+ build-essential gdb lcov libbz2-dev libffi-dev libgdbm-dev liblzma-dev libncurses5-dev \
159+ libreadline6-dev libsqlite3-dev libssl-dev lzma lzma-dev tk-dev uuid-dev zlib1g-dev
160+ ./configure --prefix=/opt/pythondev
161+ make -j$(nproc)
162+ sudo make install
163+ sudo ln -s /opt/pythondev/bin/python3 /opt/pythondev/bin/python
164+ sudo ln -s /opt/pythondev/bin/pip3 /opt/pythondev/bin/pip
165+ echo "/opt/pythondev/bin" >> $GITHUB_PATH
166+ - uses : actions/setup-python@v5
167+ if : ${{ !(matrix.debug_build || endsWith(matrix.python, '-dev')) }}
168+ with :
169+ python-version : ${{ matrix.python }}
170+ architecture : ${{ matrix.arch }}
171+
135172 - name : Install tox
136- run : pip install --upgrade 'setuptools!=50' tox==4.11.0
173+ run : |
174+ echo PATH; echo $PATH
175+ echo which python; which python
176+ echo which pip; which pip
177+ echo python version; python -c 'import sys; print(sys.version)'
178+ echo debug build; python -c 'import sysconfig; print(bool(sysconfig.get_config_var("Py_DEBUG")))'
179+ echo os.cpu_count; python -c 'import os; print(os.cpu_count())'
180+ echo os.sched_getaffinity; python -c 'import os; print(len(getattr(os, "sched_getaffinity", lambda *args: [])(0)))'
181+ pip install setuptools==75.1.0 tox==4.21.2
182+
137183 - name : Compiled with mypyc
138184 if : ${{ matrix.test_mypyc }}
139185 run : |
140186 pip install -r test-requirements.txt
141187 CC=clang MYPYC_OPT_LEVEL=0 MYPY_USE_MYPYC=1 pip install -e .
188+
142189 - name : Setup tox environment
143- run : tox run -e ${{ matrix.toxenv }} --notest
190+ run : |
191+ tox run -e ${{ matrix.toxenv }} --notest
144192 - name : Test
145193 run : tox run -e ${{ matrix.toxenv }} --skip-pkg-install -- ${{ matrix.tox_extra_args }}
194+ continue-on-error : ${{ matrix.allow_failure == 'true' }}
195+
196+ - name : Mark as success (check failures manually)
197+ if : ${{ matrix.allow_failure == 'true' }}
198+ run : exit 0
146199
147200 python_32bits :
148201 runs-on : ubuntu-latest
149202 name : Test mypyc suite with 32-bit Python
203+ timeout-minutes : 60
150204 env :
151205 TOX_SKIP_MISSING_INTERPRETERS : False
152206 # Rich (pip)
@@ -162,7 +216,7 @@ jobs:
162216 CXX : i686-linux-gnu-g++
163217 CC : i686-linux-gnu-gcc
164218 steps :
165- - uses : actions/checkout@v3
219+ - uses : actions/checkout@v4
166220 - name : Install 32-bit build dependencies
167221 run : |
168222 sudo dpkg --add-architecture i386 && \
@@ -185,8 +239,8 @@ jobs:
185239 default : 3.11.1
186240 command : python -c "import platform; print(f'{platform.architecture()=} {platform.machine()=}');"
187241 - name : Install tox
188- run : pip install --upgrade ' setuptools!=50' tox==4.11.0
242+ run : pip install setuptools==75.1.0 tox==4.21.2
189243 - name : Setup tox environment
190244 run : tox run -e py --notest
191245 - name : Test
192- run : tox run -e py --skip-pkg-install -- -n 2 mypyc/test/
246+ run : tox run -e py --skip-pkg-install -- -n 4 mypyc/test/
0 commit comments