github/workflows: Stop using ubuntu-20.04.

For GitHub Actions, ubuntu-20.04 is deprecated and will be removed by 1st
April 2025.  See announcement at
https://github.com/actions/runner-images/issues/11101

This commit changes actions that use ubuntu-20.04 to a newer image.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2025-02-12 14:03:31 +11:00
parent 2992e34956
commit 7e9d19e06b
8 changed files with 21 additions and 16 deletions

View file

@ -15,7 +15,7 @@ concurrency:
jobs:
test:
runs-on: ubuntu-20.04 # use 20.04 to get python2
runs-on: ubuntu-22.04 # use 22.04 to get python2
steps:
- uses: actions/checkout@v4
- name: Install packages

View file

@ -25,7 +25,7 @@ jobs:
ci_func: # names are functions in ci.sh
- esp32_build_cmod_spiram_s2
- esp32_build_s3_c3
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

View file

@ -19,7 +19,7 @@ concurrency:
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
defaults:
run:
working-directory: 'micropython repo' # test build with space in path

View file

@ -19,7 +19,7 @@ concurrency:
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install packages

View file

@ -19,7 +19,7 @@ concurrency:
jobs:
build_renesas_ra_board:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install packages

View file

@ -26,7 +26,7 @@ jobs:
- stm32_pyb_build
- stm32_nucleo_build
- stm32_misc_build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install packages

View file

@ -98,7 +98,7 @@ jobs:
run: tests/run-tests.py --print-failures
coverage_32bit:
runs-on: ubuntu-20.04 # use 20.04 to get libffi-dev:i386
runs-on: ubuntu-22.04 # use 22.04 to get libffi-dev:i386
steps:
- uses: actions/checkout@v4
- name: Install packages
@ -116,7 +116,7 @@ jobs:
run: tests/run-tests.py --print-failures
nanbox:
runs-on: ubuntu-20.04 # use 20.04 to get python2, and libffi-dev:i386
runs-on: ubuntu-22.04 # use 22.04 to get python2, and libffi-dev:i386
steps:
- uses: actions/checkout@v4
- name: Install packages
@ -142,7 +142,7 @@ jobs:
run: tests/run-tests.py --print-failures
stackless_clang:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install packages
@ -156,7 +156,7 @@ jobs:
run: tests/run-tests.py --print-failures
float_clang:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install packages

View file

@ -106,12 +106,16 @@ function ci_code_size_build {
# .mpy file format
function ci_mpy_format_setup {
sudo apt-get update
sudo apt-get install python2.7
sudo pip3 install pyelftools
python2.7 --version
python3 --version
}
function ci_mpy_format_test {
# Test mpy-tool.py dump feature on bytecode
python2 ./tools/mpy-tool.py -xd tests/frozen/frozentest.mpy
python2.7 ./tools/mpy-tool.py -xd tests/frozen/frozentest.mpy
python3 ./tools/mpy-tool.py -xd tests/frozen/frozentest.mpy
# Test mpy-tool.py dump feature on native code
@ -268,18 +272,18 @@ function ci_powerpc_build {
# ports/qemu
function ci_qemu_setup_arm {
ci_mpy_format_setup
ci_gcc_arm_setup
sudo apt-get update
sudo apt-get install qemu-system
sudo pip3 install pyelftools
qemu-system-arm --version
}
function ci_qemu_setup_rv32 {
ci_mpy_format_setup
ci_gcc_riscv_setup
sudo apt-get update
sudo apt-get install qemu-system
sudo pip3 install pyelftools
qemu-system-riscv32 --version
}
@ -580,10 +584,11 @@ function ci_unix_coverage_run_native_mpy_tests {
function ci_unix_32bit_setup {
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install gcc-multilib g++-multilib libffi-dev:i386
sudo apt-get install gcc-multilib g++-multilib libffi-dev:i386 python2.7
sudo pip3 install setuptools
sudo pip3 install pyelftools
gcc --version
python2.7 --version
python3 --version
}
@ -602,12 +607,12 @@ function ci_unix_coverage_32bit_run_native_mpy_tests {
function ci_unix_nanbox_build {
# Use Python 2 to check that it can run the build scripts
ci_unix_build_helper PYTHON=python2 VARIANT=nanbox CFLAGS_EXTRA="-DMICROPY_PY_MATH_CONSTANTS=1"
ci_unix_build_helper PYTHON=python2.7 VARIANT=nanbox CFLAGS_EXTRA="-DMICROPY_PY_MATH_CONSTANTS=1"
ci_unix_build_ffi_lib_helper gcc -m32
}
function ci_unix_nanbox_run_tests {
ci_unix_run_tests_full_helper nanbox PYTHON=python2
ci_unix_run_tests_full_helper nanbox PYTHON=python2.7
}
function ci_unix_float_build {