|
71 | 71 | tox_extra_args: "-n 4" |
72 | 72 | test_mypyc: true |
73 | 73 |
|
| 74 | + - name: Test suit with py313-dev-ubuntu, mypyc-compiled |
| 75 | + python: '3.13-dev' |
| 76 | + arch: x64 |
| 77 | + os: ubuntu-latest |
| 78 | + toxenv: py |
| 79 | + tox_extra_args: "-n 4" |
| 80 | + test_mypyc: true |
| 81 | + # - name: Test suit with py314-dev-ubuntu |
| 82 | + # python: '3.14-dev' |
| 83 | + # arch: x64 |
| 84 | + # os: ubuntu-latest |
| 85 | + # toxenv: py |
| 86 | + # tox_extra_args: "-n 4" |
| 87 | + # allow_failure: true |
| 88 | + # test_mypyc: true |
| 89 | + |
74 | 90 | - name: mypyc runtime tests with py39-macos |
75 | 91 | python: '3.9.18' |
76 | 92 | arch: x64 |
@@ -119,51 +135,69 @@ jobs: |
119 | 135 | MYPY_FORCE_TERMINAL_WIDTH: 200 |
120 | 136 | # Pytest |
121 | 137 | PYTEST_ADDOPTS: --color=yes |
| 138 | + |
122 | 139 | steps: |
123 | 140 | - uses: actions/checkout@v4 |
124 | | - - uses: actions/setup-python@v5 |
125 | | - with: |
126 | | - python-version: ${{ matrix.python }} |
127 | | - architecture: ${{ matrix.arch }} |
| 141 | + |
128 | 142 | - name: Debug build |
129 | 143 | if: ${{ matrix.debug_build }} |
130 | 144 | run: | |
131 | 145 | PYTHONVERSION=${{ matrix.python }} |
132 | 146 | PYTHONDIR=~/python-debug/python-$PYTHONVERSION |
133 | 147 | VENV=$PYTHONDIR/env |
134 | 148 | ./misc/build-debug-python.sh $PYTHONVERSION $PYTHONDIR $VENV |
| 149 | + # TODO: does this do anything? env vars aren't passed to the next step right |
135 | 150 | source $VENV/bin/activate |
| 151 | + - name: Latest Dev build |
| 152 | + if: ${{ endsWith(matrix.python, '-dev') }} |
| 153 | + run: | |
| 154 | + sudo apt-get update |
| 155 | + sudo apt-get install -y --no-install-recommends \ |
| 156 | + build-essential gdb lcov libbz2-dev libffi-dev libgdbm-dev liblzma-dev libncurses5-dev \ |
| 157 | + libreadline6-dev libsqlite3-dev libssl-dev lzma lzma-dev tk-dev uuid-dev zlib1g-dev |
| 158 | + git clone --depth 1 https://github.com/python/cpython.git /tmp/cpython --branch $( echo ${{ matrix.python }} | sed 's/-dev//' ) |
| 159 | + cd /tmp/cpython |
| 160 | + echo git rev-parse HEAD; git rev-parse HEAD |
| 161 | + git show --no-patch |
| 162 | + ./configure --prefix=/opt/pythondev |
| 163 | + make -j$(nproc) |
| 164 | + sudo make install |
| 165 | + sudo ln -s /opt/pythondev/bin/python3 /opt/pythondev/bin/python |
| 166 | + sudo ln -s /opt/pythondev/bin/pip3 /opt/pythondev/bin/pip |
| 167 | + echo "/opt/pythondev/bin" >> $GITHUB_PATH |
| 168 | + - uses: actions/setup-python@v5 |
| 169 | + if: ${{ !(matrix.debug_build || endsWith(matrix.python, '-dev')) }} |
| 170 | + with: |
| 171 | + python-version: ${{ matrix.python }} |
| 172 | + architecture: ${{ matrix.arch }} |
| 173 | + |
136 | 174 | - name: Install tox |
137 | | - run: pip install setuptools==68.2.2 tox==4.11.0 |
| 175 | + run: | |
| 176 | + echo PATH; echo $PATH |
| 177 | + echo which python; which python |
| 178 | + echo which pip; which pip |
| 179 | + echo python version; python -c 'import sys; print(sys.version)' |
| 180 | + echo debug build; python -c 'import sysconfig; print(bool(sysconfig.get_config_var("Py_DEBUG")))' |
| 181 | + echo os.cpu_count; python -c 'import os; print(os.cpu_count())' |
| 182 | + echo os.sched_getaffinity; python -c 'import os; print(len(getattr(os, "sched_getaffinity", lambda *args: [])(0)))' |
| 183 | + pip install setuptools==68.2.2 tox==4.11.0 |
| 184 | +
|
138 | 185 | - name: Compiled with mypyc |
139 | 186 | if: ${{ matrix.test_mypyc }} |
140 | 187 | run: | |
141 | 188 | pip install -r test-requirements.txt |
142 | 189 | CC=clang MYPYC_OPT_LEVEL=0 MYPY_USE_MYPYC=1 pip install -e . |
| 190 | +
|
143 | 191 | - name: Setup tox environment |
144 | 192 | run: | |
145 | | - tox run -e ${{ matrix.toxenv }} --notest |
146 | | - python -c 'import os; print("os.cpu_count", os.cpu_count(), "os.sched_getaffinity", len(getattr(os, "sched_getaffinity", lambda *args: [])(0)))' |
| 193 | + tox run -e ${{ matrix.toxenv }} --notes |
147 | 194 | - name: Test |
148 | 195 | run: tox run -e ${{ matrix.toxenv }} --skip-pkg-install -- ${{ matrix.tox_extra_args }} |
| 196 | + continue-on-error: ${{ matrix.allow_failure == 'true' }} |
149 | 197 |
|
150 | | - python-nightly: |
151 | | - runs-on: ubuntu-latest |
152 | | - name: Test suite with Python nightly |
153 | | - steps: |
154 | | - - uses: actions/checkout@v3 |
155 | | - - uses: actions/setup-python@v4 |
156 | | - with: |
157 | | - python-version: '3.13-dev' |
158 | | - - name: Install tox |
159 | | - run: pip install setuptools==68.2.2 tox==4.11.0 |
160 | | - - name: Setup tox environment |
161 | | - run: tox run -e py --notest |
162 | | - - name: Test |
163 | | - run: tox run -e py --skip-pkg-install -- "-n 4" |
164 | | - continue-on-error: true |
165 | | - - name: Mark as a success |
166 | | - run: exit 0 |
| 198 | + - name: Mark as success (check failures manually) |
| 199 | + if: ${{ matrix.allow_failure == 'true' }} |
| 200 | + run: exit 0 |
167 | 201 |
|
168 | 202 | python_32bits: |
169 | 203 | runs-on: ubuntu-latest |
|
0 commit comments