workflow: Add firmware target to test profiling.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This commit is contained in:
iabdalkader 2025-08-19 10:18:34 +02:00
parent d057f85f0b
commit d4ce288ae2
2 changed files with 11 additions and 4 deletions

View File

@ -49,6 +49,10 @@ jobs:
- ARDUINO_NANO_RP2040_CONNECT
- ARDUINO_NANO_33_BLE_SENSE
- DOCKER
profile: [0] # default profile
include:
- target: OPENMV_N6
profile: 1
fail-fast: false
steps:
- name: '⏳ Checkout repository'
@ -100,10 +104,10 @@ jobs:
run: source tools/ci.sh && ci_install_stedgeai ${HOME}/cache/stedgeai
- name: '🏗 Build firmware'
run: source tools/ci.sh && ci_build_target ${{ matrix.target }}
run: source tools/ci.sh && ci_build_target ${{ matrix.target }} ${{ matrix.profile }}
- name: '⬆ Upload artifacts'
if: matrix.target != 'DOCKER'
if: matrix.target != 'DOCKER' && matrix.profile == 0
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}

View File

@ -54,8 +54,11 @@ ci_build_target() {
make -j$(nproc) -C docker TARGET=${BOARD}
else
make -j$(nproc) -C lib/micropython/mpy-cross
make -j$(nproc) TARGET=${1}
mv build/bin ${1}
make -j$(nproc) TARGET=${1} PROFILE_ENABLE=${2}
# Don't copy artifacts for profiling builds
if [ "$2" = 0 ]; then
mv build/bin ${1}
fi
fi
}