From 6f9d4d51431954c6848d207146c9bf556c61aa6b Mon Sep 17 00:00:00 2001 From: Dominik Lau Date: Tue, 14 Jan 2025 09:23:32 +0100 Subject: [PATCH] [#70544] use the same version of renode as the dashboards --- .ci.yml | 6 +++--- ci/get_dashboard_replkit.sh | 14 +------------- ci/get_versions_from_dashboard.sh | 18 ++++++++++++++++++ ci/prepare.sh | 3 +++ 4 files changed, 25 insertions(+), 16 deletions(-) create mode 100755 ci/get_versions_from_dashboard.sh diff --git a/.ci.yml b/.ci.yml index 3f712fb..0a5b8e8 100644 --- a/.ci.yml +++ b/.ci.yml @@ -46,9 +46,9 @@ Test Static release: stage: Test image: debian:bullseye variables: - RENODE_VERSION: "latest" DEBIAN_FRONTEND: "noninteractive" GET_CUSTOM_RENODE_REVISION: "" + RENODE_VERSION: "" # defaults to the one used on appropriate dashboard artifacts: paths: - ci-output/repls @@ -69,15 +69,15 @@ Test Static release: Compare repls uboot: <<: *compare_repls variables: - RENODE_VERSION: "latest" DEBIAN_FRONTEND: "noninteractive" GET_CUSTOM_RENODE_REVISION: "" + RENODE_VERSION: "" # defaults to renode used on uboot-dashboard DASHBOARD_VARIANT: "uboot" Compare repls zephyr: <<: *compare_repls variables: - RENODE_VERSION: "latest" DEBIAN_FRONTEND: "noninteractive" GET_CUSTOM_RENODE_REVISION: "" + RENODE_VERSION: "" # defaults to renode used on zephyr-dashboard DASHBOARD_VARIANT: "zephyr" diff --git a/ci/get_dashboard_replkit.sh b/ci/get_dashboard_replkit.sh index 2100d32..12a72b6 100755 --- a/ci/get_dashboard_replkit.sh +++ b/ci/get_dashboard_replkit.sh @@ -1,19 +1,7 @@ #!/bin/bash set -euo pipefail -if [[ "$DASHBOARD_VARIANT" == "zephyr" ]]; then - GCP_SIM_BASE="https://zephyr-dashboard.renode.io/zephyr_sim" - export DEMO_NAME=hello_world -elif [[ "$DASHBOARD_VARIANT" == "uboot" ]]; then - GCP_SIM_BASE="https://u-boot-dashboard.renode.io/uboot_sim" - export DEMO_NAME=uboot -else - exit 1 -fi - -LATEST_SIM=$(curl --fail -sS -G "$GCP_SIM_BASE"/latest) -LATEST_RENODE=$(curl --fail -sS -G "$GCP_SIM_BASE"/"$LATEST_SIM"/latest) -wget "$GCP_SIM_BASE"/"$LATEST_SIM"/"$LATEST_RENODE"/replkit.tar.xz +wget "$GCP_SIM_BASE"/"$LATEST_SIM"/"$LATEST_SIM_RENODE"/replkit.tar.xz mkdir replkit tar xf replkit.tar.xz -C replkit >/dev/null diff --git a/ci/get_versions_from_dashboard.sh b/ci/get_versions_from_dashboard.sh new file mode 100755 index 0000000..8fd3085 --- /dev/null +++ b/ci/get_versions_from_dashboard.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if [[ "$DASHBOARD_VARIANT" == "zephyr" ]]; then + export GCP_SIM_BASE="https://zephyr-dashboard.renode.io/zephyr_sim" + export DEMO_NAME=hello_world +elif [[ "$DASHBOARD_VARIANT" == "uboot" ]]; then + export GCP_SIM_BASE="https://u-boot-dashboard.renode.io/uboot_sim" + export DEMO_NAME=uboot +else + exit 1 +fi + +export LATEST_SIM=$(curl --fail -sS -G "$GCP_SIM_BASE"/latest) +export LATEST_SIM_RENODE=$(curl --fail -sS -G "$GCP_SIM_BASE"/"$LATEST_SIM"/latest) + +if [ -z "$RENODE_VERSION" ]; then + export RENODE_VERSION="$LATEST_SIM_RENODE" +fi diff --git a/ci/prepare.sh b/ci/prepare.sh index 4e6d2d8..58076f4 100755 --- a/ci/prepare.sh +++ b/ci/prepare.sh @@ -13,6 +13,9 @@ echo -e "=================================================\n" # install dts2repl as module pip3 install . +# get renode & latest simulation version to be used by the CI +. ./ci/get_versions_from_dashboard.sh + # download replkit and prepare dts/repl directory structure mkdir -p ci-output/{repls/{dashboard,generated,diffs},dts} (cd ci-output && ../ci/get_dashboard_replkit.sh)