ci: select OpenOCD binary based on runner

This commit is contained in:
Samuel Obuch
2025-05-14 12:36:24 +02:00
parent d179a020be
commit f52cec0f26
3 changed files with 19 additions and 8 deletions

View File

@@ -165,7 +165,14 @@ variables:
fi fi
# Custom OpenOCD # Custom OpenOCD
if [[ ! -z "$OOCD_DISTRO_URL" && "$CI_JOB_STAGE" == "target_test" ]]; then if [[ "$CI_JOB_STAGE" == "target_test" ]]; then
machine="$(uname -m)"
if [[ "$machine" == "armv7l" ]] ; then
OOCD_DISTRO_URL="$OOCD_DISTRO_URL_ARMHF"
elif [[ "$machine" == "aarch64" ]] ; then
OOCD_DISTRO_URL="$OOCD_DISTRO_URL_ARM64"
fi
if [[ ! -z "$OOCD_DISTRO_URL" ]]; then
echo "Using custom OpenOCD from ${OOCD_DISTRO_URL}" echo "Using custom OpenOCD from ${OOCD_DISTRO_URL}"
wget $OOCD_DISTRO_URL wget $OOCD_DISTRO_URL
ARCH_NAME=$(basename $OOCD_DISTRO_URL) ARCH_NAME=$(basename $OOCD_DISTRO_URL)
@@ -173,6 +180,7 @@ variables:
export OPENOCD_SCRIPTS=$PWD/openocd-esp32/share/openocd/scripts export OPENOCD_SCRIPTS=$PWD/openocd-esp32/share/openocd/scripts
export PATH=$PWD/openocd-esp32/bin:$PATH export PATH=$PWD/openocd-esp32/bin:$PATH
fi fi
fi
if [[ -n "$CI_PYTHON_TOOL_REPO" ]]; then if [[ -n "$CI_PYTHON_TOOL_REPO" ]]; then
git clone --quiet --depth=1 -b ${CI_PYTHON_TOOL_BRANCH} https://gitlab-ci-token:${ESPCI_TOKEN}@${GITLAB_HTTPS_HOST}/espressif/${CI_PYTHON_TOOL_REPO}.git git clone --quiet --depth=1 -b ${CI_PYTHON_TOOL_BRANCH} https://gitlab-ci-token:${ESPCI_TOKEN}@${GITLAB_HTTPS_HOST}/espressif/${CI_PYTHON_TOOL_REPO}.git

View File

@@ -198,6 +198,8 @@ pipeline_variables:
if echo "$CI_MERGE_REQUEST_LABELS" | egrep "(^|,)BUILD_AND_TEST_ALL_APPS(,|$)"; then if echo "$CI_MERGE_REQUEST_LABELS" | egrep "(^|,)BUILD_AND_TEST_ALL_APPS(,|$)"; then
echo "BUILD_AND_TEST_ALL_APPS=1" >> pipeline.env echo "BUILD_AND_TEST_ALL_APPS=1" >> pipeline.env
fi fi
- echo "OOCD_DISTRO_URL_ARMHF=$OOCD_DISTRO_URL_ARMHF" >> pipeline.env
- echo "OOCD_DISTRO_URL_ARM64=$OOCD_DISTRO_URL_ARM64" >> pipeline.env
- cat pipeline.env - cat pipeline.env
- python tools/ci/artifacts_handler.py upload --type modified_files_and_components_report - python tools/ci/artifacts_handler.py upload --type modified_files_and_components_report
artifacts: artifacts:

View File

@@ -4,7 +4,8 @@
- .before_script:fetch:target_test - .before_script:fetch:target_test
stage: target_test stage: target_test
timeout: 1 hour timeout: 1 hour
dependencies: [] needs:
- pipeline_variables
cache: cache:
# Usually do not need submodule-cache in target_test # Usually do not need submodule-cache in target_test
- key: pip-cache - key: pip-cache