From e921cfca4da3a0ab1dad2ccb629fc6394e104e7d Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 26 Nov 2025 16:16:12 +0100 Subject: [PATCH 01/42] cleanup some remains of ivas-float-update branch --- README.md | 2 +- includes/default-variables-basop.yml | 1 - main-basop.yml | 40 ++++++++++------------------ main-float.yml | 1 - 4 files changed, 15 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 60405aa..97e3b78 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ include: file: main-basop.yml ``` -This way, any CI change can be developed centrally in this repository and does not need to be merged/ported to different repositories/branches (e.g. keeping ivas-basop main and ivas-float-update in synch). +This way, any CI change can be developed centrally in this repository and does not need to be merged/ported to different repositories/branches. ### Adding new CI code diff --git a/includes/default-variables-basop.yml b/includes/default-variables-basop.yml index 235c96c..e9aee3e 100644 --- a/includes/default-variables-basop.yml +++ b/includes/default-variables-basop.yml @@ -1,7 +1,6 @@ variables: EVS_BE_TEST_DIR_BASOP: "/usr/local/be_2_evs_basop" # TODO: cleanup and use global var defined in ivas-codec-ci - FLOAT_REF_BRANCH: "ivas-float-update" FLOAT_REF_BRANCH_MERGE_SOURCE: "" SCRIPTS_DIR: "/usr/local/scripts" LONG_TEST_SUITE: "tests/codec_be_on_mr_nonselection tests/renderer --param_file scripts/config/self_test_ltv.prm --use_ltv" diff --git a/main-basop.yml b/main-basop.yml index 7b274d7..1d05959 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -129,12 +129,6 @@ workflow: - if: $CI_PIPELINE_SOURCE == 'push' when: never -.rules-merge-request-to-float-ref: - rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "ivas-float-update" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - .rules-merge-request-to-main-no-draft: rules: - if: $CI_MERGE_REQUEST_TITLE =~ /^(\[Draft\]|\(Draft\)|Draft:)/ @@ -143,14 +137,6 @@ workflow: - if: $CI_PIPELINE_SOURCE == 'push' when: never -.rules-merge-request-to-float-ref-no-draft: - rules: - - if: $CI_MERGE_REQUEST_TITLE =~ /^(\[Draft\]|\(Draft\)|Draft:)/ - when: never - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "ivas-float-update" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - .rules-pytest-to-ref-pre: rules: - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "ivas-conformance-linux" @@ -1470,10 +1456,11 @@ split-rendering-pytest-on-merge-request: - $REPORT_XML # test that runs all modes with 1s input signals -codec-smoke-test: +# TODO: adapt for BASOP +.codec-smoke-test: extends: - .test-job-linux-needs-testv-dir - - .rules-merge-request-to-float-ref-no-draft + - .rules-merge-request-to-main-no-draft timeout: "20 minutes" stage: test needs: ["build-codec-linux-make"] @@ -1515,7 +1502,7 @@ codec-smoke-test: check-first-frame-is-sid: extends: - .test-job-linux-needs-testv-dir - - .rules-merge-request-to-float-ref-no-draft + - .rules-merge-request-to-main-no-draft stage: test needs: ["build-codec-linux-make"] script: @@ -1560,7 +1547,7 @@ check-first-frame-is-sid: ivas-interop-on-merge-request: extends: - .test-job-linux-needs-testv-dir - - .rules-merge-request-to-float-ref-no-draft + - .rules-merge-request-to-main-no-draft - .test-job-linux-compares-to-fixed-target stage: test timeout: "10 minutes" @@ -1654,10 +1641,11 @@ lc3-wrapper-unit-test: # from float # test renderer executable -renderer-smoke-test: +# TODO: adapt for BASOP +.renderer-smoke-test: extends: - .test-job-linux - - .rules-merge-request-to-float-ref-no-draft + - .rules-merge-request-to-main-no-draft needs: ["build-codec-linux-make"] stage: test script: @@ -1679,10 +1667,10 @@ renderer-smoke-test: # from float # test renderer executable with cmake + asan -renderer-asan: +# TODO: turn into scheduled job +.renderer-asan: extends: - .test-job-linux - - .rules-merge-request-to-float-ref-no-draft needs: ["build-codec-linux-cmake"] stage: test script: @@ -1706,10 +1694,10 @@ renderer-asan: # from float # test renderer executable with cmake + msan -renderer-msan: +# TODO: turn into scheduled job +.renderer-msan: extends: - .test-job-linux - - .rules-merge-request-to-float-ref-no-draft needs: ["build-codec-linux-cmake"] stage: test tags: @@ -1735,10 +1723,10 @@ renderer-msan: # from float # test renderer executable with cmake + usan -renderer-usan: +# TODO: turn into scheduled job +.renderer-usan: extends: - .test-job-linux - - .rules-merge-request-to-float-ref-no-draft needs: ["build-codec-linux-cmake"] stage: test tags: diff --git a/main-float.yml b/main-float.yml index f17b861..a2f6366 100644 --- a/main-float.yml +++ b/main-float.yml @@ -282,7 +282,6 @@ branch-is-up-to-date-with-main-post: junit: - report-junit.xml -### The stv jobs are run for both main and ivas-float-update basop-compat-stv: extends: - .basop-ci-branch-compat-template -- GitLab From 179c6ff70d393fccb8f962a45e74d8f8db652468 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 26 Nov 2025 16:30:46 +0100 Subject: [PATCH 02/42] add basop-compat smoke test --- main-float.yml | 59 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/main-float.yml b/main-float.yml index a2f6366..3e093e8 100644 --- a/main-float.yml +++ b/main-float.yml @@ -402,36 +402,16 @@ build-codec-windows-msbuild: # --------------------------------------------------------------- # test that runs all modes with 1s input signals -codec-smoke-test: +.smoke-test-template: extends: - .test-job-linux-needs-testv-dir - - .rules-merge-request-to-main - timeout: "20 minutes" tags: - ivas-linux-fast - stage: test - needs: - [ - "build-codec-linux-cmake", - "build-codec-linux-make", - "build-codec-instrumented-linux", - "build-codec-sanitizers-linux", - ] - script: + before_script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh # LTV update needed as ltv ISM metadata files are used - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - - # for MRs to basop-ci-branch-pc, we want to test with the BASOP float reference build - # per default, the smoke test builds the current repo again with WMOPS activated to catch unbalanced instrumentation macros - # TODO: make manual for basop-CI merges - - if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" = "basop-ci-branch" ]; then - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/build-binaries-from-basop-repo.sh ivas-float-update - - bash ci/smoke_test.sh coverage - - else - - bash ci/smoke_test.sh - - fi - + after_script: ### analyze for failures - if ! [ -s smoke_test_output.txt ] || ! [ -s smoke_test_output_jbm.txt ] || ! [ -s smoke_test_output_hrtf.txt ]; then echo "Error in smoke test"; exit 1; fi - ret_val=0 @@ -449,6 +429,39 @@ codec-smoke-test: - smoke_test_output_hrtf.txt expose_as: "Smoke test results" +codec-smoke-test-float: + extends: + - .smoke-test-template + - .rules-merge-request-to-main + timeout: "20 minutes" + stage: test + needs: + [ + "build-codec-linux-cmake", + "build-codec-linux-make", + "build-codec-instrumented-linux", + "build-codec-sanitizers-linux", + ] + script: + - bash ci/smoke_test.sh + +codec-smoke-test-basop-compat: + extends: + - .smoke-test-template + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" + when: manual + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + timeout: "20 minutes" + stage: basop-compat + allow_failure: true + script: + # get basop code and build binaries + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/build-binaries-from-basop-repo.sh ivas-float-update + # the "coverage" argument actually means "do not build again with instrumentation, but use the existing binaries" + - bash ci/smoke_test.sh coverage + # code selftest testvectors with memory-sanitizer binaries codec-msan: extends: -- GitLab From b7dd1dd4598137854bbd886ec107d0e08d97103c Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 26 Nov 2025 16:32:29 +0100 Subject: [PATCH 03/42] remove obsolete comment --- includes/default-variables-basop.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/includes/default-variables-basop.yml b/includes/default-variables-basop.yml index e9aee3e..57ad92c 100644 --- a/includes/default-variables-basop.yml +++ b/includes/default-variables-basop.yml @@ -1,6 +1,5 @@ variables: EVS_BE_TEST_DIR_BASOP: "/usr/local/be_2_evs_basop" - # TODO: cleanup and use global var defined in ivas-codec-ci FLOAT_REF_BRANCH_MERGE_SOURCE: "" SCRIPTS_DIR: "/usr/local/scripts" LONG_TEST_SUITE: "tests/codec_be_on_mr_nonselection tests/renderer --param_file scripts/config/self_test_ltv.prm --use_ltv" -- GitLab From 8e1443590d39396d3cc8c3d856a83c00f0bddd46 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 26 Nov 2025 16:44:57 +0100 Subject: [PATCH 04/42] fix needs --- main-float.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main-float.yml b/main-float.yml index 32de1b4..e355bf3 100644 --- a/main-float.yml +++ b/main-float.yml @@ -844,7 +844,7 @@ ivas-pytest-on-merge-request: - .test-job-linux-needs-testv-dir - .rules-merge-request-to-main stage: compare - needs: ["build-codec-linux-cmake", "codec-smoke-test"] + needs: ["build-codec-linux-cmake", "codec-smoke-test-float"] timeout: "14 minutes" parallel: matrix: @@ -952,7 +952,7 @@ evs-pytest-on-merge-request: - .test-job-linux - .rules-merge-request-to-main stage: compare - needs: ["build-codec-linux-cmake", "codec-smoke-test"] + needs: ["build-codec-linux-cmake", "codec-smoke-test-float"] timeout: "10 minutes" script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh -- GitLab From 230e2fd727439f805c8565e63be5940ff060dcd0 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 26 Nov 2025 16:52:22 +0100 Subject: [PATCH 05/42] empty needs for basop-compat jobs --- main-float.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main-float.yml b/main-float.yml index e355bf3..49d42df 100644 --- a/main-float.yml +++ b/main-float.yml @@ -252,6 +252,7 @@ branch-is-up-to-date-with-main-post: when: never tags: - ivas-linux-fast + needs: [] before_script: - !reference [.job-linux, before_script] - python3 scripts/prepare_combined_format_inputs.py @@ -449,7 +450,7 @@ codec-smoke-test-float: script: - bash ci/smoke_test.sh -codec-smoke-test-basop-compat: +basop-compat-smoke-test: extends: - .smoke-test-template rules: @@ -459,6 +460,7 @@ codec-smoke-test-basop-compat: when: never timeout: "20 minutes" stage: basop-compat + needs: [] allow_failure: true script: # get basop code and build binaries -- GitLab From 89efce05c4e73642ac16b7ab7ddb0d9f81e65239 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 26 Nov 2025 16:53:35 +0100 Subject: [PATCH 06/42] add missing before_script reference --- main-float.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/main-float.yml b/main-float.yml index 49d42df..839ee92 100644 --- a/main-float.yml +++ b/main-float.yml @@ -413,6 +413,7 @@ build-codec-windows-msbuild: tags: - ivas-linux-fast before_script: + - !reference [.job-linux, before_script] - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh # LTV update needed as ltv ISM metadata files are used - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh -- GitLab From 07e6324722848f2c4be78da9199dca778b50ac48 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 26 Nov 2025 17:16:36 +0100 Subject: [PATCH 07/42] fix before_script section via reference --- main-float.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main-float.yml b/main-float.yml index 839ee92..1b80017 100644 --- a/main-float.yml +++ b/main-float.yml @@ -413,7 +413,7 @@ build-codec-windows-msbuild: tags: - ivas-linux-fast before_script: - - !reference [.job-linux, before_script] + - !reference [.test-job-linux-needs-testv-dir, before_script] - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh # LTV update needed as ltv ISM metadata files are used - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh -- GitLab From d095c38aeb4eab6ee13d1d40b12df02e691df778 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 27 Nov 2025 11:34:40 +0100 Subject: [PATCH 08/42] add smoke test for basop repo also fix branch in basop-compat smoke test --- includes/smoke-test.yml | 28 ++++++++++++++++++++++++ main-basop.yml | 47 ++++++++++------------------------------- main-float.yml | 31 ++------------------------- 3 files changed, 41 insertions(+), 65 deletions(-) create mode 100644 includes/smoke-test.yml diff --git a/includes/smoke-test.yml b/includes/smoke-test.yml new file mode 100644 index 0000000..897838c --- /dev/null +++ b/includes/smoke-test.yml @@ -0,0 +1,28 @@ +# test that runs all modes with 1s input signals +.smoke-test-template: + extends: + - .test-job-linux-needs-testv-dir + tags: + - ivas-linux-fast + before_script: + - !reference [.test-job-linux-needs-testv-dir, before_script] + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh + # LTV update needed as ltv ISM metadata files are used + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh + after_script: + ### analyze for failures + - if ! [ -s smoke_test_output.txt ] || ! [ -s smoke_test_output_jbm.txt ] || ! [ -s smoke_test_output_hrtf.txt ]; then echo "Error in smoke test"; exit 1; fi + - ret_val=0 + - if cat smoke_test_output.txt | grep -c "failed"; then echo "Smoke test without JBM failed"; ret_val=1; fi + - if cat smoke_test_output_jbm.txt | grep -c "failed"; then echo "Smoke test JBM part failed"; ret_val=1; fi + - if cat smoke_test_output_hrtf.txt | grep -c "failed"; then echo "Smoke test with external hrtf files failed"; ret_val=1; fi + - exit $ret_val + artifacts: + name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" + expire_in: 1 week + when: always + paths: + - smoke_test_output.txt + - smoke_test_output_jbm.txt + - smoke_test_output_hrtf.txt + expose_as: "Smoke test results" diff --git a/main-basop.yml b/main-basop.yml index e581fd8..5666af4 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -1457,46 +1457,21 @@ split-rendering-pytest-on-merge-request: - $REPORT_XML # test that runs all modes with 1s input signals -# TODO: adapt for BASOP -.codec-smoke-test: +codec-smoke-test-basop: extends: - - .test-job-linux-needs-testv-dir - - .rules-merge-request-to-main-no-draft - timeout: "20 minutes" + - .smoke-test-template + - .rules-merge-request-to-main + timeout: "30 minutes" stage: test - needs: ["build-codec-linux-make"] + needs: + [ + "build-codec-linux-cmake", + "build-codec-linux-make", + ] script: - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - # LTV update needed as ltv ISM metadata files are used - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh - - bash ci/smoke_test.sh || true - - tar cJf logs.tar.xz out/logs/ - - ls -al logs.tar.* - ### analyze for failures - - if ! [ -s smoke_test_output.txt ] || ! [ -s smoke_test_output_jbm.txt ] || ! [ -s smoke_test_output_hrtf.txt ]; then echo "Error in smoke test"; exit 1; fi - - ret_val=0 - - if cat smoke_test_output.txt | grep -c "failed"; then echo "Smoke test without JBM failed"; ret_val=1; fi - - if cat smoke_test_output_jbm.txt | grep -c "failed"; then echo "Smoke test JBM part failed"; ret_val=1; fi - - if cat smoke_test_output_hrtf.txt | grep -c "failed"; then - - if [ "$DISABLE_HRTF" = "false" ]; then - - echo "Smoke test with external hrtf files failed" - - ret_val=1 - - else - - echo "Smoke test with external hrtf files failed, but DISABLE_HRTF is set. Ignoring failure." - - fi - - fi - - exit $ret_val - artifacts: - name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" - expire_in: 1 week - when: always - paths: - - smoke_test_output.txt - - smoke_test_output_jbm.txt - - smoke_test_output_hrtf.txt - - logs.tar.xz - expose_as: "Smoke test results" + # the "coverage" argument actually means "do not build again with instrumentation, but use the existing binaries" + - bash ci/smoke_test.sh coverage # from float # check for crashes if first received frame on decoder side is an SID diff --git a/main-float.yml b/main-float.yml index 1b80017..ebfd0da 100644 --- a/main-float.yml +++ b/main-float.yml @@ -3,6 +3,7 @@ include: - local: main.yml - local: includes/default-variables-float.yml - local: includes/complexity-jobs.yml + - local: includes/smoke-test.yml stages: - .pre @@ -407,34 +408,6 @@ build-codec-windows-msbuild: # --------------------------------------------------------------- # test that runs all modes with 1s input signals -.smoke-test-template: - extends: - - .test-job-linux-needs-testv-dir - tags: - - ivas-linux-fast - before_script: - - !reference [.test-job-linux-needs-testv-dir, before_script] - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - # LTV update needed as ltv ISM metadata files are used - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - after_script: - ### analyze for failures - - if ! [ -s smoke_test_output.txt ] || ! [ -s smoke_test_output_jbm.txt ] || ! [ -s smoke_test_output_hrtf.txt ]; then echo "Error in smoke test"; exit 1; fi - - ret_val=0 - - if cat smoke_test_output.txt | grep -c "failed"; then echo "Smoke test without JBM failed"; ret_val=1; fi - - if cat smoke_test_output_jbm.txt | grep -c "failed"; then echo "Smoke test JBM part failed"; ret_val=1; fi - - if cat smoke_test_output_hrtf.txt | grep -c "failed"; then echo "Smoke test with external hrtf files failed"; ret_val=1; fi - - exit $ret_val - artifacts: - name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" - expire_in: 1 week - when: always - paths: - - smoke_test_output.txt - - smoke_test_output_jbm.txt - - smoke_test_output_hrtf.txt - expose_as: "Smoke test results" - codec-smoke-test-float: extends: - .smoke-test-template @@ -465,7 +438,7 @@ basop-compat-smoke-test: allow_failure: true script: # get basop code and build binaries - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/build-binaries-from-basop-repo.sh ivas-float-update + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/build-binaries-from-basop-repo.sh main # the "coverage" argument actually means "do not build again with instrumentation, but use the existing binaries" - bash ci/smoke_test.sh coverage -- GitLab From 2f932b6b37c6253f6435bff51fc35405993d101e Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 27 Nov 2025 12:07:06 +0100 Subject: [PATCH 09/42] print git commit of basop code in smoke test compat job --- main-basop.yml | 3 +-- main-float.yml | 10 ++++++++++ snippets/float/build-binaries-from-basop-repo.sh | 8 +++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/main-basop.yml b/main-basop.yml index 5666af4..9c0d599 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -1470,8 +1470,7 @@ codec-smoke-test-basop: ] script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh - # the "coverage" argument actually means "do not build again with instrumentation, but use the existing binaries" - - bash ci/smoke_test.sh coverage + - bash ci/smoke_test.sh # from float # check for crashes if first received frame on decoder side is an SID diff --git a/main-float.yml b/main-float.yml index ebfd0da..08c5ef7 100644 --- a/main-float.yml +++ b/main-float.yml @@ -441,6 +441,16 @@ basop-compat-smoke-test: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/build-binaries-from-basop-repo.sh main # the "coverage" argument actually means "do not build again with instrumentation, but use the existing binaries" - bash ci/smoke_test.sh coverage + artifacts: + name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" + expire_in: 1 week + when: always + paths: + - smoke_test_output.txt + - smoke_test_output_jbm.txt + - smoke_test_output_hrtf.txt + - ivas-basop-commit-sha.txt + expose_as: "Smoke test results" # code selftest testvectors with memory-sanitizer binaries codec-msan: diff --git a/snippets/float/build-binaries-from-basop-repo.sh b/snippets/float/build-binaries-from-basop-repo.sh index 9cc0fd0..fd95b38 100644 --- a/snippets/float/build-binaries-from-basop-repo.sh +++ b/snippets/float/build-binaries-from-basop-repo.sh @@ -9,14 +9,20 @@ fi branchname=$1 clone_dir="ivas-basop" +commit_file="ivas-basop-commit-sha.txt" cd "${CI_PROJECT_DIR}" git clone -b $branchname https://forge.3gpp.org/rep/sa4/audio/ivas-basop.git --single-branch --depth 1 $clone_dir -make -C $clone_dir -j +pushd $clone_dir +git rev-parse HEAD >"$commit_file" +echo "Building BASOP codec @ $(git rev-parse HEAD)" +make -j +popd cp $clone_dir/IVAS_cod ./ cp $clone_dir/IVAS_dec ./ cp $clone_dir/IVAS_rend ./ cp $clone_dir/ISAR_post_rend ./ +cp $clone_dir/$commit_file /. -- GitLab From d810fdaae1d8274ba8552e2f7ed112536807203d Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 27 Nov 2025 12:18:48 +0100 Subject: [PATCH 10/42] fix path --- snippets/float/build-binaries-from-basop-repo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/float/build-binaries-from-basop-repo.sh b/snippets/float/build-binaries-from-basop-repo.sh index fd95b38..f5eb0fe 100644 --- a/snippets/float/build-binaries-from-basop-repo.sh +++ b/snippets/float/build-binaries-from-basop-repo.sh @@ -25,4 +25,4 @@ cp $clone_dir/IVAS_cod ./ cp $clone_dir/IVAS_dec ./ cp $clone_dir/IVAS_rend ./ cp $clone_dir/ISAR_post_rend ./ -cp $clone_dir/$commit_file /. +cp $clone_dir/$commit_file ./ -- GitLab From 8d1ec5bb942f5df3c8f75dba2716e363106d1c04 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 27 Nov 2025 12:22:09 +0100 Subject: [PATCH 11/42] restructure basop compat smoke test --- main-float.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main-float.yml b/main-float.yml index 08c5ef7..8a42b12 100644 --- a/main-float.yml +++ b/main-float.yml @@ -438,9 +438,11 @@ basop-compat-smoke-test: allow_failure: true script: # get basop code and build binaries - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/build-binaries-from-basop-repo.sh main - # the "coverage" argument actually means "do not build again with instrumentation, but use the existing binaries" - - bash ci/smoke_test.sh coverage + - git clone -b main https://forge.3gpp.org/rep/sa4/audio/ivas-basop.git --single-branch --depth 1 + - cp -r scripts tests ci pytest.ini ivas-basop/ + - pushd ivas-basop + - bash ci/smoke_test.sh + - popd artifacts: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" expire_in: 1 week -- GitLab From 54d1485d67cedf37f454e139618fa7f2b891d44c Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 27 Nov 2025 17:02:10 +0100 Subject: [PATCH 12/42] include smoke test in basop config --- main-basop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/main-basop.yml b/main-basop.yml index 9c0d599..a05fd47 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -3,6 +3,7 @@ include: - local: includes/default-variables-basop.yml - local: includes/rules-basop.yml - local: includes/complexity-jobs.yml + - local: smoke-test.yml stages: - .pre -- GitLab From 8db34768d5be3ac8ce1afeb6cea9a2ca68006fa5 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 27 Nov 2025 17:03:00 +0100 Subject: [PATCH 13/42] fix path --- main-basop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main-basop.yml b/main-basop.yml index a05fd47..08b3cdd 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -3,7 +3,7 @@ include: - local: includes/default-variables-basop.yml - local: includes/rules-basop.yml - local: includes/complexity-jobs.yml - - local: smoke-test.yml + - local: includes/smoke-test.yml stages: - .pre -- GitLab From 4110c59c6f2c7815529e459b5733cc4ebad60ac1 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 27 Nov 2025 17:13:39 +0100 Subject: [PATCH 14/42] deactivate smoke test in basop pipelines for now --- main-basop.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main-basop.yml b/main-basop.yml index 08b3cdd..ac492fa 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -1458,7 +1458,8 @@ split-rendering-pytest-on-merge-request: - $REPORT_XML # test that runs all modes with 1s input signals -codec-smoke-test-basop: +# TODO: activate once everything is fixed in BASOP +.codec-smoke-test-basop: extends: - .smoke-test-template - .rules-merge-request-to-main -- GitLab From 067b2d8fa93df275b773084ca2e89a16ee84d621 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 28 Nov 2025 11:08:16 +0100 Subject: [PATCH 15/42] remove some obsolete parts --- main-basop.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/main-basop.yml b/main-basop.yml index 433cac1..fcad4e3 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -996,11 +996,7 @@ build-codec-linux-instrumented-make: script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh - - if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" == "ivas-float-update" ] || [ "$CI_COMMIT_REF_NAME" == "ivas-float-update" ]; then - - bash scripts/prepare_instrumentation.sh - - else - - bash scripts/prepare_instrumentation.sh -m MEM_ONLY - - fi + - bash scripts/prepare_instrumentation.sh -m MEM_ONLY - make -j -C $INSTR_DIR # make sure that the codec builds with msan, asan and usan @@ -2401,7 +2397,6 @@ voip-be-on-merge-request: - .test-job-linux-needs-testv-dir rules: - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "voip-be-test" - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "ivas-float-update" # - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" # only have MR pipelines for MRs to main stage: test needs: ["build-codec-linux-make"] -- GitLab From 27280f343a1b0e3880f5d9707efb4946bdb66da8 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 28 Nov 2025 11:30:32 +0100 Subject: [PATCH 16/42] cleanup - remove double update-scripts.sh calls --- main-basop.yml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/main-basop.yml b/main-basop.yml index fcad4e3..cb4ad49 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -215,11 +215,7 @@ workflow: # Job templates # --------------------------------------------------------------- -# override for centrally defined job to make use of the basop runners -.job-linux: - tags: - - ivas-linux - +# override for centrally defined job to add the before_script section # custom variant of this template, we need to update the scripts repo before every build .test-job-linux: extends: @@ -264,7 +260,6 @@ workflow: - set -euxo pipefail - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh - if [ $USE_LTV -eq 1 ]; then - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/copy-ltv-files-to-testv-dir.sh @@ -406,7 +401,6 @@ workflow: - set -euxo pipefail - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh - python3 tests/create_short_testvectors.py - if [ $USE_LTV -eq 1 ]; then @@ -532,8 +526,6 @@ workflow: - exit 0 - fi - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh - - if [ $USE_LTV -eq 1 ]; then - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/copy-ltv-files-to-testv-dir.sh @@ -670,7 +662,6 @@ workflow: - !reference [ .job-linux, before_script ] - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/copy-ltv-files-to-testv-dir.sh - set -euxo pipefail @@ -712,7 +703,6 @@ workflow: - !reference [ .job-linux, before_script ] - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh - if [ $USE_LTV -eq 1 ]; then - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/copy-ltv-files-to-testv-dir.sh @@ -876,7 +866,6 @@ clang-format-check: needs: [] timeout: "10 minutes" script: - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh # Set up variables. This can't be done in the "variables" section because variables are not expanded properly there - PATCH_FILE_NAME="$ARTIFACT_BASE_NAME".patch - > @@ -1230,7 +1219,6 @@ renderer-pytest-on-merge-request: REPORT_CSV: "report--$CI_JOB_NAME-$CI_JOB_ID--sha-$CI_COMMIT_SHORT_SHA.csv" script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - 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 @@ -1303,7 +1291,6 @@ ivas-pytest-on-merge-request: - ivas-linux script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - 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 @@ -1374,7 +1361,6 @@ split-rendering-pytest-on-merge-request: REPORT_CSV: "report--$CI_JOB_NAME-$CI_JOB_ID--sha-$CI_COMMIT_SHORT_SHA.csv" script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - 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 @@ -1555,7 +1541,6 @@ split-rendering-smoke-test: stage: test script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh - make -j - testcase_timeout=10 @@ -1579,7 +1564,6 @@ lc3-wrapper-unit-test: stage: test script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh - cmake -B cmake-build -G "Unix Makefiles" -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true - cmake --build cmake-build -- -j @@ -1732,7 +1716,6 @@ lc3-wrapper-unit-test: # set CLANG_NUM, SELFTEST_SANITY_TIMEOUT and SELF_TEST_PRM_FILE in before_script section .sanitizer-selftest-anchor: &sanitizer-selftest-anchor - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/copy-ltv-files-to-testv-dir.sh - testcase_timeout=$SELFTEST_SANITY_TIMEOUT - export UBSAN_OPTIONS=suppressions=scripts/ubsan.supp,report_error_type=1,print_stacktrace=1 -- GitLab From d5f76db2c7a079be0795390226965cac398e2041 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Tue, 2 Dec 2025 16:50:12 +0100 Subject: [PATCH 17/42] update readme --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 97e3b78..597cd6e 100644 --- a/README.md +++ b/README.md @@ -13,12 +13,9 @@ This repository is mainly meant to share scripts and configs between the two rep ``` bash . ├── includes # folder for (possibly shared) yaml files which are included in the main ones -│   ├── default-variables-basop.yml -│   ├── default-variables.yml -│   ├── job-templates.yml -│   ├── rules-basop.yml -│   └── rules.yml +│   ├── .. ├── main-basop.yml # CI config for ivas-basop repo +├── main-float.yml # CI config for ivas-basop repo ├── main.yml # shared CI config ├── ... └── snippets # Folder for scripts used in CI only. Shared ones go in the folder directly. Can be small ones or bigger scripts which implement a whole job -- GitLab From 399d7d831fb8285dbf56a6f504e26cf72d0ca33e Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Tue, 2 Dec 2025 16:58:56 +0100 Subject: [PATCH 18/42] add comments for the various exec naming vars --- includes/default-variables-basop.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/includes/default-variables-basop.yml b/includes/default-variables-basop.yml index ee884c4..daf56b0 100644 --- a/includes/default-variables-basop.yml +++ b/includes/default-variables-basop.yml @@ -8,26 +8,31 @@ variables: SHORT_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_basop_encoder.prm" LONG_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_ltv_basop_encoder.prm" TEST_SUITE: "" - # These path variables are used by the pytest calls. - # They can be overwritten in the job templates to e.g. only test encoder or decoder in the chain + ### These path variables are used by the pytest calls. + ### They can be overwritten in the job definitions in the variables: section to e.g. only test encoder or decoder in the chain + ### E.g. a job that tests the BASOP encoder against the float ref via MLD etc. would overwrite DUT_DECODER_PATH with REF_DECODER_PATH in its variables: section + # "DUT_" - used in merge request pipelines for the branch build (Device Under Test) DUT_ENCODER_PATH: "./IVAS_cod_dut" DUT_DECODER_PATH: "./IVAS_dec_dut" DUT_RENDERER_PATH: "./IVAS_rend_dut" DUT_POST_RENDERER_PATH: "./ISAR_post_rend_dut" + # "REF_" - used in merge request regression jobs for the floating-point ref (ivas-codec main) REF_ENCODER_PATH: "./IVAS_cod_ref" REF_DECODER_PATH: "./IVAS_dec_ref" REF_RENDERER_PATH: "./IVAS_rend_ref" REF_POST_RENDERER_PATH: "./ISAR_post_rend_ref" + # "MERGE_TARGET_" - used in merge request jobs to denote the build from the target branch (mostly main) MERGE_TARGET_ENCODER_PATH: "./IVAS_cod_merge_target" MERGE_TARGET_DECODER_PATH: "./IVAS_dec_merge_target" MERGE_TARGET_RENDERER_PATH: "./IVAS_rend_merge_target" MERGE_TARGET_POST_RENDERER_PATH: "./ISAR_post_rend_merge_target" + # "MERGE_SOURCE_FLOAT_REF_" - used for the respective float reference branch of an MR. Can be main or the respective companion branch in ivas-codec repo MERGE_SOURCE_FLOAT_REF_ENCODER_PATH: "./IVAS_cod_merge_source_float_ref" MERGE_SOURCE_FLOAT_REF_DECODER_PATH: "./IVAS_dec_merge_source_float_ref" MERGE_SOURCE_FLOAT_REF_RENDERER_PATH: "./IVAS_rend_merge_source_float_ref" MERGE_SOURCE_FLOAT_REF_POST_RENDERER_PATH: "./ISAR_post_rend_merge_source_float_ref" - # These path variables are used for building the binaries - # They should never be overwritten! + ### These path variables are used for building the binaries + ### They should never be overwritten! DUT_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_cod_dut" DUT_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_dec_dut" DUT_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_rend_dut" -- GitLab From dd0ddd8e2090c56b08644f40b16b9765c2627b59 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 3 Dec 2025 09:26:03 +0100 Subject: [PATCH 19/42] remove main.yml --- main-basop.yml | 8 +++++++- main-float.yml | 8 +++++++- main.yml | 9 --------- 3 files changed, 14 insertions(+), 11 deletions(-) delete mode 100644 main.yml diff --git a/main-basop.yml b/main-basop.yml index 0bf9d12..75fd476 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -1,11 +1,17 @@ include: - - local: main.yml + - local: includes/default-variables.yml + - local: includes/rules.yml + - local: includes/job-templates.yml - local: includes/default-variables-basop.yml - local: includes/rules-basop.yml - local: includes/complexity-jobs.yml - local: includes/smoke-test.yml - local: includes/build-jobs.yml +default: + # by default, we want all jobs to be interruptible, and we need to configure this explicitly + interruptible: true + stages: - .pre - maintenance diff --git a/main-float.yml b/main-float.yml index 824824d..b83e272 100644 --- a/main-float.yml +++ b/main-float.yml @@ -1,10 +1,16 @@ include: - - local: main.yml + - local: includes/default-variables.yml + - local: includes/rules.yml + - local: includes/job-templates.yml - local: includes/default-variables-float.yml - local: includes/complexity-jobs.yml - local: includes/smoke-test.yml - local: includes/build-jobs.yml +default: + # by default, we want all jobs to be interruptible, and we need to configure this explicitly + interruptible: true + stages: - .pre - maintenance diff --git a/main.yml b/main.yml deleted file mode 100644 index 9062a0c..0000000 --- a/main.yml +++ /dev/null @@ -1,9 +0,0 @@ -include: - # variables can be overwritten easily if needed - - local: includes/default-variables.yml - - local: includes/rules.yml - - local: includes/job-templates.yml - -default: - # by default, we want all jobs to be interruptible, and we need to configure this explicitly - interruptible: true -- GitLab From 5d0da52d8867fd8c9186e4fbe428abf1194a884b Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 3 Dec 2025 09:53:49 +0100 Subject: [PATCH 20/42] move rules for basop into rules-basop file --- includes/rules-basop.yml | 102 +++++++++++++++++++++++++++++++++++++ main-basop.yml | 106 +-------------------------------------- 2 files changed, 103 insertions(+), 105 deletions(-) diff --git a/includes/rules-basop.yml b/includes/rules-basop.yml index b17e44a..2aba11c 100644 --- a/includes/rules-basop.yml +++ b/includes/rules-basop.yml @@ -54,3 +54,105 @@ - if: $CI_PIPELINE_SOURCE == 'schedule' # Scheduled in any branch variables: IVAS_PIPELINE_NAME: 'Scheduled pipeline: $CI_COMMIT_BRANCH' + +.rules-merge-request: + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - when: never + +.rules-merge-request-no-draft: + extends: .rules-basis + rules: + - if: $CI_MERGE_REQUEST_TITLE =~ /^(\[Draft\]|\(Draft\)|Draft:)/ + when: never + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - when: never + +.rules-merge-request-to-main: + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + +.rules-merge-request-to-main-no-draft: + rules: + - if: $CI_MERGE_REQUEST_TITLE =~ /^(\[Draft\]|\(Draft\)|Draft:)/ + when: never + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + +.rules-pytest-to-ref-pre: + rules: + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "ivas-conformance-linux" + when: never + - if: $CI_PIPELINE_SOURCE == 'web' + - if: $CI_PIPELINE_SOURCE == 'schedule' + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + when: never + +.rules-pytest-to-ref-short: + rules: + - if: $PYTEST_MLD_SHORT # Set by scheduled pipeline + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare" + - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + +.rules-pytest-to-input-short: + rules: + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-to-input" + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - if: $CI_PIPELINE_SOURCE == 'schedule' + when: never + +.rules-pytest-to-ref-enc-short-dmx: + rules: + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-enc-dmx" + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - if: $CI_PIPELINE_SOURCE == 'schedule' + when: never + +.rules-pytest-long: + rules: + - if: $PYTEST_MLD_LONG # Set by scheduled pipeline + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-long" + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + when: never + +.rules-pytest-long-fx-fx: + rules: + - if: $PYTEST_MLD_LONG_FX_FX # Set by scheduled pipeline + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-long-fx-fx" + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + when: never + +.rules-coverage: + rules: + - if: $COVERAGE_TEST # Set by scheduled pipeline + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "coverage" + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + when: never + +.rules-pytest-saturation-smoke-test: + rules: + - if: $PYTEST_SMOKE_TEST # Set by scheduled pipeline + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-saturation-smoke-test" + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + when: never diff --git a/main-basop.yml b/main-basop.yml index 75fd476..2ae0477 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -17,15 +17,13 @@ stages: - maintenance - prevalidate - build - # only in basop - compare - # only in basop - check-be - test - postvalidate - deploy - +# This sets when pipelines are created. Jobs have more specific rules to restrict them. workflow: name: '$IVAS_PIPELINE_NAME' rules: @@ -115,108 +113,6 @@ workflow: - (Get-Content -Path "CMakeLists.txt") -replace '# \(add_compile_options\("\/WX"\)\)', '$1' | Set-Content -Path "CMakeLists.txt" - Get-ChildItem -Path "Workspace_msvc" -Filter "*.vcxproj" | ForEach-Object { (Get-Content -Path $_.FullName) -replace 'false', 'true' | Set-Content -Path $_.FullName } -.rules-merge-request: - rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - - when: never - -.rules-merge-request-no-draft: - extends: .rules-basis - rules: - - if: $CI_MERGE_REQUEST_TITLE =~ /^(\[Draft\]|\(Draft\)|Draft:)/ - when: never - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - - when: never - -.rules-merge-request-to-main: - rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - -.rules-merge-request-to-main-no-draft: - rules: - - if: $CI_MERGE_REQUEST_TITLE =~ /^(\[Draft\]|\(Draft\)|Draft:)/ - when: never - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - -.rules-pytest-to-ref-pre: - rules: - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "ivas-conformance-linux" - when: never - - if: $CI_PIPELINE_SOURCE == 'web' - - if: $CI_PIPELINE_SOURCE == 'schedule' - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - when: never - -.rules-pytest-to-ref-short: - rules: - - if: $PYTEST_MLD_SHORT # Set by scheduled pipeline - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare" - - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - -.rules-pytest-to-input-short: - rules: - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-to-input" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - - if: $CI_PIPELINE_SOURCE == 'schedule' - when: never - -.rules-pytest-to-ref-enc-short-dmx: - rules: - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-enc-dmx" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - - if: $CI_PIPELINE_SOURCE == 'schedule' - when: never - -.rules-pytest-long: - rules: - - if: $PYTEST_MLD_LONG # Set by scheduled pipeline - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-long" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - when: never - -.rules-pytest-long-fx-fx: - rules: - - if: $PYTEST_MLD_LONG_FX_FX # Set by scheduled pipeline - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-long-fx-fx" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - when: never - -.rules-coverage: - rules: - - if: $COVERAGE_TEST # Set by scheduled pipeline - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "coverage" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - when: never - -.rules-pytest-saturation-smoke-test: - rules: - - if: $PYTEST_SMOKE_TEST # Set by scheduled pipeline - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-saturation-smoke-test" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - when: never - # --------------------------------------------------------------- # Job templates # --------------------------------------------------------------- -- GitLab From b8715504fa800354c345b05593c725aca089ed69 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 3 Dec 2025 09:55:17 +0100 Subject: [PATCH 21/42] now shared rules file anymore --- includes/{rules.yml => rules-float.yml} | 0 main-basop.yml | 1 - main-float.yml | 2 +- 3 files changed, 1 insertion(+), 2 deletions(-) rename includes/{rules.yml => rules-float.yml} (100%) diff --git a/includes/rules.yml b/includes/rules-float.yml similarity index 100% rename from includes/rules.yml rename to includes/rules-float.yml diff --git a/main-basop.yml b/main-basop.yml index 2ae0477..4f8512e 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -1,6 +1,5 @@ include: - local: includes/default-variables.yml - - local: includes/rules.yml - local: includes/job-templates.yml - local: includes/default-variables-basop.yml - local: includes/rules-basop.yml diff --git a/main-float.yml b/main-float.yml index b83e272..b0ca260 100644 --- a/main-float.yml +++ b/main-float.yml @@ -1,6 +1,6 @@ include: - local: includes/default-variables.yml - - local: includes/rules.yml + - local: includes/rules-float.yml - local: includes/job-templates.yml - local: includes/default-variables-float.yml - local: includes/complexity-jobs.yml -- GitLab From 7e33007ddcd16bbf117da3e98fd9c14e0189a808 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 3 Dec 2025 10:49:54 +0100 Subject: [PATCH 22/42] reorganize include folder --- includes/{ => basop}/default-variables-basop.yml | 0 includes/{ => basop}/rules-basop.yml | 0 includes/{ => float}/default-variables-float.yml | 0 includes/{ => float}/rules-float.yml | 0 includes/{ => shared}/build-jobs.yml | 0 includes/{ => shared}/complexity-jobs.yml | 0 includes/{ => shared}/default-variables.yml | 0 includes/{ => shared}/job-templates.yml | 0 includes/{ => shared}/smoke-test.yml | 0 main-basop.yml | 14 +++++++------- main-float.yml | 14 +++++++------- 11 files changed, 14 insertions(+), 14 deletions(-) rename includes/{ => basop}/default-variables-basop.yml (100%) rename includes/{ => basop}/rules-basop.yml (100%) rename includes/{ => float}/default-variables-float.yml (100%) rename includes/{ => float}/rules-float.yml (100%) rename includes/{ => shared}/build-jobs.yml (100%) rename includes/{ => shared}/complexity-jobs.yml (100%) rename includes/{ => shared}/default-variables.yml (100%) rename includes/{ => shared}/job-templates.yml (100%) rename includes/{ => shared}/smoke-test.yml (100%) diff --git a/includes/default-variables-basop.yml b/includes/basop/default-variables-basop.yml similarity index 100% rename from includes/default-variables-basop.yml rename to includes/basop/default-variables-basop.yml diff --git a/includes/rules-basop.yml b/includes/basop/rules-basop.yml similarity index 100% rename from includes/rules-basop.yml rename to includes/basop/rules-basop.yml diff --git a/includes/default-variables-float.yml b/includes/float/default-variables-float.yml similarity index 100% rename from includes/default-variables-float.yml rename to includes/float/default-variables-float.yml diff --git a/includes/rules-float.yml b/includes/float/rules-float.yml similarity index 100% rename from includes/rules-float.yml rename to includes/float/rules-float.yml diff --git a/includes/build-jobs.yml b/includes/shared/build-jobs.yml similarity index 100% rename from includes/build-jobs.yml rename to includes/shared/build-jobs.yml diff --git a/includes/complexity-jobs.yml b/includes/shared/complexity-jobs.yml similarity index 100% rename from includes/complexity-jobs.yml rename to includes/shared/complexity-jobs.yml diff --git a/includes/default-variables.yml b/includes/shared/default-variables.yml similarity index 100% rename from includes/default-variables.yml rename to includes/shared/default-variables.yml diff --git a/includes/job-templates.yml b/includes/shared/job-templates.yml similarity index 100% rename from includes/job-templates.yml rename to includes/shared/job-templates.yml diff --git a/includes/smoke-test.yml b/includes/shared/smoke-test.yml similarity index 100% rename from includes/smoke-test.yml rename to includes/shared/smoke-test.yml diff --git a/main-basop.yml b/main-basop.yml index 4f8512e..f155643 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -1,11 +1,11 @@ include: - - local: includes/default-variables.yml - - local: includes/job-templates.yml - - local: includes/default-variables-basop.yml - - local: includes/rules-basop.yml - - local: includes/complexity-jobs.yml - - local: includes/smoke-test.yml - - local: includes/build-jobs.yml + - local: includes/shared/default-variables.yml + - local: includes/shared/job-templates.yml + - local: includes/basop/default-variables-basop.yml + - local: includes/basop/rules-basop.yml + - local: includes/shared/complexity-jobs.yml + - local: includes/shared/smoke-test.yml + - local: includes/shared/build-jobs.yml default: # by default, we want all jobs to be interruptible, and we need to configure this explicitly diff --git a/main-float.yml b/main-float.yml index b0ca260..27b3d13 100644 --- a/main-float.yml +++ b/main-float.yml @@ -1,11 +1,11 @@ include: - - local: includes/default-variables.yml - - local: includes/rules-float.yml - - local: includes/job-templates.yml - - local: includes/default-variables-float.yml - - local: includes/complexity-jobs.yml - - local: includes/smoke-test.yml - - local: includes/build-jobs.yml + - local: includes/shared/default-variables.yml + - local: includes/float/rules-float.yml + - local: includes/shared/job-templates.yml + - local: includes/float/default-variables-float.yml + - local: includes/shared/complexity-jobs.yml + - local: includes/shared/smoke-test.yml + - local: includes/shared/build-jobs.yml default: # by default, we want all jobs to be interruptible, and we need to configure this explicitly -- GitLab From 6b9b4b0941d6bae916bb5390b4cd6b55d75998ba Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 3 Dec 2025 11:03:07 +0100 Subject: [PATCH 23/42] move uninterruptible job into shared file --- includes/shared/pre.yml | 21 +++++++++++++++++++++ main-basop.yml | 22 ---------------------- main-float.yml | 22 ---------------------- 3 files changed, 21 insertions(+), 44 deletions(-) create mode 100644 includes/shared/pre.yml diff --git a/includes/shared/pre.yml b/includes/shared/pre.yml new file mode 100644 index 0000000..640d659 --- /dev/null +++ b/includes/shared/pre.yml @@ -0,0 +1,21 @@ +# --------------------------------------------------------------- +# .pre jobs for setting up things +# --------------------------------------------------------------- + +# See: https://gitlab.com/gitlab-org/gitlab/-/issues/194023 +# Solution to make main branch pipelines uninterruptible while all other +# pipelines can be interrupted by default. This works because all jobs +# after uninterruptible jobs will be uninterruptible. Resource group +# setting avoids rare case where two fast merges could still interrupt +# pipeline. This should be revisited if there are updates to Gitlab. +uninterruptible: + stage: .pre + interruptible: false + resource_group: uninterruptible + script: + - echo "$CI_COMMIT_BRANCH is uninterruptible" + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + when: always + tags: + - ivas-linux diff --git a/main-basop.yml b/main-basop.yml index f155643..692f48f 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -661,28 +661,6 @@ workflow: - report-junit-ref.xml - report-junit-dut.xml -# --------------------------------------------------------------- -# .pre jobs for setting up things -# --------------------------------------------------------------- - -# See: https://gitlab.com/gitlab-org/gitlab/-/issues/194023 -# Solution to make main branch pipelines uninterruptible while all other -# pipelines can be interrupted by default. This works because all jobs -# after uninterruptible jobs will be uninterruptible. Resource group -# setting avoids rare case where two fast merges could still interrupt -# pipeline. This should be revisited if there are updates to Gitlab. -uninterruptible: - stage: .pre - interruptible: false - resource_group: uninterruptible - script: - - echo "$CI_COMMIT_BRANCH is uninterruptible" - rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - when: always - tags: - - ivas-linux - # --------------------------------------------------------------- # verification jobs # --------------------------------------------------------------- diff --git a/main-float.yml b/main-float.yml index 27b3d13..3d262cc 100644 --- a/main-float.yml +++ b/main-float.yml @@ -170,28 +170,6 @@ workflow: - if [ $exit_code20 -ne 0 ] || [ $exit_code10 -ne 0 ] || [ $exit_code5 -ne 0 ]; then exit 1; fi -# --------------------------------------------------------------- -# .pre jobs for setting up things -# --------------------------------------------------------------- - -# See: https://gitlab.com/gitlab-org/gitlab/-/issues/194023 -# Solution to make main branch pipelines uninterruptible while all other -# pipelines can be interrupted by default. This works because all jobs -# after uninterruptible jobs will be uninterruptible. Resource group -# setting avoids rare case where two fast merges could still interrupt -# pipeline. This should be revisited if there are updates to Gitlab. -uninterruptible: - stage: .pre - interruptible: false - resource_group: uninterruptible - script: - - echo "$CI_COMMIT_BRANCH is uninterruptible" - rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - when: always - tags: - - ivas-linux - # --------------------------------------------------------------- # Validation jobs # --------------------------------------------------------------- -- GitLab From 8ffa00e74920ef09c18add88b69e7a39f0662807 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 3 Dec 2025 11:04:56 +0100 Subject: [PATCH 24/42] add forgotten include --- main-basop.yml | 1 + main-float.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/main-basop.yml b/main-basop.yml index 692f48f..6325061 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -1,4 +1,5 @@ include: + - local: includes/shared/pre.yml - local: includes/shared/default-variables.yml - local: includes/shared/job-templates.yml - local: includes/basop/default-variables-basop.yml diff --git a/main-float.yml b/main-float.yml index 3d262cc..64f49e2 100644 --- a/main-float.yml +++ b/main-float.yml @@ -1,4 +1,5 @@ include: + - local: includes/shared/pre.yml - local: includes/shared/default-variables.yml - local: includes/float/rules-float.yml - local: includes/shared/job-templates.yml -- GitLab From be6cadd67e3dc7a9989a164782448493afd14b88 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 3 Dec 2025 11:31:08 +0100 Subject: [PATCH 25/42] centralize build jobs --- includes/basop/default-variables-basop.yml | 1 - includes/shared/build-jobs.yml | 139 +++++++++++++++++++++ includes/shared/default-variables.yml | 1 + main-basop.yml | 123 ------------------ main-float.yml | 83 ------------ snippets/activate-WX-windows.ps1 | 2 + snippets/print-common-info-windows.ps1 | 4 + 7 files changed, 146 insertions(+), 207 deletions(-) create mode 100644 snippets/activate-WX-windows.ps1 create mode 100644 snippets/print-common-info-windows.ps1 diff --git a/includes/basop/default-variables-basop.yml b/includes/basop/default-variables-basop.yml index daf56b0..9371741 100644 --- a/includes/basop/default-variables-basop.yml +++ b/includes/basop/default-variables-basop.yml @@ -58,7 +58,6 @@ variables: CI_REGRESSION_THRESH_MAX_ABS_DIFF: "50" CI_REGRESSION_THRESH_SSNR: "-1" CI_REGRESSION_THRESH_ODG: "-0.05" - INSTR_DIR: "scripts/c-code_instrument" BUILD_WITH_DEBUG_MODE_INFO: "" ENCODER_TEST: "" DELTA_ODG: "" diff --git a/includes/shared/build-jobs.yml b/includes/shared/build-jobs.yml index 948b69c..85ac622 100644 --- a/includes/shared/build-jobs.yml +++ b/includes/shared/build-jobs.yml @@ -1,3 +1,101 @@ +# --------------------------------------------------------------- +# Build jobs +# --------------------------------------------------------------- + +# ensure that codec builds on linux +build-codec-linux-make: + rules: + - if: $MANUAL_PIPELINE_TYPE == 'long-term-logs' || $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux' || $MANUAL_PIPELINE_TYPE == 'backup-long-term-logs' || $UPDATE_PAGES || $MANUAL_PIPELINE_TYPE == 'complexity' || $MEASURE_COMPLEXITY_LINUX + when: never + - if: $CI_PIPELINE_SOURCE == 'web' + - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + - if: $CI_PIPELINE_SOURCE == 'schedule' + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + extends: + - .build-job-linux + timeout: "10 minutes" + script: + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh + - make -j + +# ensure that codec builds on linux with cmake +build-codec-linux-cmake: + rules: + - if: $CI_MERGE_REQUEST_TITLE =~ /^(\[Draft\]|\(Draft\)|Draft:)/ + when: never + - if: $MANUAL_PIPELINE_TYPE == 'long-term-logs' || $MANUAL_PIPELINE_TYPE == 'backup-long-term-logs' || $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux' || $UPDATE_PAGES + when: never + - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + extends: + - .build-job-linux + timeout: "10 minutes" + script: + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh + - | + if [ "$CI_PROJECT_ID" == "$PROJECT_ID_BASOP" ]; then + bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh + fi + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh + - cmake -B cmake-build -G "Unix Makefiles" + - cmake --build cmake-build -- -j + +# ensure that codec builds on linux with instrumentation active +build-codec-linux-instrumented-make: + rules: + - if: $CI_MERGE_REQUEST_TITLE =~ /^(\[Draft\]|\(Draft\)|Draft:)/ + when: never + - if: $MANUAL_PIPELINE_TYPE == 'long-term-logs' || $MANUAL_PIPELINE_TYPE == 'backup-long-term-logs' || $UPDATE_PAGES + when: never + - if: $MEASURE_COMPLEXITY_LINUX || $MANUAL_PIPELINE_TYPE == 'complexity' + - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + extends: + - .build-job-linux + timeout: "12 minutes" + variables: + INSTRUMENTATION_ARGS: "" + script: + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh + - | + if [ "$CI_PROJECT_ID" == "$PROJECT_ID_BASOP" ]; then + bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh + INSTRUMENTATION_ARGS="-m MEM_ONLY" + fi + - bash scripts/prepare_instrumentation.sh $INSTRUMENTATION_ARGS + - make -j -C $INSTR_DIR + +# make sure that the codec builds with msan, asan and usan +build-codec-sanitizers-linux: + rules: + - if: $CI_MERGE_REQUEST_TITLE =~ /^(\[Draft\]|\(Draft\)|Draft:)/ + when: never + - if: $MANUAL_PIPELINE_TYPE == 'long-term-logs' || $MANUAL_PIPELINE_TYPE == 'backup-long-term-logs' || $UPDATE_PAGES + when: never + - if: $MANUAL_PIPELINE_TYPE == 'sanitizer' + - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + extends: + - .build-job-linux + timeout: "10 minutes" + script: + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh + - | + if [ "$CI_PROJECT_ID" == "$PROJECT_ID_BASOP" ]; then + bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh + fi + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh + - bash ci/build_codec_sanitizers_linux.sh + # ensure the codec builds with DEBUGGING activated # warnings are not treated as errors here build-codec-linux-debugging-make: @@ -17,3 +115,44 @@ build-codec-linux-debugging-make: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/enable-debugging-macro.sh - make -j + +build-codec-windows-msbuild: + rules: + - if: $MANUAL_PIPELINE_TYPE == 'long-term-logs' || $MANUAL_PIPELINE_TYPE == 'backup-long-term-logs' || $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux' || $UPDATE_PAGES || $MANUAL_PIPELINE_TYPE == 'complexity' || $MEASURE_COMPLEXITY_LINUX + when: never + - if: $CI_PIPELINE_SOURCE == 'web' + - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + - if: $CI_PIPELINE_SOURCE == 'schedule' + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + extends: + - .build-job-windows + timeout: "10 minutes" + tags: + - ivas-windows + script: + - powershell $CI_PROJECT_DIR\snippets\print-common-info-windows.ps1 + - powershell $CI_PROJECT_DIR\snippets\activate-WX-windows.ps1 + - MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug + +build-codec-windows-cmake: + rules: + - if: $MANUAL_PIPELINE_TYPE == 'long-term-logs' || $MANUAL_PIPELINE_TYPE == 'backup-long-term-logs' || $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux' || $UPDATE_PAGES || $MANUAL_PIPELINE_TYPE == 'complexity' || $MEASURE_COMPLEXITY_LINUX + when: never + - if: $CI_PIPELINE_SOURCE == 'web' + - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + - if: $CI_PIPELINE_SOURCE == 'schedule' + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + extends: + - .build-job-windows + timeout: "10 minutes" + tags: + - ivas-windows + script: + - powershell $CI_PROJECT_DIR\snippets\print-common-info-windows.ps1 + - powershell $CI_PROJECT_DIR\snippets\activate-WX-windows.ps1 + - cmake -G "Visual Studio 15 2017" . -Bbuild + - cmake --build build -j diff --git a/includes/shared/default-variables.yml b/includes/shared/default-variables.yml index d72bce4..6a2a5ad 100644 --- a/includes/shared/default-variables.yml +++ b/includes/shared/default-variables.yml @@ -17,3 +17,4 @@ variables: DISABLE_HRTF: "false" PROJECT_ID_FLOAT: "49" PROJECT_ID_BASOP: "77" + INSTR_DIR: "scripts/c-code_instrument" diff --git a/main-basop.yml b/main-basop.yml index 6325061..ff8cc81 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -95,24 +95,6 @@ workflow: variables: IVAS_PIPELINE_NAME: 'Scheduled pipeline: $CI_COMMIT_BRANCH' -# --------------------------------------------------------------- -# Generic script anchors -# --------------------------------------------------------------- - -# These can be used later on to do common tasks - -# Prints useful information for every job and should be used at the beginning of each job -.print-common-info-windows: &print-common-info-windows - - | - echo "Printing common information for build job." - echo "Current job is run on commit $CI_COMMIT_SHA" - echo "Commit time was $CI_COMMIT_TIMESTAMP" - ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression - -.activate-WX-windows: &activate-WX-windows - - (Get-Content -Path "CMakeLists.txt") -replace '# \(add_compile_options\("\/WX"\)\)', '$1' | Set-Content -Path "CMakeLists.txt" - - Get-ChildItem -Path "Workspace_msvc" -Filter "*.vcxproj" | ForEach-Object { (Get-Content -Path $_.FullName) -replace 'false', 'true' | Set-Content -Path $_.FullName } - # --------------------------------------------------------------- # Job templates # --------------------------------------------------------------- @@ -803,111 +785,6 @@ pytest-to-ref-pre: - $FLOAT_REF_COMMIT_FILE reports: dotenv: commits.env -# --------------------------------------------------------------- -# Build jobs -# --------------------------------------------------------------- - -# TODO: template rules for the build jobs -# ensure that codec builds on linux -build-codec-linux-make: - rules: - - if: $MANUAL_PIPELINE_TYPE == 'long-term-logs' || $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux' || $MANUAL_PIPELINE_TYPE == 'backup-long-term-logs' || $UPDATE_PAGES || $MANUAL_PIPELINE_TYPE == 'complexity' || $MEASURE_COMPLEXITY_LINUX - when: never - - if: $CI_PIPELINE_SOURCE == 'web' - - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - - if: $CI_PIPELINE_SOURCE == 'schedule' - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - extends: - - .build-job-linux - timeout: "10 minutes" - script: - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - - make -j - -build-codec-linux-cmake: - rules: - - if: $CI_MERGE_REQUEST_TITLE =~ /^(\[Draft\]|\(Draft\)|Draft:)/ - when: never - - if: $MANUAL_PIPELINE_TYPE == 'long-term-logs' || $MANUAL_PIPELINE_TYPE == 'backup-long-term-logs' || $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux' || $UPDATE_PAGES - when: never - - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - extends: - - .build-job-linux - timeout: "10 minutes" - script: - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - - cmake -B cmake-build -G "Unix Makefiles" - - cmake --build cmake-build -- -j - -# ensure that codec builds on linux with instrumentation active -build-codec-linux-instrumented-make: - rules: - - if: $CI_MERGE_REQUEST_TITLE =~ /^(\[Draft\]|\(Draft\)|Draft:)/ - when: never - - if: $MANUAL_PIPELINE_TYPE == 'long-term-logs' || $MANUAL_PIPELINE_TYPE == 'backup-long-term-logs' || $UPDATE_PAGES - when: never - - if: $MEASURE_COMPLEXITY_LINUX || $MANUAL_PIPELINE_TYPE == 'complexity' - - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - extends: - - .build-job-linux - timeout: "12 minutes" - script: - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh - - bash scripts/prepare_instrumentation.sh -m MEM_ONLY - - make -j -C $INSTR_DIR - -# make sure that the codec builds with msan, asan and usan -build-codec-sanitizers-linux: - rules: - - if: $CI_MERGE_REQUEST_TITLE =~ /^(\[Draft\]|\(Draft\)|Draft:)/ - when: never - - if: $MANUAL_PIPELINE_TYPE == 'long-term-logs' || $MANUAL_PIPELINE_TYPE == 'backup-long-term-logs' || $UPDATE_PAGES - when: never - - if: $MANUAL_PIPELINE_TYPE == 'sanitizer' - - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - extends: - - .build-job-linux - timeout: "10 minutes" - script: - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - - bash ci/build_codec_sanitizers_linux.sh - -build-codec-windows-msbuild: - rules: - - if: $MANUAL_PIPELINE_TYPE == 'long-term-logs' || $MANUAL_PIPELINE_TYPE == 'backup-long-term-logs' || $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux' || $UPDATE_PAGES || $MANUAL_PIPELINE_TYPE == 'complexity' || $MEASURE_COMPLEXITY_LINUX - when: never - - if: $CI_PIPELINE_SOURCE == 'web' - - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - - if: $CI_PIPELINE_SOURCE == 'schedule' - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - extends: - - .build-job-windows - timeout: "10 minutes" - tags: - - ivas-windows - script: - - *print-common-info-windows - - *activate-WX-windows - - MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug # --------------------------------------------------------------- # Test jobs for merge requests diff --git a/main-float.yml b/main-float.yml index 64f49e2..7b00c2a 100644 --- a/main-float.yml +++ b/main-float.yml @@ -75,13 +75,6 @@ workflow: # These can be used later on to do common tasks -.print-common-info-windows: &print-common-info-windows - - | - echo "Printing common information for build job." - echo "Current job is run on commit $CI_COMMIT_SHA" - echo "Commit time was $CI_COMMIT_TIMESTAMP" - ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression - .merge-request-comparison-setup-codec: &merge-request-comparison-setup-codec ### build test binaries, initial clean for paranoia reasons - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/disable-debugging-macro.sh @@ -140,10 +133,6 @@ workflow: - cp $LTV_DIR_WIN\*.met scripts\testv - cp $LTV_DIR_WIN\*.csv scripts\testv -.activate-WX-windows: &activate-WX-windows - - (Get-Content -Path "CMakeLists.txt") -replace '# \(add_compile_options\("\/WX"\)\)', '$1' | Set-Content -Path "CMakeLists.txt" - - Get-ChildItem -Path "Workspace_msvc" -Filter "*.vcxproj" | ForEach-Object { (Get-Content -Path $_.FullName) -replace 'false', 'true' | Set-Content -Path $_.FullName } - # to be reused in MR and LTV-scheduled sanitizer test jobs # set CLANG_NUM, SELFTEST_SANITY_TIMEOUT and SELF_TEST_PRM_FILE in before_script section .sanitizer-selftest-anchor: @@ -316,78 +305,6 @@ basop-compat-encoder-ltv: script: - exit 0 - -# --------------------------------------------------------------- -# Build jobs -# --------------------------------------------------------------- - -build-codec-linux-make: - extends: - - .build-job-linux - - .rules-basis - script: - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - - make -j - -build-codec-linux-cmake: - extends: - - .build-job-linux - - .rules-basis - script: - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - - mkdir build - - cd build - - cmake .. - - cd .. - - make -C build -j - -build-codec-instrumented-linux: - extends: - - .build-job-linux - - .rules-basis - timeout: "10 minutes" - script: - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - ./scripts/prepare_instrumentation.sh - - make -j -C scripts/c-code_instrument - artifacts: - when: always - access: all - expire_in: "30 days" - paths: - - wmc_tool_output.txt - -# make sure that the codec builds with msan, asan and usan -build-codec-sanitizers-linux: - extends: - - .build-job-linux - - .rules-basis - script: - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - - bash ci/build_codec_sanitizers_linux.sh - -build-codec-windows-cmake: - extends: - - .build-job-windows - - .rules-basis - script: - - *print-common-info-windows - - *activate-WX-windows - - cmake -G "Visual Studio 15 2017" . -Bbuild - - cmake --build build -j - -build-codec-windows-msbuild: - extends: - - .build-job-windows - - .rules-basis - script: - - *print-common-info-windows - - *activate-WX-windows - - MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug - # --------------------------------------------------------------- # Test jobs for merge requests # --------------------------------------------------------------- diff --git a/snippets/activate-WX-windows.ps1 b/snippets/activate-WX-windows.ps1 new file mode 100644 index 0000000..a028648 --- /dev/null +++ b/snippets/activate-WX-windows.ps1 @@ -0,0 +1,2 @@ +(Get-Content -Path "CMakeLists.txt") -replace '# \(add_compile_options\("\/WX"\)\)', '$1' | Set-Content -Path "CMakeLists.txt" +Get-ChildItem -Path "Workspace_msvc" -Filter "*.vcxproj" | ForEach-Object { (Get-Content -Path $_.FullName) -replace 'false', 'true' | Set-Content -Path $_.FullName } diff --git a/snippets/print-common-info-windows.ps1 b/snippets/print-common-info-windows.ps1 new file mode 100644 index 0000000..c55144e --- /dev/null +++ b/snippets/print-common-info-windows.ps1 @@ -0,0 +1,4 @@ +echo "Printing common information for build job." +echo "Current job is run on commit $CI_COMMIT_SHA" +echo "Commit time was $CI_COMMIT_TIMESTAMP" +("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression -- GitLab From ba612d66c5958fe8d230e03080549a23fbcba5ee Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 3 Dec 2025 11:32:47 +0100 Subject: [PATCH 26/42] use snippet instead of anchor --- main-float.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main-float.yml b/main-float.yml index 7b00c2a..71bab5a 100644 --- a/main-float.yml +++ b/main-float.yml @@ -1046,7 +1046,7 @@ be-2-evs-windows: needs: ["build-codec-windows-msbuild"] timeout: "20 minutes" # To be revisited script: - - *print-common-info-windows + - powershell $CI_PROJECT_DIR\snippets\print-common-info-windows.ps1 - $winoutdata = $null - MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Release | tee -variable winoutdata @@ -1211,7 +1211,7 @@ ivas-conformance: exit_codes: - 123 script: - - *print-common-info-windows + - powershell $CI_PROJECT_DIR\snippets\print-common-info-windows.ps1 - MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug - cp -force IVAS_cod.exe IVAS_cod_ref.exe - cp -force IVAS_dec.exe IVAS_dec_ref.exe -- GitLab From 65132c5f0411224adaf12e269b0d78cace20d82b Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 3 Dec 2025 11:34:38 +0100 Subject: [PATCH 27/42] fix name of build job in needs --- main-float.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main-float.yml b/main-float.yml index 71bab5a..21500f1 100644 --- a/main-float.yml +++ b/main-float.yml @@ -320,7 +320,7 @@ codec-smoke-test-float: [ "build-codec-linux-cmake", "build-codec-linux-make", - "build-codec-instrumented-linux", + "build-codec-instrumented-linux-make", "build-codec-sanitizers-linux", ] script: @@ -406,7 +406,7 @@ pytest-compare-20ms-and-5ms-rendering: [ "build-codec-linux-cmake", "build-codec-linux-make", - "build-codec-instrumented-linux", + "build-codec-instrumented-linux-make", "build-codec-sanitizers-linux", ] script: -- GitLab From 1951459a7098f002ffd507a8d488d45f3c2f4971 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 3 Dec 2025 11:36:27 +0100 Subject: [PATCH 28/42] fix name again --- main-float.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main-float.yml b/main-float.yml index 21500f1..fed4268 100644 --- a/main-float.yml +++ b/main-float.yml @@ -320,7 +320,7 @@ codec-smoke-test-float: [ "build-codec-linux-cmake", "build-codec-linux-make", - "build-codec-instrumented-linux-make", + "build-codec-linux-instrumented-make", "build-codec-sanitizers-linux", ] script: @@ -406,7 +406,7 @@ pytest-compare-20ms-and-5ms-rendering: [ "build-codec-linux-cmake", "build-codec-linux-make", - "build-codec-instrumented-linux-make", + "build-codec-linux-instrumented-make", "build-codec-sanitizers-linux", ] script: -- GitLab From 4c6a904ec79a4f5ba63314dc8601a7003e0730cf Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 3 Dec 2025 11:53:40 +0100 Subject: [PATCH 29/42] remove cmake build job for windows for now --- includes/shared/build-jobs.yml | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/includes/shared/build-jobs.yml b/includes/shared/build-jobs.yml index 85ac622..ae697a5 100644 --- a/includes/shared/build-jobs.yml +++ b/includes/shared/build-jobs.yml @@ -132,27 +132,6 @@ build-codec-windows-msbuild: tags: - ivas-windows script: - - powershell $CI_PROJECT_DIR\snippets\print-common-info-windows.ps1 - - powershell $CI_PROJECT_DIR\snippets\activate-WX-windows.ps1 + - powershell $env:CI_PROJECT_DIR\snippets\print-common-info-windows.ps1 + - powershell $env:CI_PROJECT_DIR\snippets\activate-WX-windows.ps1 - MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug - -build-codec-windows-cmake: - rules: - - if: $MANUAL_PIPELINE_TYPE == 'long-term-logs' || $MANUAL_PIPELINE_TYPE == 'backup-long-term-logs' || $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux' || $UPDATE_PAGES || $MANUAL_PIPELINE_TYPE == 'complexity' || $MEASURE_COMPLEXITY_LINUX - when: never - - if: $CI_PIPELINE_SOURCE == 'web' - - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - - if: $CI_PIPELINE_SOURCE == 'schedule' - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - extends: - - .build-job-windows - timeout: "10 minutes" - tags: - - ivas-windows - script: - - powershell $CI_PROJECT_DIR\snippets\print-common-info-windows.ps1 - - powershell $CI_PROJECT_DIR\snippets\activate-WX-windows.ps1 - - cmake -G "Visual Studio 15 2017" . -Bbuild - - cmake --build build -j -- GitLab From 52e4a7b437eb0a10b08c61d82dab09d3f00f917d Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 3 Dec 2025 11:57:17 +0100 Subject: [PATCH 30/42] fix powershell call --- includes/shared/build-jobs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/shared/build-jobs.yml b/includes/shared/build-jobs.yml index ae697a5..0fc5b68 100644 --- a/includes/shared/build-jobs.yml +++ b/includes/shared/build-jobs.yml @@ -132,6 +132,6 @@ build-codec-windows-msbuild: tags: - ivas-windows script: - - powershell $env:CI_PROJECT_DIR\snippets\print-common-info-windows.ps1 - - powershell $env:CI_PROJECT_DIR\snippets\activate-WX-windows.ps1 + - powershell $env:CI_PROJECT_DIR\ivas-codec-ci\snippets\print-common-info-windows.ps1 + - powershell $env:CI_PROJECT_DIR\ivas-codec-ci\snippets\activate-WX-windows.ps1 - MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug -- GitLab From 8fd07eb660ea4853ab68f4d47067683859e9a5bc Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 3 Dec 2025 12:08:10 +0100 Subject: [PATCH 31/42] checkout instead of switch --- includes/shared/job-templates.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/shared/job-templates.yml b/includes/shared/job-templates.yml index 031f613..51d933e 100644 --- a/includes/shared/job-templates.yml +++ b/includes/shared/job-templates.yml @@ -22,7 +22,7 @@ if (-not $env:IVAS_CODEC_CI_REF) { echo "Error: IVAS_CODEC_CI_REF not set" ; exit 1 } # note: git clone -b does not work with SHA refs, hence using the safe way of a full clone and git switch # also, we cannot use && with powershell < 7 unfortunately, hence we cannot reliably detect if the snippet fails - - git clone $env:CI_SERVER_URL/ivas-codec-pc/ivas-codec-ci.git ivas-codec-ci; pushd ivas-codec-ci ; git switch --detach $env:IVAS_CODEC_CI_REF ; popd + - git clone $env:CI_SERVER_URL/ivas-codec-pc/ivas-codec-ci.git ivas-codec-ci; pushd ivas-codec-ci ; git checkout $env:IVAS_CODEC_CI_REF ; popd .build-job-linux: stage: build -- GitLab From 4221856c3ebbe4f92b3dced08c95e6f6b7574e40 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 3 Dec 2025 13:00:58 +0100 Subject: [PATCH 32/42] fix path for snippet calls --- main-float.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main-float.yml b/main-float.yml index fed4268..184f2c1 100644 --- a/main-float.yml +++ b/main-float.yml @@ -1046,7 +1046,7 @@ be-2-evs-windows: needs: ["build-codec-windows-msbuild"] timeout: "20 minutes" # To be revisited script: - - powershell $CI_PROJECT_DIR\snippets\print-common-info-windows.ps1 + - powershell $CI_PROJECT_DIR\ivas-codec-ci\snippets\print-common-info-windows.ps1 - $winoutdata = $null - MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Release | tee -variable winoutdata @@ -1211,7 +1211,7 @@ ivas-conformance: exit_codes: - 123 script: - - powershell $CI_PROJECT_DIR\snippets\print-common-info-windows.ps1 + - powershell $CI_PROJECT_DIR\ivas-codec-ci\snippets\print-common-info-windows.ps1 - MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug - cp -force IVAS_cod.exe IVAS_cod_ref.exe - cp -force IVAS_dec.exe IVAS_dec_ref.exe -- GitLab From 637ace4eef8e9cddc48ca4a80b01c1c9bf823941 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 3 Dec 2025 13:12:03 +0100 Subject: [PATCH 33/42] add printout as CI ref for windows --- includes/shared/job-templates.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/shared/job-templates.yml b/includes/shared/job-templates.yml index 51d933e..8ec7b03 100644 --- a/includes/shared/job-templates.yml +++ b/includes/shared/job-templates.yml @@ -19,7 +19,7 @@ - ivas-windows before_script: - | - if (-not $env:IVAS_CODEC_CI_REF) { echo "Error: IVAS_CODEC_CI_REF not set" ; exit 1 } + if (-not $env:IVAS_CODEC_CI_REF) { echo "Error: IVAS_CODEC_CI_REF not set" ; exit 1 } else { echo "IVAS_CODEC_CI_REF set to: $env:IVAS_CODEC_CI_REF" } # note: git clone -b does not work with SHA refs, hence using the safe way of a full clone and git switch # also, we cannot use && with powershell < 7 unfortunately, hence we cannot reliably detect if the snippet fails - git clone $env:CI_SERVER_URL/ivas-codec-pc/ivas-codec-ci.git ivas-codec-ci; pushd ivas-codec-ci ; git checkout $env:IVAS_CODEC_CI_REF ; popd -- GitLab From 5f9d8c592e99e145e4208fb0e19157799dcf6e15 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 3 Dec 2025 13:59:28 +0100 Subject: [PATCH 34/42] fix extends for windows jobs --- main-float.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main-float.yml b/main-float.yml index 184f2c1..2fcbfa6 100644 --- a/main-float.yml +++ b/main-float.yml @@ -1040,6 +1040,7 @@ check-bitexactness-ext-and-transport-format: be-2-evs-windows: extends: - .rules-merge-request-to-main + - .job-windows tags: - ivas-windows stage: test @@ -1200,6 +1201,8 @@ test-be-to-release: expose_as: "test-be-to-release results" ivas-conformance: + extends: + - .job-windows tags: - ivas-windows stage: test -- GitLab From 461271c56a3a10e8bc1993a9133508682ea18c3f Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 3 Dec 2025 15:08:50 +0100 Subject: [PATCH 35/42] disable jobs with problems in BASOP --- main-basop.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main-basop.yml b/main-basop.yml index ff8cc81..83da88b 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -1195,7 +1195,7 @@ split-rendering-pytest-on-merge-request: # from float # check for crashes if first received frame on decoder side is an SID -check-first-frame-is-sid: +.check-first-frame-is-sid: extends: - .test-job-linux-needs-testv-dir - .rules-merge-request-to-main-no-draft @@ -1240,7 +1240,7 @@ check-first-frame-is-sid: ### From Float # Check interop IVAS_cod_test -> IVAS_dec_ref -ivas-interop-on-merge-request: +.ivas-interop-on-merge-request: extends: - .test-job-linux-needs-testv-dir - .rules-merge-request-to-main-no-draft -- GitLab From a4000b61f49d7d12324448f8e134458297d75d02 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 3 Dec 2025 17:29:30 +0100 Subject: [PATCH 36/42] update readme --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 597cd6e..fbb57b8 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,11 @@ This repository is mainly meant to share scripts and configs between the two rep ``` bash . ├── includes # folder for (possibly shared) yaml files which are included in the main ones -│   ├── .. +│   ├── basop +│   ├── float +│   └── shared ├── main-basop.yml # CI config for ivas-basop repo ├── main-float.yml # CI config for ivas-basop repo -├── main.yml # shared CI config ├── ... └── snippets # Folder for scripts used in CI only. Shared ones go in the folder directly. Can be small ones or bigger scripts which implement a whole job ├── basop -- GitLab From 022ef1d11fac3e8ac486d5fddc287d3ca3f48b2e Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 4 Dec 2025 08:46:52 +0100 Subject: [PATCH 37/42] update readme --- README.md | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fbb57b8..170542a 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ This repository is mainly meant to share scripts and configs between the two rep ## Usage For both repositories (ivas-codec and ivas-basop), there should be one main yml file in here which includes stuff from `includes`. -Ideally, there is no other CI code in the respective repositories except a minimal `.gitlab-ci.yml` file which includes from here (currently only achieved for ivas-basop), e.g. (from ivas-basop): +There is no other CI code in the respective repositories except a minimal `.gitlab-ci.yml` file which includes from here, e.g. (from ivas-basop): ``` yaml variables: @@ -47,7 +47,30 @@ include: This way, any CI change can be developed centrally in this repository and does not need to be merged/ported to different repositories/branches. -### Adding new CI code +### Adding a new job + +In general, job definitions should go into `main-float.yml` or `main-basop-yml` if they are specific to one of the repos. +Shared jobs should go into `includes/`. +It might also be helpful for bundling stuff together to put repo-specific code into `includes/` as well. + +The workflow and rules section for each CI config are located at the top of the respective `main-*.yml` file. +After implementing your job, adapt or add there so that your job runs when desired. + +Prefer adding scripts in `snippets/` over yaml anchors. +Also check the [guidelines](#some-guidelines-hints) below. + +For shared jobs, it might be needed to check in which project the CI is running. +You can do that by checking the gitlab-predefined `CI_PROJECT_ID` variable against `PROJECT_ID_FLOAT` and/or `PROJECT_ID_BASOP`, e.g.: + +``` yaml +script: + - | + if [ "$CI_PROJECT_ID" == "$PROJECT_ID_BASOP" ]; then + bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh + fi +``` + +### Testing new CI code 1. Implement your new CI code on a branch in this repo, e.g. `add-awesome-test` and ideally add a merge request for easier review. 2. Test it by opening a branch in the respective ivas-* repository and changing IVAS_CODEC_CI_REF to your WIP branch, so the yaml there should read: @@ -89,6 +112,5 @@ Useful configuration variables: ### Some guidelines/hints - use only one include section at the top of the main yml file to keep things clear, remember that later stuff overwrites earlier stuff -- in general prefer adding scripts here over using yaml anchors in a CI config file - if your script shall modify some environment variable, you need to run it with `source` instead of calling it. - the merge CI config in the ivas-* repos can be viewed in the pipeline editor under "full configuration" - this is especially useful when making changes which should not functionally affect the CI, then it is helpful to copy the full merged config with and without the changes and compare the files directly or as parsed yaml dict locally. -- GitLab From e7b433807cb6013d1ea1abfe810470f13b013ea9 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 4 Dec 2025 08:53:19 +0100 Subject: [PATCH 38/42] move repo-specific includes into the main-*.yml files --- README.md | 5 +- includes/basop/default-variables-basop.yml | 102 ------- includes/basop/rules-basop.yml | 158 ----------- includes/{shared => }/build-jobs.yml | 0 includes/{shared => }/complexity-jobs.yml | 0 includes/{shared => }/default-variables.yml | 0 includes/float/default-variables-float.yml | 34 --- includes/float/rules-float.yml | 42 --- includes/{shared => }/job-templates.yml | 0 includes/{shared => }/pre.yml | 0 includes/{shared => }/smoke-test.yml | 0 main-basop.yml | 280 +++++++++++++++++++- main-float.yml | 93 ++++++- 13 files changed, 360 insertions(+), 354 deletions(-) delete mode 100644 includes/basop/default-variables-basop.yml delete mode 100644 includes/basop/rules-basop.yml rename includes/{shared => }/build-jobs.yml (100%) rename includes/{shared => }/complexity-jobs.yml (100%) rename includes/{shared => }/default-variables.yml (100%) delete mode 100644 includes/float/default-variables-float.yml delete mode 100644 includes/float/rules-float.yml rename includes/{shared => }/job-templates.yml (100%) rename includes/{shared => }/pre.yml (100%) rename includes/{shared => }/smoke-test.yml (100%) diff --git a/README.md b/README.md index 170542a..796071e 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,7 @@ This repository is mainly meant to share scripts and configs between the two rep ``` bash . -├── includes # folder for (possibly shared) yaml files which are included in the main ones -│   ├── basop -│   ├── float -│   └── shared +├── includes # folder for shared yaml files which are included in the main ones ├── main-basop.yml # CI config for ivas-basop repo ├── main-float.yml # CI config for ivas-basop repo ├── ... diff --git a/includes/basop/default-variables-basop.yml b/includes/basop/default-variables-basop.yml deleted file mode 100644 index 9371741..0000000 --- a/includes/basop/default-variables-basop.yml +++ /dev/null @@ -1,102 +0,0 @@ -variables: - EVS_BE_TEST_DIR_BASOP: "/usr/local/be_2_evs_basop" - FLOAT_REF_BRANCH_MERGE_SOURCE: "" - SCRIPTS_DIR: "/usr/local/scripts" - LONG_TEST_SUITE: "tests/codec_be_on_mr_nonselection tests/renderer --param_file scripts/config/self_test_ltv.prm --use_ltv" - LONG_TEST_SUITE_NO_RENDERER: "tests/codec_be_on_mr_nonselection --param_file scripts/config/self_test_ltv.prm --use_ltv" - SHORT_TEST_SUITE: "tests/codec_be_on_mr_nonselection" - SHORT_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_basop_encoder.prm" - LONG_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_ltv_basop_encoder.prm" - TEST_SUITE: "" - ### These path variables are used by the pytest calls. - ### They can be overwritten in the job definitions in the variables: section to e.g. only test encoder or decoder in the chain - ### E.g. a job that tests the BASOP encoder against the float ref via MLD etc. would overwrite DUT_DECODER_PATH with REF_DECODER_PATH in its variables: section - # "DUT_" - used in merge request pipelines for the branch build (Device Under Test) - DUT_ENCODER_PATH: "./IVAS_cod_dut" - DUT_DECODER_PATH: "./IVAS_dec_dut" - DUT_RENDERER_PATH: "./IVAS_rend_dut" - DUT_POST_RENDERER_PATH: "./ISAR_post_rend_dut" - # "REF_" - used in merge request regression jobs for the floating-point ref (ivas-codec main) - REF_ENCODER_PATH: "./IVAS_cod_ref" - REF_DECODER_PATH: "./IVAS_dec_ref" - REF_RENDERER_PATH: "./IVAS_rend_ref" - REF_POST_RENDERER_PATH: "./ISAR_post_rend_ref" - # "MERGE_TARGET_" - used in merge request jobs to denote the build from the target branch (mostly main) - MERGE_TARGET_ENCODER_PATH: "./IVAS_cod_merge_target" - MERGE_TARGET_DECODER_PATH: "./IVAS_dec_merge_target" - MERGE_TARGET_RENDERER_PATH: "./IVAS_rend_merge_target" - MERGE_TARGET_POST_RENDERER_PATH: "./ISAR_post_rend_merge_target" - # "MERGE_SOURCE_FLOAT_REF_" - used for the respective float reference branch of an MR. Can be main or the respective companion branch in ivas-codec repo - MERGE_SOURCE_FLOAT_REF_ENCODER_PATH: "./IVAS_cod_merge_source_float_ref" - MERGE_SOURCE_FLOAT_REF_DECODER_PATH: "./IVAS_dec_merge_source_float_ref" - MERGE_SOURCE_FLOAT_REF_RENDERER_PATH: "./IVAS_rend_merge_source_float_ref" - MERGE_SOURCE_FLOAT_REF_POST_RENDERER_PATH: "./ISAR_post_rend_merge_source_float_ref" - ### These path variables are used for building the binaries - ### They should never be overwritten! - DUT_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_cod_dut" - DUT_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_dec_dut" - DUT_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_rend_dut" - DUT_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./ISAR_post_rend_dut" - REF_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_cod_ref" - REF_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_dec_ref" - REF_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_rend_ref" - REF_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./ISAR_post_rend_ref" - MERGE_TARGET_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_cod_merge_target" - MERGE_TARGET_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_dec_merge_target" - MERGE_TARGET_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_rend_merge_target" - MERGE_TARGET_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./ISAR_post_rend_merge_target" - MERGE_SOURCE_FLOAT_REF_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_cod_merge_source_float_ref" - MERGE_SOURCE_FLOAT_REF_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_dec_merge_source_float_ref" - MERGE_SOURCE_FLOAT_REF_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_rend_merge_source_float_ref" - MERGE_SOURCE_FLOAT_REF_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./ISAR_post_rend_merge_source_float_ref" - LEVEL_SCALING: "1.0" - PRM_FILES: "scripts/config/self_test.prm scripts/config/self_test_ltv.prm" - TESTCASE_TIMEOUT_STV: 900 - TESTCASE_TIMEOUT_LTV: 2400 - TESTCASE_TIMEOUT_LTV_SANITIZERS: 10800 - CI_REGRESSION_THRESH_MLD: "0.1" - CI_REGRESSION_THRESH_MAX_ABS_DIFF: "50" - CI_REGRESSION_THRESH_SSNR: "-1" - CI_REGRESSION_THRESH_ODG: "-0.05" - BUILD_WITH_DEBUG_MODE_INFO: "" - ENCODER_TEST: "" - DELTA_ODG: "" - COMPARE_DMX: "" - SPLIT_COMPARISON: "" - SKIP_REGRESSION_CHECK: "" - FAILED_TESTCASES_LIST: "failed-testcases.txt" - ERRORS_TESTCASES_LIST: "errors-testcases.txt" - PYTEST_CACHE_ARTIFACT: "pytest_cache.zip" - MEASURES_FOR_REPORT: "MLD MAX_ABS_DIFF MIN_SSNR MIN_ODG" - FLOAT_REF_COMMIT_FILE: "float-ref-git-sha.txt" - CUT_COMMIT_FILE: "CuT-git-sha.txt" - MERGE_TARGET_COMMIT_FILE: "merge-target-git-sha.txt" - MERGE_SOURCE_FLOAT_REF_COMMIT_FILE: "merge-source-float-ref-git-sha.txt" - RUNNER_TAG: "ivas-linux" - LOGS_BACKUP_SOURCE_DIR: "" - LOGS_BACKUP_TARGET_DIR: "" - # set this to true to skip the external HRTF testcases in pytest calls - DISABLE_HRTF: "false" - MANUAL_PIPELINE_TYPE: - description: "Type for the manual pipeline run. Use 'pytest-compare' to run comparison test against reference float codec." - value: 'default' - options: - - 'default' - - 'pytest-compare' - - 'pytest-compare-enc-dmx' - - 'pytest-compare-long' - - 'pytest-compare-long-fx-fx' - - 'pytest-compare-to-input' - - 'pytest-saturation-smoke-test' - - 'evs-26444' - - 'sanitizer' - - 'pytest-renderer' - - 'complexity' - - 'coverage' - - 'voip-be-test' - - 'renderer-framesize-be' - - 'peaq-enc-passthrough' - - 'long-term-logs' - - 'backup-long-term-logs' - - 'test-long-self-test' - - 'ivas-conformance-linux' diff --git a/includes/basop/rules-basop.yml b/includes/basop/rules-basop.yml deleted file mode 100644 index 2aba11c..0000000 --- a/includes/basop/rules-basop.yml +++ /dev/null @@ -1,158 +0,0 @@ -# overwrites the default rules -# should be refactored and unified -.rules-basis: - rules: - # see https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines - - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push" - when: never - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - variables: - IVAS_PIPELINE_NAME: 'MR pipeline: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME' - ### disabled for now because pipeline cd is redundant with MR pipeline with current workflow - # - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Pushes to main - # variables: - # IVAS_PIPELINE_NAME: 'Push pipeline: $CI_COMMIT_BRANCH' - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'default' # for testing - variables: - IVAS_PIPELINE_NAME: 'Web run pipeline: $CI_COMMIT_BRANCH' - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare' - variables: - IVAS_PIPELINE_NAME: 'Run comparison tools against float ref: $CI_COMMIT_BRANCH' - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare-enc-dmx' - variables: - IVAS_PIPELINE_NAME: 'Run encoder dmx comparison against float ref: $CI_COMMIT_BRANCH' - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare-long' - variables: - IVAS_PIPELINE_NAME: 'Run comparison tools against float ref (long test vectors): $CI_COMMIT_BRANCH' - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare-to-input' - variables: - IVAS_PIPELINE_NAME: 'Run comparison tools against input (pass-through only): $CI_COMMIT_BRANCH' - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-saturation-smoke-test' - variables: - IVAS_PIPELINE_NAME: 'Run saturation smoke-test: $CI_COMMIT_BRANCH' - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'evs-26444' - variables: - IVAS_PIPELINE_NAME: 'EVS 26.444 test: $CI_COMMIT_BRANCH' - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'sanitizer' - variables: - IVAS_PIPELINE_NAME: 'Short testvectors sanitizers' - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-renderer' - variables: - IVAS_PIPELINE_NAME: 'Renderer test: $CI_COMMIT_BRANCH' - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'complexity' - variables: - IVAS_PIPELINE_NAME: 'Complexity Measurement on $CI_COMMIT_BRANCH' - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'voip-be-test' - variables: - IVAS_PIPELINE_NAME: 'Voip BE test on $CI_COMMIT_BRANCH' - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'peaq-enc-passthrough' - variables: - IVAS_PIPELINE_NAME: 'PEAQ encoder pass-through test: $CI_COMMIT_BRANCH' - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'ivas-conformance' - variables: - IVAS_PIPELINE_NAME: 'IVAS conformance: $CI_COMMIT_BRANCH' - - if: $CI_PIPELINE_SOURCE == 'schedule' # Scheduled in any branch - variables: - IVAS_PIPELINE_NAME: 'Scheduled pipeline: $CI_COMMIT_BRANCH' - -.rules-merge-request: - rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - - when: never - -.rules-merge-request-no-draft: - extends: .rules-basis - rules: - - if: $CI_MERGE_REQUEST_TITLE =~ /^(\[Draft\]|\(Draft\)|Draft:)/ - when: never - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - - when: never - -.rules-merge-request-to-main: - rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - -.rules-merge-request-to-main-no-draft: - rules: - - if: $CI_MERGE_REQUEST_TITLE =~ /^(\[Draft\]|\(Draft\)|Draft:)/ - when: never - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - -.rules-pytest-to-ref-pre: - rules: - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "ivas-conformance-linux" - when: never - - if: $CI_PIPELINE_SOURCE == 'web' - - if: $CI_PIPELINE_SOURCE == 'schedule' - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - when: never - -.rules-pytest-to-ref-short: - rules: - - if: $PYTEST_MLD_SHORT # Set by scheduled pipeline - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare" - - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - -.rules-pytest-to-input-short: - rules: - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-to-input" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - - if: $CI_PIPELINE_SOURCE == 'schedule' - when: never - -.rules-pytest-to-ref-enc-short-dmx: - rules: - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-enc-dmx" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - - if: $CI_PIPELINE_SOURCE == 'schedule' - when: never - -.rules-pytest-long: - rules: - - if: $PYTEST_MLD_LONG # Set by scheduled pipeline - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-long" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - when: never - -.rules-pytest-long-fx-fx: - rules: - - if: $PYTEST_MLD_LONG_FX_FX # Set by scheduled pipeline - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-long-fx-fx" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - when: never - -.rules-coverage: - rules: - - if: $COVERAGE_TEST # Set by scheduled pipeline - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "coverage" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - when: never - -.rules-pytest-saturation-smoke-test: - rules: - - if: $PYTEST_SMOKE_TEST # Set by scheduled pipeline - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-saturation-smoke-test" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - when: never diff --git a/includes/shared/build-jobs.yml b/includes/build-jobs.yml similarity index 100% rename from includes/shared/build-jobs.yml rename to includes/build-jobs.yml diff --git a/includes/shared/complexity-jobs.yml b/includes/complexity-jobs.yml similarity index 100% rename from includes/shared/complexity-jobs.yml rename to includes/complexity-jobs.yml diff --git a/includes/shared/default-variables.yml b/includes/default-variables.yml similarity index 100% rename from includes/shared/default-variables.yml rename to includes/default-variables.yml diff --git a/includes/float/default-variables-float.yml b/includes/float/default-variables-float.yml deleted file mode 100644 index 9baec3b..0000000 --- a/includes/float/default-variables-float.yml +++ /dev/null @@ -1,34 +0,0 @@ -variables: - EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test" - EVS_BE_WIN_TEST_DIR: "C:/Users/gitlab-runner/testvec" - PROCESSING_SCRIPTS_BIN_DIR: "/test-bin" - SANITIZER_TESTS: "CLANG1 CLANG2 CLANG3" - OUT_FORMATS_CHANNEL_BASED: "stereo mono 5_1 5_1_2 5_1_4 7_1 7_1_4" - OUT_FORMATS_SCENE_BASED: "FOA HOA2 HOA3" - OUT_FORMATS_BINAURAL: "BINAURAL BINAURAL_ROOM_IR BINAURAL_ROOM_REVERB" - OUT_FORMATS_ALL: "$OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT" - MANUAL_PIPELINE_TYPE: - description: "Type for the manual pipeline run. Use 'test-be-release' to run BE test against release codec." - value: 'default' - options: - - 'default' - - 'test-be-release' - - 'test-long-self-test' - - 'ivas-conformance' - - 'ivas-conformance-linux' - - 'check-clipping' - - 'test-branch-vs-input-passthrough' - - 'coverage' - - 'complexity' - - PYTEST_ARGS: "" - LONG_TEST_SUITE: "tests/codec_be_on_mr_nonselection tests/renderer --param_file scripts/config/self_test_ltv.prm --use_ltv" - LONG_TEST_SUITE_NO_RENDERER: "tests/codec_be_on_mr_nonselection --param_file scripts/config/self_test_ltv.prm --use_ltv" - SHORT_TEST_SUITE: "tests/codec_be_on_mr_nonselection" - SHORT_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_basop_encoder.prm" - LONG_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_ltv_basop_encoder.prm" - TEST_SUITE: "" - COVERAGE_OUTPUT_FILE_STV: "coverage-stv.info" - COVERAGE_OUTPUT_FILE_LTV: "coverage-ltv.info" - COVERAGE_OUTPUT_FILE_CONFORMANCE: "coverage-conformance.info" - COVERAGE_OUTPUT_FILE_MERGED: "coverage-merged.info" diff --git a/includes/float/rules-float.yml b/includes/float/rules-float.yml deleted file mode 100644 index 6e65278..0000000 --- a/includes/float/rules-float.yml +++ /dev/null @@ -1,42 +0,0 @@ -# templates for rules -.rules-basis: - rules: - - if: $MIRROR_ACCESS_TOKEN # Don't run in the mirror update pipeline (only then MIRROR_ACCESS_TOKEN is defined) - when: never - - if: $CI_PIPELINE_SOURCE == 'schedule' # Don't run in any scheduled pipelines by default (use schedule templates below to enable again for certain conditions) - when: never - - if: $CI_PIPELINE_SOURCE == 'trigger' # Don't run triggered pipeline by default - when: never - - if: $MANUAL_PIPELINE_TYPE == 'test-be-release' # Skip all the normal jobs when testing manually against release codec - when: never - - if: $MANUAL_PIPELINE_TYPE == 'test-long-self-test' # Skip all the normal jobs when testing manually against release codec - when: never - - if: $MANUAL_PIPELINE_TYPE == 'ivas-conformance' - when: never - - if: $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux' - when: never - - if: $MANUAL_PIPELINE_TYPE == 'check-clipping' - when: never - - if: $MANUAL_PIPELINE_TYPE == 'test-branch-vs-input-passthrough' - when: never - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'complexity' - variables: - IVAS_PIPELINE_NAME: 'Complexity Measurement on $CI_COMMIT_BRANCH' - - when: on_success - -.rules-merge-request-to-main: - extends: .rules-basis - rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - -.rules-main-push: - extends: .rules-basis - rules: - - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - -.rules-main-scheduled: - extends: .rules-basis - rules: - - if: $CI_PIPELINE_SOURCE == 'schedule' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH diff --git a/includes/shared/job-templates.yml b/includes/job-templates.yml similarity index 100% rename from includes/shared/job-templates.yml rename to includes/job-templates.yml diff --git a/includes/shared/pre.yml b/includes/pre.yml similarity index 100% rename from includes/shared/pre.yml rename to includes/pre.yml diff --git a/includes/shared/smoke-test.yml b/includes/smoke-test.yml similarity index 100% rename from includes/shared/smoke-test.yml rename to includes/smoke-test.yml diff --git a/main-basop.yml b/main-basop.yml index 83da88b..3bb7782 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -1,12 +1,12 @@ include: - - local: includes/shared/pre.yml - - local: includes/shared/default-variables.yml - - local: includes/shared/job-templates.yml + - local: includes/pre.yml + - local: includes/default-variables.yml + - local: includes/job-templates.yml - local: includes/basop/default-variables-basop.yml - local: includes/basop/rules-basop.yml - - local: includes/shared/complexity-jobs.yml - - local: includes/shared/smoke-test.yml - - local: includes/shared/build-jobs.yml + - local: includes/complexity-jobs.yml + - local: includes/smoke-test.yml + - local: includes/build-jobs.yml default: # by default, we want all jobs to be interruptible, and we need to configure this explicitly @@ -23,6 +23,109 @@ stages: - postvalidate - deploy +variables: + EVS_BE_TEST_DIR_BASOP: "/usr/local/be_2_evs_basop" + FLOAT_REF_BRANCH_MERGE_SOURCE: "" + SCRIPTS_DIR: "/usr/local/scripts" + LONG_TEST_SUITE: "tests/codec_be_on_mr_nonselection tests/renderer --param_file scripts/config/self_test_ltv.prm --use_ltv" + LONG_TEST_SUITE_NO_RENDERER: "tests/codec_be_on_mr_nonselection --param_file scripts/config/self_test_ltv.prm --use_ltv" + SHORT_TEST_SUITE: "tests/codec_be_on_mr_nonselection" + SHORT_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_basop_encoder.prm" + LONG_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_ltv_basop_encoder.prm" + TEST_SUITE: "" + ### These path variables are used by the pytest calls. + ### They can be overwritten in the job definitions in the variables: section to e.g. only test encoder or decoder in the chain + ### E.g. a job that tests the BASOP encoder against the float ref via MLD etc. would overwrite DUT_DECODER_PATH with REF_DECODER_PATH in its variables: section + # "DUT_" - used in merge request pipelines for the branch build (Device Under Test) + DUT_ENCODER_PATH: "./IVAS_cod_dut" + DUT_DECODER_PATH: "./IVAS_dec_dut" + DUT_RENDERER_PATH: "./IVAS_rend_dut" + DUT_POST_RENDERER_PATH: "./ISAR_post_rend_dut" + # "REF_" - used in merge request regression jobs for the floating-point ref (ivas-codec main) + REF_ENCODER_PATH: "./IVAS_cod_ref" + REF_DECODER_PATH: "./IVAS_dec_ref" + REF_RENDERER_PATH: "./IVAS_rend_ref" + REF_POST_RENDERER_PATH: "./ISAR_post_rend_ref" + # "MERGE_TARGET_" - used in merge request jobs to denote the build from the target branch (mostly main) + MERGE_TARGET_ENCODER_PATH: "./IVAS_cod_merge_target" + MERGE_TARGET_DECODER_PATH: "./IVAS_dec_merge_target" + MERGE_TARGET_RENDERER_PATH: "./IVAS_rend_merge_target" + MERGE_TARGET_POST_RENDERER_PATH: "./ISAR_post_rend_merge_target" + # "MERGE_SOURCE_FLOAT_REF_" - used for the respective float reference branch of an MR. Can be main or the respective companion branch in ivas-codec repo + MERGE_SOURCE_FLOAT_REF_ENCODER_PATH: "./IVAS_cod_merge_source_float_ref" + MERGE_SOURCE_FLOAT_REF_DECODER_PATH: "./IVAS_dec_merge_source_float_ref" + MERGE_SOURCE_FLOAT_REF_RENDERER_PATH: "./IVAS_rend_merge_source_float_ref" + MERGE_SOURCE_FLOAT_REF_POST_RENDERER_PATH: "./ISAR_post_rend_merge_source_float_ref" + ### These path variables are used for building the binaries + ### They should never be overwritten! + DUT_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_cod_dut" + DUT_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_dec_dut" + DUT_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_rend_dut" + DUT_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./ISAR_post_rend_dut" + REF_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_cod_ref" + REF_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_dec_ref" + REF_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_rend_ref" + REF_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./ISAR_post_rend_ref" + MERGE_TARGET_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_cod_merge_target" + MERGE_TARGET_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_dec_merge_target" + MERGE_TARGET_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_rend_merge_target" + MERGE_TARGET_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./ISAR_post_rend_merge_target" + MERGE_SOURCE_FLOAT_REF_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_cod_merge_source_float_ref" + MERGE_SOURCE_FLOAT_REF_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_dec_merge_source_float_ref" + MERGE_SOURCE_FLOAT_REF_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_rend_merge_source_float_ref" + MERGE_SOURCE_FLOAT_REF_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./ISAR_post_rend_merge_source_float_ref" + LEVEL_SCALING: "1.0" + PRM_FILES: "scripts/config/self_test.prm scripts/config/self_test_ltv.prm" + TESTCASE_TIMEOUT_STV: 900 + TESTCASE_TIMEOUT_LTV: 2400 + TESTCASE_TIMEOUT_LTV_SANITIZERS: 10800 + CI_REGRESSION_THRESH_MLD: "0.1" + CI_REGRESSION_THRESH_MAX_ABS_DIFF: "50" + CI_REGRESSION_THRESH_SSNR: "-1" + CI_REGRESSION_THRESH_ODG: "-0.05" + BUILD_WITH_DEBUG_MODE_INFO: "" + ENCODER_TEST: "" + DELTA_ODG: "" + COMPARE_DMX: "" + SPLIT_COMPARISON: "" + SKIP_REGRESSION_CHECK: "" + FAILED_TESTCASES_LIST: "failed-testcases.txt" + ERRORS_TESTCASES_LIST: "errors-testcases.txt" + PYTEST_CACHE_ARTIFACT: "pytest_cache.zip" + MEASURES_FOR_REPORT: "MLD MAX_ABS_DIFF MIN_SSNR MIN_ODG" + FLOAT_REF_COMMIT_FILE: "float-ref-git-sha.txt" + CUT_COMMIT_FILE: "CuT-git-sha.txt" + MERGE_TARGET_COMMIT_FILE: "merge-target-git-sha.txt" + MERGE_SOURCE_FLOAT_REF_COMMIT_FILE: "merge-source-float-ref-git-sha.txt" + RUNNER_TAG: "ivas-linux" + LOGS_BACKUP_SOURCE_DIR: "" + LOGS_BACKUP_TARGET_DIR: "" + # set this to true to skip the external HRTF testcases in pytest calls + DISABLE_HRTF: "false" + MANUAL_PIPELINE_TYPE: + description: "Type for the manual pipeline run. Use 'pytest-compare' to run comparison test against reference float codec." + value: 'default' + options: + - 'default' + - 'pytest-compare' + - 'pytest-compare-enc-dmx' + - 'pytest-compare-long' + - 'pytest-compare-long-fx-fx' + - 'pytest-compare-to-input' + - 'pytest-saturation-smoke-test' + - 'evs-26444' + - 'sanitizer' + - 'pytest-renderer' + - 'complexity' + - 'coverage' + - 'voip-be-test' + - 'renderer-framesize-be' + - 'peaq-enc-passthrough' + - 'long-term-logs' + - 'backup-long-term-logs' + - 'test-long-self-test' + - 'ivas-conformance-linux' + # This sets when pipelines are created. Jobs have more specific rules to restrict them. workflow: name: '$IVAS_PIPELINE_NAME' @@ -90,10 +193,171 @@ workflow: IVAS_PIPELINE_NAME: 'Test long self-test against main pipeline: $CI_COMMIT_BRANCH' - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux' variables: - IVAS_PIPELINE_NAME: 'IVAS Conformance Linux: $CI_COMMIT_BRANCH' + IVAS_PIPELINE_NAME: 'IVAS Conformance Linux: $CI_COMMIT_BRANCH' - if: $CI_PIPELINE_SOURCE == 'schedule' # Scheduled in any branch variables: - IVAS_PIPELINE_NAME: 'Scheduled pipeline: $CI_COMMIT_BRANCH' + IVAS_PIPELINE_NAME: 'Scheduled pipeline: $CI_COMMIT_BRANCH' + +# --------------------------------------------------------------- +# Rules templates +# --------------------------------------------------------------- + +.rules-basis: + rules: + # see https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines + - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push" + when: never + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + variables: + IVAS_PIPELINE_NAME: 'MR pipeline: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME' + ### disabled for now because pipeline cd is redundant with MR pipeline with current workflow + # - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Pushes to main + # variables: + # IVAS_PIPELINE_NAME: 'Push pipeline: $CI_COMMIT_BRANCH' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'default' # for testing + variables: + IVAS_PIPELINE_NAME: 'Web run pipeline: $CI_COMMIT_BRANCH' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare' + variables: + IVAS_PIPELINE_NAME: 'Run comparison tools against float ref: $CI_COMMIT_BRANCH' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare-enc-dmx' + variables: + IVAS_PIPELINE_NAME: 'Run encoder dmx comparison against float ref: $CI_COMMIT_BRANCH' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare-long' + variables: + IVAS_PIPELINE_NAME: 'Run comparison tools against float ref (long test vectors): $CI_COMMIT_BRANCH' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare-to-input' + variables: + IVAS_PIPELINE_NAME: 'Run comparison tools against input (pass-through only): $CI_COMMIT_BRANCH' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-saturation-smoke-test' + variables: + IVAS_PIPELINE_NAME: 'Run saturation smoke-test: $CI_COMMIT_BRANCH' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'evs-26444' + variables: + IVAS_PIPELINE_NAME: 'EVS 26.444 test: $CI_COMMIT_BRANCH' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'sanitizer' + variables: + IVAS_PIPELINE_NAME: 'Short testvectors sanitizers' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-renderer' + variables: + IVAS_PIPELINE_NAME: 'Renderer test: $CI_COMMIT_BRANCH' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'complexity' + variables: + IVAS_PIPELINE_NAME: 'Complexity Measurement on $CI_COMMIT_BRANCH' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'voip-be-test' + variables: + IVAS_PIPELINE_NAME: 'Voip BE test on $CI_COMMIT_BRANCH' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'peaq-enc-passthrough' + variables: + IVAS_PIPELINE_NAME: 'PEAQ encoder pass-through test: $CI_COMMIT_BRANCH' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'ivas-conformance' + variables: + IVAS_PIPELINE_NAME: 'IVAS conformance: $CI_COMMIT_BRANCH' + - if: $CI_PIPELINE_SOURCE == 'schedule' # Scheduled in any branch + variables: + IVAS_PIPELINE_NAME: 'Scheduled pipeline: $CI_COMMIT_BRANCH' + +.rules-merge-request: + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - when: never + +.rules-merge-request-no-draft: + extends: .rules-basis + rules: + - if: $CI_MERGE_REQUEST_TITLE =~ /^(\[Draft\]|\(Draft\)|Draft:)/ + when: never + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - when: never + +.rules-merge-request-to-main: + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + +.rules-merge-request-to-main-no-draft: + rules: + - if: $CI_MERGE_REQUEST_TITLE =~ /^(\[Draft\]|\(Draft\)|Draft:)/ + when: never + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + +.rules-pytest-to-ref-pre: + rules: + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "ivas-conformance-linux" + when: never + - if: $CI_PIPELINE_SOURCE == 'web' + - if: $CI_PIPELINE_SOURCE == 'schedule' + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + when: never + +.rules-pytest-to-ref-short: + rules: + - if: $PYTEST_MLD_SHORT # Set by scheduled pipeline + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare" + - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + +.rules-pytest-to-input-short: + rules: + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-to-input" + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - if: $CI_PIPELINE_SOURCE == 'schedule' + when: never + +.rules-pytest-to-ref-enc-short-dmx: + rules: + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-enc-dmx" + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - if: $CI_PIPELINE_SOURCE == 'schedule' + when: never + +.rules-pytest-long: + rules: + - if: $PYTEST_MLD_LONG # Set by scheduled pipeline + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-long" + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + when: never + +.rules-pytest-long-fx-fx: + rules: + - if: $PYTEST_MLD_LONG_FX_FX # Set by scheduled pipeline + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-long-fx-fx" + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + when: never + +.rules-coverage: + rules: + - if: $COVERAGE_TEST # Set by scheduled pipeline + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "coverage" + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + when: never + +.rules-pytest-saturation-smoke-test: + rules: + - if: $PYTEST_SMOKE_TEST # Set by scheduled pipeline + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-saturation-smoke-test" + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + when: never # --------------------------------------------------------------- # Job templates diff --git a/main-float.yml b/main-float.yml index 2fcbfa6..02e6d61 100644 --- a/main-float.yml +++ b/main-float.yml @@ -1,12 +1,12 @@ include: - - local: includes/shared/pre.yml - - local: includes/shared/default-variables.yml + - local: includes/pre.yml + - local: includes/default-variables.yml - local: includes/float/rules-float.yml - - local: includes/shared/job-templates.yml + - local: includes/job-templates.yml - local: includes/float/default-variables-float.yml - - local: includes/shared/complexity-jobs.yml - - local: includes/shared/smoke-test.yml - - local: includes/shared/build-jobs.yml + - local: includes/complexity-jobs.yml + - local: includes/smoke-test.yml + - local: includes/build-jobs.yml default: # by default, we want all jobs to be interruptible, and we need to configure this explicitly @@ -23,6 +23,41 @@ stages: - postvalidate - deploy +variables: + EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test" + EVS_BE_WIN_TEST_DIR: "C:/Users/gitlab-runner/testvec" + PROCESSING_SCRIPTS_BIN_DIR: "/test-bin" + SANITIZER_TESTS: "CLANG1 CLANG2 CLANG3" + OUT_FORMATS_CHANNEL_BASED: "stereo mono 5_1 5_1_2 5_1_4 7_1 7_1_4" + OUT_FORMATS_SCENE_BASED: "FOA HOA2 HOA3" + OUT_FORMATS_BINAURAL: "BINAURAL BINAURAL_ROOM_IR BINAURAL_ROOM_REVERB" + OUT_FORMATS_ALL: "$OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT" + MANUAL_PIPELINE_TYPE: + description: "Type for the manual pipeline run. Use 'test-be-release' to run BE test against release codec." + value: 'default' + options: + - 'default' + - 'test-be-release' + - 'test-long-self-test' + - 'ivas-conformance' + - 'ivas-conformance-linux' + - 'check-clipping' + - 'test-branch-vs-input-passthrough' + - 'coverage' + - 'complexity' + + PYTEST_ARGS: "" + LONG_TEST_SUITE: "tests/codec_be_on_mr_nonselection tests/renderer --param_file scripts/config/self_test_ltv.prm --use_ltv" + LONG_TEST_SUITE_NO_RENDERER: "tests/codec_be_on_mr_nonselection --param_file scripts/config/self_test_ltv.prm --use_ltv" + SHORT_TEST_SUITE: "tests/codec_be_on_mr_nonselection" + SHORT_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_basop_encoder.prm" + LONG_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_ltv_basop_encoder.prm" + TEST_SUITE: "" + COVERAGE_OUTPUT_FILE_STV: "coverage-stv.info" + COVERAGE_OUTPUT_FILE_LTV: "coverage-ltv.info" + COVERAGE_OUTPUT_FILE_CONFORMANCE: "coverage-conformance.info" + COVERAGE_OUTPUT_FILE_MERGED: "coverage-merged.info" + # This sets when pipelines are created. Jobs have more specific rules to restrict them. workflow: name: "$IVAS_PIPELINE_NAME" @@ -69,6 +104,52 @@ workflow: variables: IVAS_PIPELINE_NAME: 'Complexity Measurement on $CI_COMMIT_BRANCH' +# --------------------------------------------------------------- +# Rules templates +# --------------------------------------------------------------- + +.rules-basis: + rules: + - if: $MIRROR_ACCESS_TOKEN # Don't run in the mirror update pipeline (only then MIRROR_ACCESS_TOKEN is defined) + when: never + - if: $CI_PIPELINE_SOURCE == 'schedule' # Don't run in any scheduled pipelines by default (use schedule templates below to enable again for certain conditions) + when: never + - if: $CI_PIPELINE_SOURCE == 'trigger' # Don't run triggered pipeline by default + when: never + - if: $MANUAL_PIPELINE_TYPE == 'test-be-release' # Skip all the normal jobs when testing manually against release codec + when: never + - if: $MANUAL_PIPELINE_TYPE == 'test-long-self-test' # Skip all the normal jobs when testing manually against release codec + when: never + - if: $MANUAL_PIPELINE_TYPE == 'ivas-conformance' + when: never + - if: $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux' + when: never + - if: $MANUAL_PIPELINE_TYPE == 'check-clipping' + when: never + - if: $MANUAL_PIPELINE_TYPE == 'test-branch-vs-input-passthrough' + when: never + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'complexity' + variables: + IVAS_PIPELINE_NAME: 'Complexity Measurement on $CI_COMMIT_BRANCH' + - when: on_success + +.rules-merge-request-to-main: + extends: .rules-basis + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + +.rules-main-push: + extends: .rules-basis + rules: + - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + +.rules-main-scheduled: + extends: .rules-basis + rules: + - if: $CI_PIPELINE_SOURCE == 'schedule' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + # --------------------------------------------------------------- # Generic script anchors # --------------------------------------------------------------- -- GitLab From 58b35958f76032c873d07b5d0fdedf0b7a6ce3a6 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 4 Dec 2025 08:55:54 +0100 Subject: [PATCH 39/42] remove obsolete includes --- main-basop.yml | 2 -- main-float.yml | 2 -- 2 files changed, 4 deletions(-) diff --git a/main-basop.yml b/main-basop.yml index 3bb7782..7b4eda8 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -2,8 +2,6 @@ include: - local: includes/pre.yml - local: includes/default-variables.yml - local: includes/job-templates.yml - - local: includes/basop/default-variables-basop.yml - - local: includes/basop/rules-basop.yml - local: includes/complexity-jobs.yml - local: includes/smoke-test.yml - local: includes/build-jobs.yml diff --git a/main-float.yml b/main-float.yml index 02e6d61..5195bbb 100644 --- a/main-float.yml +++ b/main-float.yml @@ -1,9 +1,7 @@ include: - local: includes/pre.yml - local: includes/default-variables.yml - - local: includes/float/rules-float.yml - local: includes/job-templates.yml - - local: includes/float/default-variables-float.yml - local: includes/complexity-jobs.yml - local: includes/smoke-test.yml - local: includes/build-jobs.yml -- GitLab From c5e0dd0f23d661de88a3933df181cfc42f34f211 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 4 Dec 2025 15:22:06 +0100 Subject: [PATCH 40/42] update readme --- README.md | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 796071e..d17d5eb 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,9 @@ script: ### Testing new CI code 1. Implement your new CI code on a branch in this repo, e.g. `add-awesome-test` and ideally add a merge request for easier review. + +- Note: your job needs to inherit the `before_script:` section from `.test-job-linux` or `.test-job-windows`, respectively. Without that, the job will not clone this repo (i.e. ivas-codec-ci) and the snippets will be missing. If your job does not make use of any snippet, in theory you can do without this, but as a general rule, you should inherit from one of these. If your job uses a before_script: section as well, see [guidelines section below](#some-guidelines-hints). + 2. Test it by opening a branch in the respective ivas-* repository and changing IVAS_CODEC_CI_REF to your WIP branch, so the yaml there should read: ``` yaml @@ -79,6 +82,20 @@ script: 3. If your change affects multiple repos/branches, you might need to use multiple test branches 4. Once you are done and review is complete, merge `add-awesome-test` to `main` here. The test branches in the other repos are not needed and SHOULD NOT BE MERGED. +### Some guidelines/hints + +- if your new job needs to overwrite the before_script: section, one can use this construct to still get the ci repo cloning: + +```yaml +before_script: + - !reference [.test-job-linux, before_script] + - ... +``` + +- use only one include section at the top of the main yml file to keep things clear, remember that later stuff overwrites earlier stuff +- if your script shall modify some environment variable, you need to run it with `source` instead of calling it. +- the merge CI config in the ivas-* repos can be viewed in the pipeline editor under "full configuration" - this is especially useful when making changes which should not functionally affect the CI, then it is helpful to copy the full merged config with and without the changes and compare the files directly or as parsed yaml dict locally. + ### Overwriting CI variables in the ivas-* repos' CI configs Usually, everything should be done in the files here, but if there is the need to still overwrite some configuration/control CI variables - e.g. to switch off something temporarily or in a branch-specific manner - this should be done by in the variables: section at the top of the `.gitlab-ci.yml` file. @@ -105,9 +122,3 @@ Useful configuration variables: - `DISABLE_HRTF` - adds `-k not model` to `PYTEST_ADDOPTS` which skips the testcases with -hrtf in the selftest. Probably more for historic reasons. - `BASOP_CI_SCRIPTS_BRANCH` - used to change the branch from which testscripts are pulled, see [here](https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/wikis/Software-development/Test-Setup-For-BASOP-Code#how-do-i-check-that-my-new-testcase-does-work-for-basop) for more info. - -### Some guidelines/hints - -- use only one include section at the top of the main yml file to keep things clear, remember that later stuff overwrites earlier stuff -- if your script shall modify some environment variable, you need to run it with `source` instead of calling it. -- the merge CI config in the ivas-* repos can be viewed in the pipeline editor under "full configuration" - this is especially useful when making changes which should not functionally affect the CI, then it is helpful to copy the full merged config with and without the changes and compare the files directly or as parsed yaml dict locally. -- GitLab From f76251598e421d129e8403f1e3448e841de7c568 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 4 Dec 2025 15:08:55 +0100 Subject: [PATCH 41/42] fix/cleanup some !reference calls --- main-basop.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/main-basop.yml b/main-basop.yml index 7b4eda8..7b7ce5f 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -381,8 +381,7 @@ workflow: .test-job-linux-needs-testv-dir: extends: .test-job-linux before_script: - - !reference [ .job-linux, before_script ] - - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh + - !reference [ .test-job-linux, before_script ] - if [ ! -d "$TESTV_DIR" ]; then mkdir -p $TESTV_DIR; fi - cp -r scripts/testv/* $TESTV_DIR/ @@ -402,7 +401,7 @@ workflow: IMAGES_ARTIFACT_NAME: "images_$CI_JOB_NAME" IMAGES_ARTIFACT_SPLIT: "images_split_$CI_JOB_NAME" script: - - !reference [ .job-linux, before_script ] + - !reference [ .test-job-linux, before_script ] - set -euxo pipefail - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh @@ -805,7 +804,7 @@ workflow: stage: test needs: ["build-codec-linux-make"] script: - - !reference [ .job-linux, before_script ] + - !reference [ .test-job-linux, before_script ] - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/copy-ltv-files-to-testv-dir.sh @@ -846,7 +845,7 @@ workflow: SUMMARY_HTML_ARTIFACT_NAME: "summary_$CI_JOB_NAME.html" IMAGES_ARTIFACT_NAME: "images_$CI_JOB_NAME" script: - - !reference [ .job-linux, before_script ] + - !reference [ .test-job-linux, before_script ] - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - if [ $USE_LTV -eq 1 ]; then -- GitLab From 854a27a8126b7a4a9018b57c69c8c730ff2259bc Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 4 Dec 2025 16:01:10 +0100 Subject: [PATCH 42/42] fix compare to input job --- main-basop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main-basop.yml b/main-basop.yml index 7b7ce5f..cf54cf2 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -839,7 +839,7 @@ workflow: .ivas-pytest-compare-to-input-anchor: &ivas-pytest-compare-to-input-anchor stage: test - needs: ["build-codec-linux-make"] + needs: ["build-codec-linux-make", "pytest-to-ref-pre"] timeout: "360 minutes" variables: SUMMARY_HTML_ARTIFACT_NAME: "summary_$CI_JOB_NAME.html" -- GitLab