55 test :
66 strategy :
77 matrix :
8- python_version : ['2.7 ', '3.10 ']
8+ python_version : ['3.10 ', '3.12 ']
99 os : [ubuntu-latest]
10+ include :
11+ - python_version : ' 2.7'
12+ os : ubuntu-22.04
1013 runs-on : ${{ matrix.os }}
1114 timeout-minutes : 30
1215 steps :
@@ -21,23 +24,30 @@ jobs:
2124
2225 - name : Install RPyC for gdb
2326 run : |
24- # The version packaged in python3-rpyc is too old on Ubuntu 22.04
27+ # The version packaged in python3-rpyc is too old on Ubuntu 24.04
28+ # We use ^6.0 from pip.
2529 sudo apt-get update && sudo apt-get install -y python3-pip gdb gdbserver
26- /usr/bin/python -m pip install rpyc
30+ /usr/bin/python -m pip install --break-system-packages rpyc || /usr/bin/python -m pip install rpyc
2731 gdb --batch --quiet --nx --nh --ex 'py import rpyc; print(rpyc.version.version)'
2832
2933 - name : Cache for pip
3034 uses : actions/cache@v4
35+ if : matrix.python_version == '2.7'
3136 id : cache-pip
3237 with :
3338 path : ~/.cache/pip
34- key : ${{ matrix.os }}-cache-pip
39+ key : ${{ matrix.os }}-${{ matrix.python_version }}-cache-pip-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }}
40+ restore-keys : ${{ matrix.os }}-${{ matrix.python_version }}-cache-pip-
3541
3642 - name : Set up Python ${{ matrix.python_version }}
3743 if : matrix.python_version != '2.7'
3844 uses : actions/setup-python@v5
3945 with :
4046 python-version : ${{ matrix.python_version }}
47+ cache : ' pip'
48+ cache-dependency-path : |
49+ **/pyproject.toml
50+ **/requirements*.txt
4151
4252 - name : Set up Python 2.7
4353 if : matrix.python_version == '2.7'
@@ -203,7 +213,7 @@ jobs:
203213 python -m build
204214
205215 - uses : actions/upload-artifact@v4
206- if : matrix.python_version != '2.7 '
216+ if : matrix.python_version == '3.10 '
207217 with :
208218 name : packages
209219 path : dist/
@@ -252,7 +262,7 @@ jobs:
252262
253263 - name : Install coveralls
254264 run : |
255- pip install tomli coveralls
265+ pip install --break-system-packages tomli coveralls
256266
257267 - name : Upload coverage to coveralls.io
258268 run : |
0 commit comments