Merge pull request #2573 from openmv/update_ci_workflows

github: Update CI workflows.
This commit is contained in:
Ibrahim Abdelkader 2025-01-03 17:49:21 +02:00 committed by GitHub
commit d508bf90dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 27 additions and 10 deletions

View File

@ -12,7 +12,7 @@ jobs:
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: '↓ Download code size report'
uses: actions/download-artifact@v4

View File

@ -20,7 +20,7 @@ on:
jobs:
formatting-check:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: '⏳ Checkout repository'
uses: actions/checkout@v4

View File

@ -12,7 +12,7 @@ on:
jobs:
check-commit-messages:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: '📜 Check commit messages format'
uses: gsactions/commit-message-checker@v2

View File

@ -25,7 +25,7 @@ on:
jobs:
build-firmware:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
target: [OPENMV2, OPENMV3, OPENMV4, OPENMV4P, OPENMVPT, OPENMV_RT1060, ARDUINO_PORTENTA_H7, ARDUINO_GIGA, ARDUINO_NICLA_VISION, ARDUINO_NANO_RP2040_CONNECT, ARDUINO_NANO_33_BLE_SENSE]
@ -46,7 +46,8 @@ jobs:
path: |
~/cache/gcc
~/cache/llvm
key: 'toolchain_gcc-13.2.rel1_llvm-18.1.3'
~/cache/make
key: 'toolchain_gcc-13.2.rel1_llvm-18.1.3_make_4.4.1'
- name: '🐍 Install Python'
uses: actions/setup-python@v5
@ -59,6 +60,10 @@ jobs:
pip install ethos-u-vela==3.12.0
vela --version
- name: '🛠 Install GNU Make '
if: steps.cache.outputs.cache-hit != 'true'
run: source tools/ci.sh && ci_install_gnu_make
- name: '🛠 Install GCC toolchain '
if: steps.cache.outputs.cache-hit != 'true'
run: source tools/ci.sh && ci_install_arm_gcc
@ -79,7 +84,7 @@ jobs:
code-size-report:
needs: build-firmware
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: github.event_name == 'pull_request'
steps:
- name: '⏳ Checkout repository'
@ -94,7 +99,8 @@ jobs:
path: |
~/cache/gcc
~/cache/llvm
key: 'toolchain_gcc-13.2.rel1_llvm-18.1.3'
~/cache/make
key: 'toolchain_gcc-13.2.rel1_llvm-18.1.3_make_4.4.1'
- name: '🐍 Install Python'
uses: actions/setup-python@v5
@ -137,7 +143,7 @@ jobs:
stable-release:
needs: build-firmware
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- name: '⏳ Checkout repository'
@ -179,7 +185,7 @@ jobs:
development-release:
needs: build-firmware
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') == false
permissions:
contents: write

View File

@ -8,6 +8,9 @@ GCC_TOOLCHAIN_URL="https://developer.arm.com/-/media/Files/downloads/gnu/13.2.re
LLVM_TOOLCHAIN_PATH=${HOME}/cache/llvm
LLVM_TOOLCHAIN_URL="https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-18.1.3/LLVM-ET-Arm-18.1.3-Linux-x86_64.tar.xz"
GNU_MAKE_PATH=${HOME}/cache/make
GNU_MAKE_URL="https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz"
ci_install_arm_gcc() {
mkdir -p ${GCC_TOOLCHAIN_PATH}
wget --no-check-certificate -O - ${GCC_TOOLCHAIN_URL} | tar --strip-components=1 -Jx -C ${GCC_TOOLCHAIN_PATH}
@ -22,6 +25,14 @@ ci_install_arm_llvm() {
clang --version
}
ci_install_gnu_make() {
mkdir -p ${GNU_MAKE_PATH}
wget --no-check-certificate -O - ${GNU_MAKE_URL} | tar --strip-components=1 -zx -C ${GNU_MAKE_PATH}
cd ${GNU_MAKE_PATH} && ./configure && make -j$(nproc)
export PATH=${GNU_MAKE_PATH}:${PATH}
make --version
}
########################################################################################
# Update Submodules.
@ -35,7 +46,7 @@ ci_update_submodules() {
# Build Targets.
ci_build_target() {
export PATH=${GCC_TOOLCHAIN_PATH}/bin:${PATH}
export PATH=${GNU_MAKE_PATH}:${GCC_TOOLCHAIN_PATH}/bin:${PATH}
make -j$(nproc) -C src/micropython/mpy-cross
make -j$(nproc) TARGET=${1} LLVM_PATH=${LLVM_TOOLCHAIN_PATH}/bin -C src
mv src/build/bin ${1}