Skip to content

Commit e102b99

Browse files
committed
[workflows/ci.yml] Move pinned Ubuntu runner images from withdrawn 20.4 to 22.04
* fix consequent missing `python-is-python2` package
1 parent 680069a commit e102b99

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
strategy:
117117
fail-fast: true
118118
matrix:
119-
os: [ubuntu-20.04]
119+
os: [ubuntu-22.04]
120120
python-version: ${{ fromJSON(needs.select.outputs.cpython-versions) }}
121121
python-impl: [cpython]
122122
ytdl-test-set: ${{ fromJSON(needs.select.outputs.test-set) }}
@@ -133,12 +133,12 @@ jobs:
133133
ytdl-test-set: ${{ contains(needs.select.outputs.test-set, 'download') && 'download' || 'nodownload' }}
134134
run-tests-ext: bat
135135
# jython
136-
- os: ubuntu-20.04
136+
- os: ubuntu-22.04
137137
python-version: 2.7
138138
python-impl: jython
139139
ytdl-test-set: ${{ contains(needs.select.outputs.test-set, 'core') && 'core' || 'nocore' }}
140140
run-tests-ext: sh
141-
- os: ubuntu-20.04
141+
- os: ubuntu-22.04
142142
python-version: 2.7
143143
python-impl: jython
144144
ytdl-test-set: ${{ contains(needs.select.outputs.test-set, 'download') && 'download' || 'nodownload' }}
@@ -160,7 +160,7 @@ jobs:
160160
# NB may run apt-get install in Linux
161161
uses: ytdl-org/setup-python@v1
162162
env:
163-
# Temporary workaround for Python 3.5 failures - May 2024
163+
# Temporary (?) workaround for Python 3.5 failures - May 2024
164164
PIP_TRUSTED_HOST: "pypi.python.org pypi.org files.pythonhosted.org"
165165
with:
166166
python-version: ${{ matrix.python-version }}
@@ -240,7 +240,10 @@ jobs:
240240
# install 2.7
241241
shell: bash
242242
run: |
243-
sudo apt-get install -y python2 python-is-python2
243+
# Ubuntu 22.04 no longer has python-is-python2: fetch it
244+
curl -L "http://launchpadlibrarian.net/474693132/python-is-python2_2.7.17-4_all.deb" -o python-is-python2.deb
245+
sudo apt-get install -y python2
246+
sudo dpkg --force-breaks -i python-is-python2.deb
244247
echo "PYTHONHOME=/usr" >> "$GITHUB_ENV"
245248
#-------- Python 2.6 --
246249
- name: Set up Python 2.6 environment

0 commit comments

Comments
 (0)