Skip to content

Commit 7c10599

Browse files
authored
Merge pull request #482 from Distributive-Network/ci-ubuntu20-deprecation
fix(CI): use Ubuntu 22.04 runner as Ubuntu 20.04 is deprecated by GitHub Actions
2 parents 7d9b2c7 + e5e338a commit 7c10599

File tree

1 file changed

+10
-23
lines changed

1 file changed

+10
-23
lines changed

.github/workflows/test-and-publish.yaml

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
required: false
1616
options:
1717
- ''
18-
- 'ubuntu-20.04'
18+
- 'ubuntu-22.04'
1919
- 'macos-13'
2020
- 'macos-14'
2121
- 'windows-2022'
@@ -64,8 +64,8 @@ jobs:
6464
strategy:
6565
fail-fast: false
6666
matrix:
67-
# Use Ubuntu 20.04 / macOS 13 x86_64 / macOS 14 arm64 + Python 3.10 to build SpiderMonkey
68-
os: [ 'ubuntu-20.04', 'macos-13', 'macos-14', 'ubuntu-22.04-arm' ] # macOS 14 runner exclusively runs on M1 hardwares
67+
# Use Ubuntu 22.04 / macOS 13 x86_64 / macOS 14 arm64 + Python 3.10 to build SpiderMonkey
68+
os: [ 'ubuntu-22.04', 'macos-13', 'macos-14', 'ubuntu-22.04-arm' ] # macOS 14 runner exclusively runs on M1 hardwares
6969
# see https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available
7070
python_version: [ '3.10' ]
7171
runs-on: ${{ matrix.os }}
@@ -132,7 +132,7 @@ jobs:
132132
strategy:
133133
fail-fast: false
134134
matrix:
135-
os: [ 'ubuntu-20.04', 'macos-13', 'macos-14', 'windows-2022', 'ubuntu-22.04-arm' ]
135+
os: [ 'ubuntu-22.04', 'macos-13', 'macos-14', 'windows-2022', 'ubuntu-22.04-arm' ]
136136
python_version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ]
137137
runs-on: ${{ matrix.os }}
138138
steps:
@@ -166,7 +166,7 @@ jobs:
166166
env:
167167
PYTHON_VERSION: ${{ matrix.python_version }}
168168
- name: Build Docs # only build docs once
169-
if: ${{ matrix.os == 'ubuntu-20.04' && matrix.python_version == '3.11' }}
169+
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.python_version == '3.11' }}
170170
run: |
171171
sudo apt-get install -y graphviz
172172
# the newest version in Ubuntu 20.04 repository is 1.8.17, but we need Doxygen 1.9 series
@@ -176,7 +176,7 @@ jobs:
176176
rm -rf doxygen-1.9.7 doxygen-1.9.7.linux.bin.tar.gz
177177
BUILD_DOCS=1 BUILD_TYPE=None poetry install
178178
- name: Upload Doxygen-generated docs as CI artifacts
179-
if: ${{ matrix.os == 'ubuntu-20.04' && matrix.python_version == '3.11' }}
179+
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.python_version == '3.11' }}
180180
uses: actions/upload-artifact@v4
181181
with:
182182
name: docs-${{ github.run_id }}-${{ github.sha }}
@@ -261,7 +261,7 @@ jobs:
261261
name: cores-${{ matrix.os }}-${{ matrix.python_version }}
262262
path: /cores
263263
sdist:
264-
runs-on: ubuntu-20.04
264+
runs-on: ubuntu-22.04
265265
steps:
266266
- uses: actions/checkout@v4
267267
with:
@@ -283,22 +283,9 @@ jobs:
283283
with:
284284
name: wheel-${{ github.run_id }}-${{ github.sha }}-sdist
285285
path: ./dist/
286-
check-install-from-sdist:
287-
needs: sdist
288-
runs-on: ubuntu-24.04
289-
steps:
290-
- uses: actions/setup-python@v5
291-
with:
292-
python-version: '3.10'
293-
- name: Download wheels built
294-
uses: actions/download-artifact@v4
295-
with:
296-
name: wheel-${{ github.run_id }}-${{ github.sha }}-sdist
297-
path: ./dist/
298-
- run: pip install ./dist/pythonmonkey-*.tar.gz
299286
publish:
300287
needs: [build-and-test, sdist]
301-
runs-on: ubuntu-20.04
288+
runs-on: ubuntu-22.04
302289
if: ${{ success() && github.event_name == 'push' && github.ref_type == 'tag' }}
303290
steps:
304291
# no need to checkout
@@ -322,7 +309,7 @@ jobs:
322309
# Implement a very basic Python package repository (https://peps.python.org/pep-0503/)
323310
# and deploy the static files to GitHub Pages
324311
needs: [build-and-test, sdist]
325-
runs-on: ubuntu-20.04
312+
runs-on: ubuntu-22.04
326313
if: ${{ (success() || failure()) && (github.ref_name == 'main' || github.ref_type == 'tag') }} # publish nightly builds regardless of tests failure
327314
permissions: # grant GITHUB_TOKEN the permissions required to make a Pages deployment
328315
pages: write
@@ -382,7 +369,7 @@ jobs:
382369
publish-archive:
383370
# Publish to ⊇istributive's archive server (https://archive.distributed.computer/releases/pythonmonkey/)
384371
needs: [build-and-test, sdist]
385-
runs-on: ubuntu-20.04
372+
runs-on: ubuntu-22.04
386373
if: ${{ (success() || failure()) && (github.ref_name == 'main' || github.ref_type == 'tag') }}
387374
environment:
388375
name: archive

0 commit comments

Comments
 (0)