From a1686721c7dbb02d5ac484218c32ec64392e5e88 Mon Sep 17 00:00:00 2001 From: Digant Desai Date: Thu, 22 May 2025 21:35:53 -0500 Subject: [PATCH] [nxp] trunk.yaml: download submodules recursively --- .github/workflows/trunk.yml | 5 ++++- examples/nxp/setup.sh | 12 +++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/trunk.yml b/.github/workflows/trunk.yml index d18c3337597..72d9a502168 100644 --- a/.github/workflows/trunk.yml +++ b/.github/workflows/trunk.yml @@ -701,7 +701,7 @@ jobs: with: runner: linux.2xlarge docker-image: executorch-ubuntu-22.04-clang12 - submodules: 'true' + submodules: 'recursive' ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout: 90 script: | @@ -715,6 +715,9 @@ jobs: PYTHON_EXECUTABLE=python \ CMAKE_ARGS="-DEXECUTORCH_BUILD_NXP_NEUTRON=ON" \ .ci/scripts/setup-linux.sh --build-tool "cmake" + + PYTHON_EXECUTABLE=python bash examples/nxp/setup.sh + pip install -r backends/nxp/requirements-tests.txt # Run pytest PYTHON_EXECUTABLE=python bash backends/nxp/run_unittests.sh diff --git a/examples/nxp/setup.sh b/examples/nxp/setup.sh index 1ef2cc82c2a..5efbbee4714 100644 --- a/examples/nxp/setup.sh +++ b/examples/nxp/setup.sh @@ -6,5 +6,15 @@ set -u +retry_command() { + local max_attempts=$2 + for ((i=0; i<$max_attempts; i++)); do + $1 && return 0 || echo "Attempt $((i+1)) failed. Retrying..." + sleep 2 + done + echo "All attempts failed." + return 1 +} + # Install neutron-converter -pip install --extra-index-url https://eiq.nxp.com/repository neutron-converter_SDK_25_03 +retry_command "pip install --extra-index-url https://eiq.nxp.com/repository neutron-converter_SDK_25_03" 100 || { echo "Failed"; exit 1; }