mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #2573 from openmv/update_ci_workflows
github: Update CI workflows.
This commit is contained in:
commit
d508bf90dc
2
.github/workflows/code-size-report.yml
vendored
2
.github/workflows/code-size-report.yml
vendored
@ -12,7 +12,7 @@ jobs:
|
|||||||
github.event.workflow_run.event == 'pull_request' &&
|
github.event.workflow_run.event == 'pull_request' &&
|
||||||
github.event.workflow_run.conclusion == 'success'
|
github.event.workflow_run.conclusion == 'success'
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: '↓ Download code size report'
|
- name: '↓ Download code size report'
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
|
|||||||
2
.github/workflows/codeformat.yml
vendored
2
.github/workflows/codeformat.yml
vendored
@ -20,7 +20,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
formatting-check:
|
formatting-check:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: '⏳ Checkout repository'
|
- name: '⏳ Checkout repository'
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|||||||
2
.github/workflows/commit.yml
vendored
2
.github/workflows/commit.yml
vendored
@ -12,7 +12,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-commit-messages:
|
check-commit-messages:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: '📜 Check commit messages format'
|
- name: '📜 Check commit messages format'
|
||||||
uses: gsactions/commit-message-checker@v2
|
uses: gsactions/commit-message-checker@v2
|
||||||
|
|||||||
18
.github/workflows/firmware.yml
vendored
18
.github/workflows/firmware.yml
vendored
@ -25,7 +25,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-firmware:
|
build-firmware:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
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]
|
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: |
|
path: |
|
||||||
~/cache/gcc
|
~/cache/gcc
|
||||||
~/cache/llvm
|
~/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'
|
- name: '🐍 Install Python'
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
@ -59,6 +60,10 @@ jobs:
|
|||||||
pip install ethos-u-vela==3.12.0
|
pip install ethos-u-vela==3.12.0
|
||||||
vela --version
|
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 '
|
- name: '🛠 Install GCC toolchain '
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: source tools/ci.sh && ci_install_arm_gcc
|
run: source tools/ci.sh && ci_install_arm_gcc
|
||||||
@ -79,7 +84,7 @@ jobs:
|
|||||||
|
|
||||||
code-size-report:
|
code-size-report:
|
||||||
needs: build-firmware
|
needs: build-firmware
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
steps:
|
steps:
|
||||||
- name: '⏳ Checkout repository'
|
- name: '⏳ Checkout repository'
|
||||||
@ -94,7 +99,8 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
~/cache/gcc
|
~/cache/gcc
|
||||||
~/cache/llvm
|
~/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'
|
- name: '🐍 Install Python'
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
@ -137,7 +143,7 @@ jobs:
|
|||||||
|
|
||||||
stable-release:
|
stable-release:
|
||||||
needs: build-firmware
|
needs: build-firmware
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
||||||
steps:
|
steps:
|
||||||
- name: '⏳ Checkout repository'
|
- name: '⏳ Checkout repository'
|
||||||
@ -179,7 +185,7 @@ jobs:
|
|||||||
|
|
||||||
development-release:
|
development-release:
|
||||||
needs: build-firmware
|
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
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') == false
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|||||||
13
tools/ci.sh
13
tools/ci.sh
@ -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_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"
|
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() {
|
ci_install_arm_gcc() {
|
||||||
mkdir -p ${GCC_TOOLCHAIN_PATH}
|
mkdir -p ${GCC_TOOLCHAIN_PATH}
|
||||||
wget --no-check-certificate -O - ${GCC_TOOLCHAIN_URL} | tar --strip-components=1 -Jx -C ${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
|
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.
|
# Update Submodules.
|
||||||
|
|
||||||
@ -35,7 +46,7 @@ ci_update_submodules() {
|
|||||||
# Build Targets.
|
# Build Targets.
|
||||||
|
|
||||||
ci_build_target() {
|
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) -C src/micropython/mpy-cross
|
||||||
make -j$(nproc) TARGET=${1} LLVM_PATH=${LLVM_TOOLCHAIN_PATH}/bin -C src
|
make -j$(nproc) TARGET=${1} LLVM_PATH=${LLVM_TOOLCHAIN_PATH}/bin -C src
|
||||||
mv src/build/bin ${1}
|
mv src/build/bin ${1}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user