diff options
author | Laurent Alfonsi <laurent.alfonsi@linaro.org> | 2023-01-04 12:07:49 +0100 |
---|---|---|
committer | Laurent Alfonsi <laurent.alfonsi@linaro.org> | 2023-01-05 23:05:54 +0100 |
commit | b7cd5eba7285add403485372c9c290e9409c3da7 (patch) | |
tree | adabf21f8917164a7191f25df007997ccc47a197 | |
parent | 68eecd612feaca179a01bfc6cabd4116f2b3b31b (diff) |
round-robin.sh: adapted for the new ci_project / ci_config format
potentially impacted places :
1 - base-artifacts : use ci_project/ci_config git branch. if not
existing, start from old branch name. Commit to base-artifacts
didn't change we push to ci_project/ci_config.
2 - Squad dashboard : now ci_project is the group, ci_config is the project
- Pushing existing data will be done manually using dashboard-push-one-branch.sh.
FORCE_SQUAD_GRP / FORCE_SQUAD_PJT will be used to push old data to
new project places.
3 - interesting-commits : no change anything. new format directories,
will be beside old format directories in <component/sha1/
4 - report-stale-jobs / report-orphan-jobs : will be done later
Change-Id: Ifaf37165a1545e760b402afb3b905bf0ac4c0cd6
-rwxr-xr-x | dashboard-generate-squad.sh | 14 | ||||
-rw-r--r-- | round-robin.sh | 17 | ||||
-rwxr-xr-x | tcwg_bmk-build.sh | 71 |
3 files changed, 70 insertions, 32 deletions
diff --git a/dashboard-generate-squad.sh b/dashboard-generate-squad.sh index 66c8b35..64019bc 100755 --- a/dashboard-generate-squad.sh +++ b/dashboard-generate-squad.sh @@ -281,9 +281,8 @@ EOF squad_server=https://qa-reports.linaro.org/ # TCWG_SQUAD_TOKEN is defined in credentials - # SQUAD_GRP pass through env by job definition - grp="${FORCE_SQUAD_GRP-$SQUAD_GRP}" - prj="$(echo ${dbd[master_job_url]}|cut -d/ -f5)" + grp="${FORCE_SQUAD_GRP-${dbd[ci_project]}}" + prj="${FORCE_SQUAD_PJT-${dbd[ci_config]}}" bld="$(echo ${dbd[master_job_url]}|cut -d/ -f6)" cat > $pushcmdfile << EOF @@ -317,10 +316,8 @@ EOF # If there's no squad project specified, let push cmd file as empty. if [ x"$grp" == x"" ]; then - local var="SQUAD_GRP" - [ -v FORCE_SQUAD_GRP ] && var="FORCE_SQUAD_GRP" - echo "echo \"WARNING : Nowhere to push results $var='${FORCE_SQUAD_GRP-$SQUAD_GRP}'\"" >> $pushcmdfile - echo "WARNING : Nowhere to push results $var='${FORCE_SQUAD_GRP-$SQUAD_GRP}'" + echo "echo \"WARNING : Nowhere to push results. grp is empty." >> $pushcmdfile + echo "WARNING : Nowhere to push results. grp is empty." else for bench in "${envlist[@]}"; do @@ -386,6 +383,9 @@ declare -A dbd dbd[master_job_url]="${BUILD_URL-$(pwd)}" +dbd[ci_project]="${rr[ci_project]}" +dbd[ci_config]="${rr[ci_config]}" + dbd[base-artifacts_branch]="$baseline_branch" if [ -d $top_artifacts/.git ]; then diff --git a/round-robin.sh b/round-robin.sh index aae299c..a7d99fb 100644 --- a/round-robin.sh +++ b/round-robin.sh @@ -138,13 +138,22 @@ reset_artifacts () $run_step_top_artifacts/manifest.sh \ "$run_step_top_artifacts/jenkins/*" + local use_old_branch="" + # shellcheck disable=SC2166 if [ x"${rr[update_baseline]}" = x"onsuccess" \ -o x"${rr[update_baseline]}" = x"force" ] \ && [ x"$(git ls-remote --heads https://git-us.linaro.org/toolchain/ci/base-artifacts.git refs/heads/${rr[baseline_branch]})" = x"" ]; then - echo "WARNING: BASELINE IS NOT FOUND; INITIALIZING BASELINE" - rr[update_baseline]="init" - run_step_patch_env "==rr[update_baseline]" "init" + + if [[ -v rr[old_format_baseline_branch] ]] \ + && [ x"$(git ls-remote --heads https://git-us.linaro.org/toolchain/ci/base-artifacts.git refs/heads/${rr[old_format_baseline_branch]})" != x"" ]; then + echo "WARNING: BASELINE IS NOT FOUND; INITIALIZING BASELINE TO OLD BASELINE BRANCH" + use_old_branch="${rr[old_format_baseline_branch]}" + else + echo "WARNING: BASELINE IS NOT FOUND; INITIALIZING AN EMPTY BASELINE" + rr[update_baseline]="init" + run_step_patch_env "==rr[update_baseline]" "init" + fi fi # Clone base-artifacts here so that bisect runs (which skip this step) @@ -154,6 +163,8 @@ reset_artifacts () local single_branch if [ x"${rr[update_baseline]}" = x"init" ]; then single_branch=empty + elif [ x"$use_old_branch" != x"" ]; then + single_branch=$use_old_branch else single_branch=${rr[baseline_branch]} fi diff --git a/tcwg_bmk-build.sh b/tcwg_bmk-build.sh index e9a0c80..a353efe 100755 --- a/tcwg_bmk-build.sh +++ b/tcwg_bmk-build.sh @@ -26,30 +26,37 @@ rr[top_artifacts]="${rr[top_artifacts]-$(pwd)/artifacts}" rr[start_date]="$(date +%s)" # ------------------ All parameters are handled here -------------------- +# Returns the hw_tag to use. +# Requires rr ci_project / ci_config well set tcwg_bmk_hw () { - local hw_tag - case "${rr[ci_project]}:${rr[target]}" in - *_apm_32*:*) hw_tag=apm_32 ;; - *_apm_64*:*) hw_tag=apm_64 ;; - *_apm*:arm*) hw_tag=apm_32 ;; - *_apm*:aarch64) hw_tag=apm_64 ;; - *_sq_32*:*) hw_tag=sq_32 ;; - *_sq_64*:*) hw_tag=sq_64 ;; - *_sq*:arm*) hw_tag=sq_32 ;; - *_sq*:aarch64) hw_tag=sq_64 ;; - *_tk1_32*:*) hw_tag=tk1_32 ;; - *_tk1*:arm*) hw_tag=tk1_32 ;; - *_tx1_32*:*) hw_tag=tx1_32 ;; - *_tx1_64*:*) hw_tag=tx1_64 ;; - *_tx1*:arm*) hw_tag=tx1_32 ;; - *_tx1*:aarch64) hw_tag=tx1_64 ;; - *_stm32*:arm*) hw_tag=stm32 ;; - *fx_32*:*) hw_tag=fx_32 ;; - *fx_64*:*) hw_tag=fx_64 ;; - *fx*:arm*) hw_tag=fx_32 ;; - *fx*:aarch64) hw_tag=fx_64 ;; - *) echo "ERROR: Unknown hw_tag for ${rr[ci_project]}:${rr[target]}"; exit 1 ;; + case "${rr[ci_project]}:${rr[ci_config]}" in + *experimental_flang*) hw_tag=tx1 ;; + + # stm32 + tcwg_bmk-code_speed-coremark:*) hw_tag=stm32 ;; + tcwg_bmk-code_size-coremark:*) hw_tag=stm32 ;; + + # code_size + tcwg_bmk-code_size-spec2k6:*-arm-*) hw_tag=apm_32 ;; + tcwg_bmk-code_size-spec2k6:*-aarch64-*) hw_tag=apm_64 ;; + + # code speed + tcwg_bmk-code_speed-spec2k6:*-arm-*) hw_tag=tk1_32 ;; + tcwg_bmk-code_speed-spec2k6:*-aarch64-*) hw_tag=tx1_64 ;; + + # fujitsu + tcwg_bmk-fujitsu_speed-cpu2017rate:gnu-aarch64-*) hw_tag=tx1_64 ;; + tcwg_bmk-fujitsu_speed-cpu2017rate:llvm-aarch64-*) hw_tag=fx_64 ;; + tcwg_bmk-fujitsu_speed-cpu2017:llvm-aarch64-*) hw_tag=sq_64 ;; + + # sve + tcwg_bmk-sve_speed-cpu2017rate:gnu-aarch64-*) hw_tag=fx_64 ;; + + # vect + tcwg_bmk-vect_speed-cpu2017:*-aarch64-*) hw_tag=apm_64 ;; + tcwg_bmk-vect_speed-spec2k6:*-arm-*) hw_tag=sq_64 ;; + *) exit 1;; esac echo $hw_tag } @@ -87,6 +94,26 @@ case "${rr[target]}:$cflags" in ;; esac +# Temporary code while changing ci_project / ci_config : +# +# Filling RR old_format_* variables to switch smothly between +# - old format : +# ci_project: 'tcwg_bmk_#{TOOLCHAIN}_{hw}' +# ci_config: '#{TOOLCHAIN}-{toolchain_ver}-#{TARGET}-#{BMK}-{cflags}' +# - and new format : +# ci_project: 'tcwg_bmk-#{PROFILE_NAME}-#{BMK}' +# ci_config: '#{TOOLCHAIN}-#{TARGET}-{toolchain_ver}-{cflags}' +IFS=- read -a arr <<EOF +${rr[ci_project]}-${rr[ci_config]} +EOF + +hw=$(tcwg_bmk_hw) +hw=${hw%_32} ; hw=${hw%_64} + +rr[old_format_ci_project]="tcwg_bmk_${arr[3]}_${hw}" +rr[old_format_ci_config]="${arr[3]}-${arr[5]}-${arr[4]}-${arr[2]}-${arr[6]}" +rr[old_format_baseline_branch]="${rr[old_format_ci_project]}/${rr[old_format_ci_config]}" + # ----------------------------------------------------------------------- |