diff --git a/includes/basop-default-variables.yml b/includes/basop-default-variables.yml new file mode 100644 index 0000000000000000000000000000000000000000..e6075c79e125b118be477b938119e9679c77ce51 --- /dev/null +++ b/includes/basop-default-variables.yml @@ -0,0 +1,4 @@ +variables: + FLOAT_REF_COMMIT_FILE: "float-ref-git-sha.txt" + MERGE_SOURCE_FLOAT_REF_COMMIT_FILE: "merge-source-float-ref-git-sha.txt" + MERGE_TARGET_COMMIT_FILE: "merge-target-git-sha.txt" diff --git a/main-basop.yml b/main-basop.yml index 22efc4503c9301c57d685954fa2e4b3cebd12dc7..67d029ec37b6c6d94edd5be4741fd802193a4c68 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -1,5 +1,6 @@ include: - local: main.yml + - local: includes/basop-default-variables.yml stages: - .pre @@ -380,6 +381,7 @@ workflow: - if [ "$DISABLE_HRTF" = "true" ]; then - export PYTEST_ADDOPTS="${PYTEST_ADDOPTS} -k 'not model'" - fi + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/merge-request-print-pinned-commits.sh variables: USE_LTV: 0 @@ -414,15 +416,13 @@ workflow: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/apply-testv-scaling.sh - fi - # set branches for reference builds - - source "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/set-float-reference-branches.sh - echo "$FLOAT_REF_BRANCH - $FLOAT_REF_BRANCH_MERGE_SOURCE - $CI_MERGE_REQUEST_TARGET_BRANCH_NAME - $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME" # build merge target branch and correpsonding float reference - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/build-binaries.sh float-ref - source "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/build-merge-target-binaries.sh - echo "$FLOAT_REF_BRANCH - $FLOAT_REF_BRANCH_MERGE_SOURCE - $CI_MERGE_REQUEST_TARGET_BRANCH_NAME - $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME" # build to-be-merged branch and corresponding float ref branch - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/build-binaries.sh merge-source + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/build-binaries.sh dut - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/build-binaries.sh float-ref-merge-source - python3 ci/remove_unsupported_testcases.py $PRM_FILES @@ -550,13 +550,11 @@ workflow: - INV_LEVEL_SCALING=$(awk "BEGIN {print 1.0 / $LEVEL_SCALING}") - comp_args="--mld --ssnr --odg --scalefac $INV_LEVEL_SCALING" - # set branches for reference builds - - source "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/set-float-reference-branches.sh # build merge target branch and correpsonding float reference - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/build-binaries.sh float-ref - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/build-binaries.sh merge-target # build to-be-merged branch and corresponding float ref branch - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/build-binaries.sh merge-source + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/build-binaries.sh dut - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/build-binaries.sh float-ref-merge-source # set pytest args for ref creation @@ -835,6 +833,11 @@ fail-pipeline-if-in-draft: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/get-float-ref-branch-name.sh $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME - fi +# This job runs in MR pipelines and checks if your branch is up-to-date with your target +# If it is not, it fails the whole pipeline early (this should be the first job to run) +# It also stores the target branch's current commit as well as the float_ref branch's current commit +# to ensure that later jobs that need access to these branches all run on the same commit - which is +# important in case the branch is updated during the runtime of the pipeline branch-is-up-to-date-with-target-pre: extends: - .job-linux @@ -844,19 +847,14 @@ branch-is-up-to-date-with-target-pre: tags: - ivas-basop-linux script: - - | - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - if [ $commits_behind_count -ne 0 ]; then - echo -e "Your branch is $commits_behind_count commits behind the target branch, run\n\tgit pull origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME\nto update." - exit 1 - fi - - git fetch origin "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" - - TARGET_COMMIT="$(git rev-parse "origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME")" - - echo "TARGET_COMMIT is $TARGET_COMMIT" - - echo "$TARGET_COMMIT" > "$MERGE_TARGET_COMMIT_FILE" + - source "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/branch-is-up-to-date-with-target-pre.sh artifacts: paths: - $MERGE_TARGET_COMMIT_FILE + - $FLOAT_REF_COMMIT_FILE + - $MERGE_SOURCE_FLOAT_REF_COMMIT_FILE + reports: + dotenv: commits.env branch-is-up-to-date-with-target-post: extends: @@ -1133,6 +1131,7 @@ check-regressions-short-enc-0db: needs: - job: "check-be-to-target-short-enc-0db" artifacts: true + - !reference [.test-job-linux-compares-to-fixed-target, needs] variables: TEST_SUITE: "$SHORT_TEST_SUITE_ENCODER" # +/-0dB @@ -1148,6 +1147,7 @@ check-regressions-short-enc-+10db: needs: - job: "check-be-to-target-short-enc-+10db" artifacts: true + - !reference [.test-job-linux-compares-to-fixed-target, needs] variables: TEST_SUITE: "$SHORT_TEST_SUITE_ENCODER" # +10dB @@ -1163,6 +1163,7 @@ check-regressions-short-enc--10db: needs: - job: "check-be-to-target-short-enc--10db" artifacts: true + - !reference [.test-job-linux-compares-to-fixed-target, needs] variables: TEST_SUITE: "$SHORT_TEST_SUITE_ENCODER" # -10dB @@ -1178,6 +1179,7 @@ check-regressions-short-dec-0db: needs: - job: "check-be-to-target-short-dec-0db" artifacts: true + - !reference [.test-job-linux-compares-to-fixed-target, needs] variables: TEST_SUITE: "$SHORT_TEST_SUITE" # +/-0dB @@ -1193,6 +1195,7 @@ check-regressions-short-dec-+10db: needs: - job: "check-be-to-target-short-dec-+10db" artifacts: true + - !reference [.test-job-linux-compares-to-fixed-target, needs] variables: TEST_SUITE: "$SHORT_TEST_SUITE" # +10dB @@ -1208,6 +1211,7 @@ check-regressions-short-dec--10db: needs: - job: "check-be-to-target-short-dec--10db" artifacts: true + - !reference [.test-job-linux-compares-to-fixed-target, needs] variables: TEST_SUITE: "$SHORT_TEST_SUITE" # -10dB @@ -1236,6 +1240,7 @@ renderer-pytest-on-merge-request: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh - source "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/build-merge-target-binaries.sh - source "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/merge-request-comparison-setup-codec.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/merge-request-print-pinned-commits.sh # some helper variables - "|| true" to prevent failures from grep not finding anything # write to temporary file as workaround for failures observed with piping echo @@ -1308,6 +1313,7 @@ ivas-pytest-on-merge-request: - source "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/build-merge-target-binaries.sh - source "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/merge-request-comparison-setup-codec.sh - python3 ci/remove_unsupported_testcases.py $PRM_FILES + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/merge-request-print-pinned-commits.sh # some helper variables - "|| true" to prevent failures from grep not finding anything # write to temporary file as workaround for failures observed with piping echo @@ -1376,6 +1382,7 @@ split-rendering-pytest-on-merge-request: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh - source "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/build-merge-target-binaries.sh - source "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/merge-request-comparison-setup-codec.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/merge-request-print-pinned-commits.sh # some helper variables - "|| true" to prevent failures from grep not finding anything # write to temporary file as workaround for failures observed with piping echo @@ -1526,6 +1533,7 @@ ivas-interop-on-merge-request: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/check-commits-behind-count-in-compare-jobs.sh - source "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/build-merge-target-binaries.sh - source "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/merge-request-comparison-setup-codec.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/merge-request-print-pinned-commits.sh - python3 ci/remove_unsupported_testcases.py $PRM_FILES diff --git a/snippets/basop/branch-follows-porting-naming-convention.sh b/snippets/basop/branch-follows-porting-naming-convention.sh new file mode 100644 index 0000000000000000000000000000000000000000..962c2315b15f292d84357828e79a597c2bf87108 --- /dev/null +++ b/snippets/basop/branch-follows-porting-naming-convention.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +# (C) 2022-2025 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +# contributors to this repository. All Rights Reserved. +# +# This software is protected by copyright law and by international treaties. +# The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, +# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +# contributors to this repository retain full ownership rights in their respective contributions in +# the software. This notice grants no license of any kind, including but not limited to patent +# license, nor is any license granted by implication, estoppel or otherwise. +# +# Contributors are required to enter into the IVAS codec Public Collaboration agreement before making +# contributions. +# +# This software is provided "AS IS", without any express or implied warranties. The software is in the +# development stage. It is intended exclusively for experts who have experience with such software and +# solely for the purpose of inspection. All implied warranties of non-infringement, merchantability +# and fitness for a particular purpose are hereby disclaimed and excluded. +# +# Any dispute, controversy or claim arising under or in relation to providing this software shall be +# submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in +# accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and +# the United Nations Convention on Contracts on the International Sales of Goods. + +BASOP_PATTERN="^[0-9]+[_-]basop[_-].*" +MSG_DOES_NOT_MATCH="Your branch name %s does not match the template '_basop_', e.g. '123_basop_fix_this_one_bug-2'. +If this branch is porting a float MR with a corresponding float part, then +ticking to this branch is needed for the testing system to match this branch with its float-reference counterpart. +Please rename your branch. You can easily do this by creating a new branch from this branch: + - git checkout -b +You then also need to create a new merge request and update the links in your issue. +See here for details on the porting work process: https://forge.3gpp.org/rep/sa4/audio/ivas-basop/-/wikis/Porting-MRs-from-floating-point-codec#workflow-for-porting-a-merge-request-from-floating-point-codec-to-basop-codec + +If this is not a porting branch, ignore above message. +" + +if [ $# -ne 1 ]; then + echo "Usage: $0 " + exit 1 +fi + +if ! [[ "$1" =~ $BASOP_PATTERN ]]; then + printf "$MSG_DOES_NOT_MATCH" "$1" + exit 1 +fi diff --git a/snippets/basop/branch-is-up-to-date-with-target-pre.sh b/snippets/basop/branch-is-up-to-date-with-target-pre.sh new file mode 100644 index 0000000000000000000000000000000000000000..69210f7c9dd1853299d0f86db299d8ae5c4a2deb --- /dev/null +++ b/snippets/basop/branch-is-up-to-date-with-target-pre.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +# (C) 2022-2025 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +# contributors to this repository. All Rights Reserved. +# +# This software is protected by copyright law and by international treaties. +# The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, +# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +# contributors to this repository retain full ownership rights in their respective contributions in +# the software. This notice grants no license of any kind, including but not limited to patent +# license, nor is any license granted by implication, estoppel or otherwise. +# +# Contributors are required to enter into the IVAS codec Public Collaboration agreement before making +# contributions. +# +# This software is provided "AS IS", without any express or implied warranties. The software is in the +# development stage. It is intended exclusively for experts who have experience with such software and +# solely for the purpose of inspection. All implied warranties of non-infringement, merchantability +# and fitness for a particular purpose are hereby disclaimed and excluded. +# +# Any dispute, controversy or claim arising under or in relation to providing this software shall be +# submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in +# accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and +# the United Nations Convention on Contracts on the International Sales of Goods. + +# fetch all needed branches +git fetch origin "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" +git fetch origin ivas-float-update +float_ref_branchname=$(${CI_PROJECT_DIR}/ivas-codec-ci/snippets/basop/get-float-ref-branch-name.sh $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME) +git fetch origin "$float_ref_branchname" + +# then check if we are behind the merge target +commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" +if [ $commits_behind_count -ne 0 ]; then + echo -e "Your branch is $commits_behind_count commits behind the target branch, run\n\tgit pull origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME\nto update." + exit 1 +fi + +# if we are up-to-date, store the commit SHA's for all branches +MERGE_TARGET_COMMIT="$(git rev-parse "origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME")" +echo "MERGE_TARGET_COMMIT is $MERGE_TARGET_COMMIT" +echo "$MERGE_TARGET_COMMIT" >"$MERGE_TARGET_COMMIT_FILE" + +MERGE_SOURCE_FLOAT_REF_COMMIT="$(git rev-parse "origin/$float_ref_branchname")" +echo "MERGE_SOURCE_FLOAT_REF_COMMIT is $MERGE_SOURCE_FLOAT_REF_COMMIT" +echo "$MERGE_SOURCE_FLOAT_REF_COMMIT" >"$MERGE_SOURCE_FLOAT_REF_COMMIT_FILE" + +FLOAT_REF_COMMIT="$(git rev-parse "origin/ivas-float-update")" +echo "FLOAT_REF_COMMIT is $FLOAT_REF_COMMIT" +echo "$FLOAT_REF_COMMIT" >"$FLOAT_REF_COMMIT_FILE" + +# create commits.env file for passing the variables to other jobs +echo "MERGE_TARGET_COMMIT=$MERGE_TARGET_COMMIT" >>commits.env +echo "MERGE_SOURCE_FLOAT_REF_COMMIT=$MERGE_SOURCE_FLOAT_REF_COMMIT" >>commits.env +echo "FLOAT_REF_COMMIT=$FLOAT_REF_COMMIT" >>commits.env diff --git a/snippets/basop/build-binaries.sh b/snippets/basop/build-binaries.sh index 00c680d5c0aad6754a7728702d2a470a1dcf782b..d1eb687d5a5b3a8c09e6fc96f829eb1db7d8fed8 100755 --- a/snippets/basop/build-binaries.sh +++ b/snippets/basop/build-binaries.sh @@ -8,7 +8,7 @@ mode="${1:-}" case "$mode" in float-ref) - branch_to_check_out="$FLOAT_REF_BRANCH" + ref_to_check_out="$FLOAT_REF_COMMIT" ivas_cod_filename="./$REF_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY" ivas_dec_filename="./$REF_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY" ivas_rend_filename="./$REF_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY" @@ -16,7 +16,7 @@ float-ref) commit_file="$FLOAT_REF_COMMIT_FILE" ;; float-ref-merge-source) - branch_to_check_out="$FLOAT_REF_BRANCH_MERGE_SOURCE" + ref_to_check_out="$MERGE_SOURCE_FLOAT_REF_COMMIT" ivas_cod_filename="./$MERGE_SOURCE_FLOAT_REF_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY" ivas_dec_filename="./$MERGE_SOURCE_FLOAT_REF_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY" ivas_rend_filename="./$MERGE_SOURCE_FLOAT_REF_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY" @@ -24,25 +24,15 @@ float-ref-merge-source) commit_file="$MERGE_SOURCE_FLOAT_REF_COMMIT_FILE" ;; merge-target) - branch_to_check_out="$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" + ref_to_check_out="$MERGE_TARGET_COMMIT" ivas_cod_filename="./$MERGE_TARGET_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY" ivas_dec_filename="./$MERGE_TARGET_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY" ivas_rend_filename="./$MERGE_TARGET_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY" isar_post_rend_filename="./$MERGE_TARGET_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY" commit_file="$MERGE_TARGET_COMMIT_FILE" ;; -merge-source) - branch_to_check_out="$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME" - ivas_cod_filename="./$DUT_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY" - ivas_dec_filename="./$DUT_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY" - ivas_rend_filename="./$DUT_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY" - isar_post_rend_filename="./$DUT_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY" - commit_file="$CUT_COMMIT_FILE" - ;; dut) - # This produces the same binary names as merge-source, but sets branch_to_check_out differently - # so that this is usable in non-merge-request pipelines - branch_to_check_out="$CI_COMMIT_REF_NAME" + ref_to_check_out="$CI_COMMIT_SHA" ivas_cod_filename="./$DUT_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY" ivas_dec_filename="./$DUT_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY" ivas_rend_filename="./$DUT_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY" @@ -55,7 +45,7 @@ dut) ;; esac -echo "Building $mode binaries from branch $branch_to_check_out" +echo "Building $mode binaries from branch $ref_to_check_out" current_commit_sha="$(git rev-parse HEAD)" @@ -70,7 +60,7 @@ trap restore_stash EXIT # should never fail, even if there is nothing to be stored git stash -git checkout "$branch_to_check_out" +git checkout "$ref_to_check_out" bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/activate-debug-mode-info-if-set.sh diff --git a/snippets/basop/get-float-ref-branch-name.sh b/snippets/basop/get-float-ref-branch-name.sh index 3c4574a4bf243583e12cc09669dd754d04238cc6..5720f5516708357620dd0cbab387b675079496cb 100755 --- a/snippets/basop/get-float-ref-branch-name.sh +++ b/snippets/basop/get-float-ref-branch-name.sh @@ -28,17 +28,8 @@ # accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and # the United Nations Convention on Contracts on the International Sales of Goods. -BASOP_PATTERN="^[0-9]+[_-]basop[_-].*" -MSG_DOES_NOT_MATCH="Your branch name %s does not match the template '_basop_', e.g. '123_basop_fix_this_one_bug-2'. -If this branch is porting a float MR with a corresponding float part, then -ticking to this branch is needed for the testing system to match this branch with its float-reference counterpart. -Please rename your branch. You can easily do this by creating a new branch from this branch: - - git checkout -b -You then also need to create a new merge request and update the links in your issue. -See here for details on the porting work process: https://forge.3gpp.org/rep/sa4/audio/ivas-basop/-/wikis/Porting-MRs-from-floating-point-codec#workflow-for-porting-a-merge-request-from-floating-point-codec-to-basop-codec - -If this is not a porting branch, ignore above message. -" +# NOTE: this does not check e.g. for float_ref_branchname actually existing and will silently return ivas-float-update if not +# Use branch-follows-porting-naming-convention.sh for that if [ $# -ne 1 ]; then echo "Usage: $0 " @@ -48,11 +39,6 @@ fi branchname_in="$1" branchname_out="ivas-float-update" -if ! [[ "$branchname_in" =~ $BASOP_PATTERN ]]; then - printf "$MSG_DOES_NOT_MATCH" "$branchname_in" - exit 1 -fi - # The float ref branch is just the same name, but with basop -> ref replacement # Replace only the first occurrence, as "basop" may be present in the later description # If the format is correct, then before "_basop", only numbers can occur diff --git a/snippets/basop/merge-request-print-pinned-commits.sh b/snippets/basop/merge-request-print-pinned-commits.sh new file mode 100644 index 0000000000000000000000000000000000000000..ff86427956ece32d5301fe1f4542971728b7b6f3 --- /dev/null +++ b/snippets/basop/merge-request-print-pinned-commits.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# (C) 2022-2025 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +# contributors to this repository. All Rights Reserved. +# +# This software is protected by copyright law and by international treaties. +# The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, +# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +# contributors to this repository retain full ownership rights in their respective contributions in +# the software. This notice grants no license of any kind, including but not limited to patent +# license, nor is any license granted by implication, estoppel or otherwise. +# +# Contributors are required to enter into the IVAS codec Public Collaboration agreement before making +# contributions. +# +# This software is provided "AS IS", without any express or implied warranties. The software is in the +# development stage. It is intended exclusively for experts who have experience with such software and +# solely for the purpose of inspection. All implied warranties of non-infringement, merchantability +# and fitness for a particular purpose are hereby disclaimed and excluded. +# +# Any dispute, controversy or claim arising under or in relation to providing this software shall be +# submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in +# accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and +# the United Nations Convention on Contracts on the International Sales of Goods. + +echo "====== Pinned commits in files: ======" +cat $MERGE_TARGET_COMMIT_FILE +cat $FLOAT_REF_COMMIT_FILE +cat $MERGE_SOURCE_FLOAT_REF_COMMIT_FILE +echo "====== Pinned commits in env vars: ======" +echo "MERGE_TARGET_COMMIT=$MERGE_TARGET_COMMIT" +echo "MERGE_SOURCE_FLOAT_REF_COMMIT=$MERGE_SOURCE_FLOAT_REF_COMMIT" +echo "FLOAT_REF_COMMIT=$FLOAT_REF_COMMIT" diff --git a/snippets/basop/set-float-reference-branches.sh b/snippets/basop/set-float-reference-branches.sh deleted file mode 100644 index 37044d8d8fa5c73c2155ff25c825984780097bd8..0000000000000000000000000000000000000000 --- a/snippets/basop/set-float-reference-branches.sh +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/bash - -set -euxo pipefail - -cd "${CI_PROJECT_DIR}" - -# use ivas-float-update as reference for the merge source per default -FLOAT_REF_BRANCH_MERGE_SOURCE=$FLOAT_REF_BRANCH - -exit_code=0 -# first check if branch matches the pattern -bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/get-float-ref-branch-name.sh $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME || exit_code=$? - -# run again to actually set the branch name only if the naming pattern is there -# TODO: this is a bit awkward, but needed as a quick fix for now -if [[ "$exit_code" == "0" ]]; then - if [[ ! "$CI_MERGE_REQUEST_TITLE" =~ \[skip[[:space:]_-]name[[:space:]_-]check\] ]] && [[ ! "$CI_MERGE_REQUEST_TITLE" =~ \[CI\] ]]; then - # a bit awkward: write to file + standard out first so that the error message is visible in case of failure. Then fill the variable from the file - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/get-float-ref-branch-name.sh $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME | tee tmp_ref_branch.txt - FLOAT_REF_BRANCH_MERGE_SOURCE=$(cat tmp_ref_branch.txt) - fi -fi - -export FLOAT_REF_BRANCH_MERGE_SOURCE