From babfff336df44cee5ac232647a77b45db258c306 Mon Sep 17 00:00:00 2001 From: Jay Blackman Date: Tue, 8 Jul 2025 09:15:02 +1000 Subject: [PATCH] PICO: Adding PICO tooling to CI (#14503) * PICO: Adding PICO tooling to CI * Removing description * Removing requirement for configs when installing pico_sdk * Remove requirement for ARM when populating sdks * Removing exclusion for RP2350 targets * Adding recursive sub-modules checkout * Allow for different outputs to only .hex * Attempt to get SITL bin build to upload as an artifact --- .github/workflows/ci.yml | 16 ++++++++++++++-- mk/config.mk | 2 +- mk/tools.mk | 4 +++- src/platform/PICO/target/RP2350A/.exclude | 0 src/platform/PICO/target/RP2350B/.exclude | 0 5 files changed, 18 insertions(+), 4 deletions(-) delete mode 100644 src/platform/PICO/target/RP2350A/.exclude delete mode 100644 src/platform/PICO/target/RP2350B/.exclude diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45e8c5bbcb..08c1d2bed1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,10 @@ jobs: outputs: targets: ${{ steps.get-targets.outputs.targets }} steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive - name: Cache build toolchain uses: actions/cache@v4 @@ -32,6 +35,10 @@ jobs: if: steps.cache-toolchain.outputs.cache-hit != 'true' run: make arm_sdk_install + - name: Build pico tool and install + if: steps.cache-toolchain.outputs.cache-hit != 'true' + run: make picotool_install + - name: Hydrate configuration id: get-config run: make configs @@ -50,6 +57,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + submodules: recursive - name: Fetch toolchain from cache uses: actions/cache@v4 @@ -74,7 +83,10 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ matrix.target }} - path: obj/*.hex + path: | + obj/*.hex + obj/*.uf2 + obj/*_${{ matrix.target }}* retention-days: 60 test: diff --git a/mk/config.mk b/mk/config.mk index d1c9e54c65..2cf4cc3036 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -4,7 +4,7 @@ CONFIGS_REPO_URL ?= https://github.com/betaflight/config CONFIGS_SUBMODULE_DIR = src/config BASE_CONFIGS = $(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(CONFIG_DIR)/configs/*/config.h))))) -ifneq ($(filter-out %_install test% %_clean clean% %-print %.hex %.h hex checks help configs $(BASE_TARGETS) $(BASE_CONFIGS),$(MAKECMDGOALS)),) +ifneq ($(filter-out %_sdk %_install test% %_clean clean% %-print %.hex %.h hex checks help configs $(BASE_TARGETS) $(BASE_CONFIGS),$(MAKECMDGOALS)),) ifeq ($(wildcard $(CONFIG_DIR)/configs/),) $(error `$(CONFIG_DIR)` not found. Have you hydrated configuration using: 'make configs'?) endif diff --git a/mk/tools.mk b/mk/tools.mk index 0b53aedecb..1335a16267 100644 --- a/mk/tools.mk +++ b/mk/tools.mk @@ -8,6 +8,8 @@ # # Release date: July 04, 2024 # +# PICO SDK Version: 2.X - July 03, 2025 +# ############################################################### ############################## @@ -275,7 +277,7 @@ zip_clean: ifeq ($(shell [ -d "$(ARM_SDK_DIR)" ] && echo "exists"), exists) ARM_SDK_PREFIX := $(ARM_SDK_DIR)/bin/arm-none-eabi- -else ifeq (,$(filter %_install test% clean% %-print checks help configs, $(MAKECMDGOALS))) +else ifeq (,$(filter %_sdk %_install test% clean% %-print checks help configs, $(MAKECMDGOALS))) GCC_VERSION = $(shell arm-none-eabi-gcc -dumpversion) ifeq ($(GCC_VERSION),) $(error **ERROR** arm-none-eabi-gcc not in the PATH. Run 'make arm_sdk_install' to install automatically in the tools folder of this repo) diff --git a/src/platform/PICO/target/RP2350A/.exclude b/src/platform/PICO/target/RP2350A/.exclude deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/platform/PICO/target/RP2350B/.exclude b/src/platform/PICO/target/RP2350B/.exclude deleted file mode 100644 index e69de29bb2..0000000000