Skip to content

Commit 7e9d19e

Browse files
committed
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 actions/runner-images#11101 This commit changes actions that use ubuntu-20.04 to a newer image. Signed-off-by: Damien George <damien@micropython.org>
1 parent 2992e34 commit 7e9d19e

File tree

8 files changed

+21
-16
lines changed

8 files changed

+21
-16
lines changed

.github/workflows/mpy_format.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515

1616
jobs:
1717
test:
18-
runs-on: ubuntu-20.04 # use 20.04 to get python2
18+
runs-on: ubuntu-22.04 # use 22.04 to get python2
1919
steps:
2020
- uses: actions/checkout@v4
2121
- name: Install packages

.github/workflows/ports_esp32.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
ci_func: # names are functions in ci.sh
2626
- esp32_build_cmod_spiram_s2
2727
- esp32_build_s3_c3
28-
runs-on: ubuntu-20.04
28+
runs-on: ubuntu-latest
2929
steps:
3030
- uses: actions/checkout@v4
3131

.github/workflows/ports_mimxrt.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ concurrency:
1919

2020
jobs:
2121
build:
22-
runs-on: ubuntu-20.04
22+
runs-on: ubuntu-latest
2323
defaults:
2424
run:
2525
working-directory: 'micropython repo' # test build with space in path

.github/workflows/ports_nrf.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ concurrency:
1919

2020
jobs:
2121
build:
22-
runs-on: ubuntu-20.04
22+
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/checkout@v4
2525
- name: Install packages

.github/workflows/ports_renesas-ra.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ concurrency:
1919

2020
jobs:
2121
build_renesas_ra_board:
22-
runs-on: ubuntu-20.04
22+
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/checkout@v4
2525
- name: Install packages

.github/workflows/ports_stm32.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- stm32_pyb_build
2727
- stm32_nucleo_build
2828
- stm32_misc_build
29-
runs-on: ubuntu-20.04
29+
runs-on: ubuntu-22.04
3030
steps:
3131
- uses: actions/checkout@v4
3232
- name: Install packages

.github/workflows/ports_unix.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
run: tests/run-tests.py --print-failures
9999

100100
coverage_32bit:
101-
runs-on: ubuntu-20.04 # use 20.04 to get libffi-dev:i386
101+
runs-on: ubuntu-22.04 # use 22.04 to get libffi-dev:i386
102102
steps:
103103
- uses: actions/checkout@v4
104104
- name: Install packages
@@ -116,7 +116,7 @@ jobs:
116116
run: tests/run-tests.py --print-failures
117117

118118
nanbox:
119-
runs-on: ubuntu-20.04 # use 20.04 to get python2, and libffi-dev:i386
119+
runs-on: ubuntu-22.04 # use 22.04 to get python2, and libffi-dev:i386
120120
steps:
121121
- uses: actions/checkout@v4
122122
- name: Install packages
@@ -142,7 +142,7 @@ jobs:
142142
run: tests/run-tests.py --print-failures
143143

144144
stackless_clang:
145-
runs-on: ubuntu-20.04
145+
runs-on: ubuntu-latest
146146
steps:
147147
- uses: actions/checkout@v4
148148
- name: Install packages
@@ -156,7 +156,7 @@ jobs:
156156
run: tests/run-tests.py --print-failures
157157

158158
float_clang:
159-
runs-on: ubuntu-20.04
159+
runs-on: ubuntu-latest
160160
steps:
161161
- uses: actions/checkout@v4
162162
- name: Install packages

tools/ci.sh

+11-6
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,16 @@ function ci_code_size_build {
106106
# .mpy file format
107107

108108
function ci_mpy_format_setup {
109+
sudo apt-get update
110+
sudo apt-get install python2.7
109111
sudo pip3 install pyelftools
112+
python2.7 --version
113+
python3 --version
110114
}
111115

112116
function ci_mpy_format_test {
113117
# Test mpy-tool.py dump feature on bytecode
114-
python2 ./tools/mpy-tool.py -xd tests/frozen/frozentest.mpy
118+
python2.7 ./tools/mpy-tool.py -xd tests/frozen/frozentest.mpy
115119
python3 ./tools/mpy-tool.py -xd tests/frozen/frozentest.mpy
116120

117121
# Test mpy-tool.py dump feature on native code
@@ -268,18 +272,18 @@ function ci_powerpc_build {
268272
# ports/qemu
269273

270274
function ci_qemu_setup_arm {
271-
ci_mpy_format_setup
272275
ci_gcc_arm_setup
273276
sudo apt-get update
274277
sudo apt-get install qemu-system
278+
sudo pip3 install pyelftools
275279
qemu-system-arm --version
276280
}
277281

278282
function ci_qemu_setup_rv32 {
279-
ci_mpy_format_setup
280283
ci_gcc_riscv_setup
281284
sudo apt-get update
282285
sudo apt-get install qemu-system
286+
sudo pip3 install pyelftools
283287
qemu-system-riscv32 --version
284288
}
285289

@@ -580,10 +584,11 @@ function ci_unix_coverage_run_native_mpy_tests {
580584
function ci_unix_32bit_setup {
581585
sudo dpkg --add-architecture i386
582586
sudo apt-get update
583-
sudo apt-get install gcc-multilib g++-multilib libffi-dev:i386
587+
sudo apt-get install gcc-multilib g++-multilib libffi-dev:i386 python2.7
584588
sudo pip3 install setuptools
585589
sudo pip3 install pyelftools
586590
gcc --version
591+
python2.7 --version
587592
python3 --version
588593
}
589594

@@ -602,12 +607,12 @@ function ci_unix_coverage_32bit_run_native_mpy_tests {
602607

603608
function ci_unix_nanbox_build {
604609
# Use Python 2 to check that it can run the build scripts
605-
ci_unix_build_helper PYTHON=python2 VARIANT=nanbox CFLAGS_EXTRA="-DMICROPY_PY_MATH_CONSTANTS=1"
610+
ci_unix_build_helper PYTHON=python2.7 VARIANT=nanbox CFLAGS_EXTRA="-DMICROPY_PY_MATH_CONSTANTS=1"
606611
ci_unix_build_ffi_lib_helper gcc -m32
607612
}
608613

609614
function ci_unix_nanbox_run_tests {
610-
ci_unix_run_tests_full_helper nanbox PYTHON=python2
615+
ci_unix_run_tests_full_helper nanbox PYTHON=python2.7
611616
}
612617

613618
function ci_unix_float_build {

0 commit comments

Comments
 (0)