From 8d76d1c32beebe87d004df5538c9c3740c3590f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 21:35:01 +0100 Subject: [PATCH 01/31] Move variables to separate file --- .gitlab-ci.yml | 42 +--------------------------------------- .gitlab-ci/variables.yml | 40 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 41 deletions(-) create mode 100644 .gitlab-ci/variables.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 068dfb0193..704908ea75 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,44 +1,4 @@ -variables: - TESTV_DIR: "/usr/local/testv" - LTV_DIR: "/usr/local/ltv" - BUILD_OUTPUT: "build_output.txt" - EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test" - EVS_BE_WIN_TEST_DIR: "C:/Users/gitlab-runner/testvec" - EXIT_CODE_NON_BE: 123 - EXIT_CODE_FAIL: 1 - PROCESSING_SCRIPTS_BIN_DIR: "/test-bin" - TESTS_DIR_CODEC_BE_ON_MR: "tests/codec_be_on_mr_nonselection" - 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" - IVAS_PIPELINE_NAME: '' - 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' - - GIT_CLEAN_FLAGS: -ffdxq - TESTCASE_TIMEOUT_STV_SANITIZERS: 240 - TESTCASE_TIMEOUT_LTV_SANITIZERS: 2400 - BASOP_REFERENCE_BRANCH: "ivas-float-update" - SCALE_FACTOR: "3.162" - 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: "" - +include: '.gitlab-ci/variables.yml' default: interruptible: true # Make all jobs by default interruptible diff --git a/.gitlab-ci/variables.yml b/.gitlab-ci/variables.yml new file mode 100644 index 0000000000..7c800a3471 --- /dev/null +++ b/.gitlab-ci/variables.yml @@ -0,0 +1,40 @@ +variables: + TESTV_DIR: "/usr/local/testv" + LTV_DIR: "/usr/local/ltv" + BUILD_OUTPUT: "build_output.txt" + EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test" + EVS_BE_WIN_TEST_DIR: "C:/Users/gitlab-runner/testvec" + EXIT_CODE_NON_BE: 123 + EXIT_CODE_FAIL: 1 + PROCESSING_SCRIPTS_BIN_DIR: "/test-bin" + TESTS_DIR_CODEC_BE_ON_MR: "tests/codec_be_on_mr_nonselection" + 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" + IVAS_PIPELINE_NAME: '' + 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' + + GIT_CLEAN_FLAGS: -ffdxq + TESTCASE_TIMEOUT_STV_SANITIZERS: 180 + TESTCASE_TIMEOUT_LTV_SANITIZERS: 2400 + BASOP_REFERENCE_BRANCH: "ivas-float-update" + SCALE_FACTOR: "3.162" + 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: "" -- GitLab From ab66e48b1ad262f8e3833a5da1daffb51d95d116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 21:36:38 +0100 Subject: [PATCH 02/31] Use extends: for sanitizer-selftest-anchor --- .gitlab-ci.yml | 14 +++++++------- .gitlab-ci/snippets/print-common-info.sh | 9 +++++++++ 2 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 .gitlab-ci/snippets/print-common-info.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 704908ea75..d8a1ef35a0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -198,7 +198,7 @@ stages: # 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: &sanitizer-selftest-anchor +.sanitizer-selftest-anchor: script: - *print-common-info - *copy-ltv-files-to-testv-dir @@ -624,6 +624,7 @@ codec-smoke-test: codec-msan: extends: - .sanitizer-selftest-on-mr + - .sanitizer-selftest-anchor tags: - ivas-linux-fast before_script: @@ -631,23 +632,23 @@ codec-msan: - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" - USE_LTV="" - <<: *sanitizer-selftest-anchor # code selftest testvectors with address-sanitizer binaries codec-asan: extends: - .sanitizer-selftest-on-mr + - .sanitizer-selftest-anchor before_script: - CLANG_NUM=2 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" - USE_LTV="" - <<: *sanitizer-selftest-anchor # code selftest testvectors with undefined-behaviour-sanitizer binaries codec-usan: extends: - .sanitizer-selftest-on-mr + - .sanitizer-selftest-anchor tags: - ivas-linux-fast before_script: @@ -655,7 +656,6 @@ codec-usan: - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" - USE_LTV="" - <<: *sanitizer-selftest-anchor # compare bit-exactness between 5ms and 20 on the branch pytest-compare-20ms-and-5ms-rendering: @@ -1774,6 +1774,7 @@ test-branch-vs-input-passthrough: ltv-msan: extends: - .sanitizer-selftest-ltv + - .sanitizer-selftest-anchor rules: - if: $SANITIZER_SCHEDULE_E timeout: 4 hours @@ -1784,12 +1785,12 @@ ltv-msan: - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" - USE_LTV="--use_ltv" - <<: *sanitizer-selftest-anchor # code selftest long testvectors with address-sanitizer binaries ltv-asan: extends: - .sanitizer-selftest-ltv + - .sanitizer-selftest-anchor rules: - if: $SANITIZER_SCHEDULE_E when: delayed @@ -1802,12 +1803,12 @@ ltv-asan: - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" - USE_LTV="--use_ltv" - <<: *sanitizer-selftest-anchor # code selftest long testvectors with undefined-behaviour-sanitizer binaries ltv-usan: extends: - .sanitizer-selftest-ltv + - .sanitizer-selftest-anchor rules: - if: $SANITIZER_SCHEDULE_E when: delayed @@ -1820,7 +1821,6 @@ ltv-usan: - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" - USE_LTV="--use_ltv" - <<: *sanitizer-selftest-anchor .sanitizer-test-template: extends: diff --git a/.gitlab-ci/snippets/print-common-info.sh b/.gitlab-ci/snippets/print-common-info.sh new file mode 100644 index 0000000000..32b29b3985 --- /dev/null +++ b/.gitlab-ci/snippets/print-common-info.sh @@ -0,0 +1,9 @@ +#! /bin/bash + +set -euo pipefail + +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 -n "System time is " +date -- GitLab From 2bb4199134f27276aa9c94641a3560f1c07d6db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 21:39:30 +0100 Subject: [PATCH 03/31] Replace print-common-info with shell script --- .gitlab-ci.yml | 58 ++++++++++++++++++++++---------------------------- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d8a1ef35a0..867cd13d8e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,14 +59,6 @@ stages: # 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: &print-common-info - - | - echo "Printing common information for build job." - echo "Current job is run on commit $CI_COMMIT_SHA" - echo "Commit time was $CI_COMMIT_TIMESTAMP" - date | xargs echo "System time is" - .print-common-info-windows: &print-common-info-windows - | echo "Printing common information for build job." @@ -200,8 +192,8 @@ stages: # set CLANG_NUM, SELFTEST_SANITY_TIMEOUT and SELF_TEST_PRM_FILE in before_script section .sanitizer-selftest-anchor: script: - - *print-common-info - - *copy-ltv-files-to-testv-dir + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash .gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh - make clean - make -j CLANG=$CLANG_NUM - testcase_timeout=$SELFTEST_SANITY_TIMEOUT @@ -518,7 +510,7 @@ build-codec-linux-make: - .build-job-linux - .rules-basis script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *activate-Werror-linux - make -j @@ -527,7 +519,7 @@ build-codec-linux-cmake: - .build-job-linux - .rules-basis script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *activate-Werror-linux - mkdir build - cd build @@ -541,7 +533,7 @@ build-codec-instrumented-linux: - .rules-basis timeout: "10 minutes" script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - ./scripts/prepare_instrumentation.sh - make -j -C scripts/c-code_instrument @@ -551,7 +543,7 @@ build-codec-sanitizers-linux: - .build-job-linux - .rules-basis script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *activate-Werror-linux - bash ci/build_codec_sanitizers_linux.sh @@ -589,7 +581,7 @@ codec-smoke-test: stage: test needs: ["build-codec-linux-cmake", "build-codec-linux-make", "build-codec-instrumented-linux", "build-codec-sanitizers-linux"] script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh # LTV update needed as ltv ISM metadata files are used - *update-ltv-repo @@ -665,7 +657,7 @@ pytest-compare-20ms-and-5ms-rendering: stage: test needs: ["build-codec-linux-cmake", "build-codec-linux-make", "build-codec-instrumented-linux", "build-codec-sanitizers-linux"] script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *disable-limiter - make clean - make -j @@ -812,7 +804,7 @@ renderer-pytest-on-merge-request: timeout: "20 minutes" stage: compare script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *get-commits-behind-count - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -897,7 +889,7 @@ split-rendering-pytest-on-merge-request: timeout: "30 minutes" stage: compare script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *get-commits-behind-count - *check-commits-behind-count-in-compare-jobs @@ -968,7 +960,7 @@ ivas-pytest-on-merge-request: needs: ["build-codec-linux-cmake", "codec-smoke-test"] timeout: "14 minutes" script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *get-commits-behind-count - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -1022,7 +1014,7 @@ ivas-interop-on-merge-request: needs: ["build-codec-linux-cmake"] timeout: "10 minutes" script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *get-commits-behind-count - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -1071,7 +1063,7 @@ evs-pytest-on-merge-request: needs: ["build-codec-linux-cmake", "codec-smoke-test"] timeout: "10 minutes" script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *get-commits-behind-count - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -1123,7 +1115,7 @@ voip-be-on-merge-request: needs: ["build-codec-linux-make"] timeout: "10 minutes" script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - make clean - make -j - python3 -m pytest tests/test_be_for_jbm_neutral_dly_profile.py @@ -1184,7 +1176,7 @@ check-first-frame-is-sid: stage: test needs: ["build-codec-linux-cmake"] script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *update-ltv-repo # this rm makes check-for-testvectors only check for the signals we actually need in this test - rm scripts/config/ci_linux_ltv.json scripts/config/ci_linux.json @@ -1225,7 +1217,7 @@ check-bitexactness-hrtf-rom-and-file: needs: ["build-codec-linux-cmake"] timeout: "5 minutes" script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - cmake . - make -j - python3 tests/create_short_testvectors.py --cut_len 1.0 @@ -1247,7 +1239,7 @@ check-bitexactness-ext-and-transport-format: needs: ["build-codec-linux-cmake"] timeout: "5 minutes" script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - cmake . - make -j - python3 tests/create_short_testvectors.py --cut_len 1.0 @@ -1301,7 +1293,7 @@ be-2-evs-linux: needs: ["build-codec-linux-cmake"] timeout: "20 minutes" # To be revisited script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - mkdir build - cd build @@ -1325,7 +1317,7 @@ codec-comparison-on-main-push: needs: ["build-codec-linux-cmake"] timeout: "30 minutes" # To be revisited script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - latest_commit=$(git rev-parse HEAD) # Latest commit - *get-previous-merge-commit-sha # Stored in previous_merge_commit shell variable now - echo "Comparing changes from $previous_merge_commit to $latest_commit" @@ -1535,7 +1527,7 @@ ivas-conformance-linux: exit_codes: - 123 script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - make -j - cp IVAS_cod IVAS_cod_ref - cp IVAS_dec IVAS_dec_ref @@ -1643,7 +1635,7 @@ test-long-self-test: exit_codes: - 123 script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *update-ltv-repo ### build branch binaries @@ -1712,7 +1704,7 @@ check-clipping: exit_codes: - 123 script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *enable-debugging-macro - make -j - tests/scale_pcm.py ./scripts/testv/ $SCALE_FACTOR # Default: 3.162 (+10 dB). Can be set in manual trigger. @@ -1742,7 +1734,7 @@ test-branch-vs-input-passthrough: exit_codes: - 123 script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - make -j - exit_code=0 @@ -2362,7 +2354,7 @@ coverage-test-on-main-scheduled: - if: $COVERAGE_TEST timeout: 3 hours script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *update-ltv-repo - *copy-ltv-files-to-testv-dir - make GCOV=1 -j @@ -2469,7 +2461,7 @@ coverage-test-on-main-scheduled: timeout: 3 hours 30 minutes stage: test before_script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *update-ltv-repo - *complexity-measurements-setup allow_failure: -- GitLab From b748715d00af0937357b98293a9cd8e776fecbde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 21:45:02 +0100 Subject: [PATCH 04/31] Replace copy-ltv-files-to-testv-dir with shell script --- .gitlab-ci.yml | 13 ++++--------- .gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh | 9 +++++++++ 2 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 .gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 867cd13d8e..11ab57a7eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -170,11 +170,6 @@ stages: .check-commits-behind-count-in-compare-jobs: &check-commits-behind-count-in-compare-jobs - if [ $commits_behind_count -ne 0 ]; then echo "Your branch is not up-to-date with main -> Compare tests will not run as they can contain false negatives this way.\nMain might have changed during your pipeline run. Run 'git merge origin/main' to update."; exit 1; fi -.copy-ltv-files-to-testv-dir: ©-ltv-files-to-testv-dir - - cp "$LTV_DIR"/*.wav scripts/testv/ - - cp "$LTV_DIR"/*.met scripts/testv/ - - cp "$LTV_DIR"/*.csv scripts/testv/ - .copy-ltv-files-to-testv-dir-win: ©-ltv-files-to-testv-dir-win - cp $LTV_DIR_WIN\*.wav scripts\testv - cp $LTV_DIR_WIN\*.met scripts\testv @@ -193,7 +188,7 @@ stages: .sanitizer-selftest-anchor: script: - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - - bash .gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh - make clean - make -j CLANG=$CLANG_NUM - testcase_timeout=$SELFTEST_SANITY_TIMEOUT @@ -431,7 +426,7 @@ branch-is-up-to-date-with-main-post: - python3 scripts/prepare_combined_format_inputs.py - *update-ltv-repo - - *copy-ltv-files-to-testv-dir + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh - *get-basop-float-reference @@ -1664,7 +1659,7 @@ test-long-self-test: ### prepare pytest # Copy test vectors from LTV to TESTV - - *copy-ltv-files-to-testv-dir + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh # create references - exit_code_ref=0 @@ -2356,7 +2351,7 @@ coverage-test-on-main-scheduled: script: - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *update-ltv-repo - - *copy-ltv-files-to-testv-dir + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh - make GCOV=1 -j - cp IVAS_rend IVAS_rend_ref # Copy exec to be able to run renderer script diff --git a/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh b/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh new file mode 100644 index 0000000000..c9190f1abf --- /dev/null +++ b/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh @@ -0,0 +1,9 @@ +#! /bin/bash + +set -euo pipefail + +cd "${CI_PROJECT_DIR}" + +cp "$LTV_DIR"/*.wav scripts/testv/ +cp "$LTV_DIR"/*.met scripts/testv/ +cp "$LTV_DIR"/*.csv scripts/testv/ -- GitLab From da340e5ac643ba864899b1714900adbdf6aff66a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 21:46:52 +0100 Subject: [PATCH 05/31] Remove get-previous-merge-commit-sha anchor --- .gitlab-ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 11ab57a7eb..d6d2c8b189 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,9 +66,6 @@ stages: echo "Commit time was $CI_COMMIT_TIMESTAMP" ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression -.get-previous-merge-commit-sha: &get-previous-merge-commit-sha - - previous_merge_commit=$(git --no-pager log --merges HEAD~1 -n 1 --pretty=format:%H) - .mr-fetch-target-branch: &mr-fetch-target-branch # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching # depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later @@ -1314,7 +1311,7 @@ codec-comparison-on-main-push: script: - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - latest_commit=$(git rev-parse HEAD) # Latest commit - - *get-previous-merge-commit-sha # Stored in previous_merge_commit shell variable now + - previous_merge_commit=$(git --no-pager log --merges HEAD~1 -n 1 --pretty=format:%H) - echo "Comparing changes from $previous_merge_commit to $latest_commit" - git --no-pager diff --stat $previous_merge_commit..$latest_commit -- GitLab From 8480cf9f5324aee9e5e169b96f943a3826263180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 21:58:56 +0100 Subject: [PATCH 06/31] Replace mr-fetch-target-branch with shell script --- .gitlab-ci.yml | 15 ++++----------- .gitlab-ci/snippets/mr-fetch-target-branch.sh | 11 +++++++++++ 2 files changed, 15 insertions(+), 11 deletions(-) create mode 100644 .gitlab-ci/snippets/mr-fetch-target-branch.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d6d2c8b189..6ab59e994a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,13 +66,6 @@ stages: echo "Commit time was $CI_COMMIT_TIMESTAMP" ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression -.mr-fetch-target-branch: &mr-fetch-target-branch - # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching - # depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later - - git branch -D $CI_MERGE_REQUEST_TARGET_BRANCH_NAME || true - # needed when depth is lower than the number of commits in the branch - - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME - .mr-get-target-commit: &mr-get-target-commit # compare to last target branch commit before pipeline was created - target_commit=$(git log $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -1 --oneline --before=${CI_PIPELINE_CREATED_AT} --format=%H) @@ -116,8 +109,8 @@ stages: - source_branch_commit_sha=$(git rev-parse HEAD) ### checkout version to compare against - - *mr-fetch-target-branch - - *mr-get-target-commit + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/mr-fetch-target-branch.sh + - target_commit="$("$CI_PROJECT_DIR"/.gitlab-ci/snippets/mr-get-target-commit.sh)" - git checkout $target_commit - echo "Building reference codec at commit $target_commit" @@ -894,8 +887,8 @@ split-rendering-pytest-on-merge-request: # store the current commit hash - source_branch_commit_sha=$(git rev-parse HEAD) - - *mr-fetch-target-branch - - *mr-get-target-commit + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/mr-fetch-target-branch.sh + - target_commit="$("$CI_PROJECT_DIR"/.gitlab-ci/snippets/mr-get-target-commit.sh)" - git checkout $target_commit - echo "Building reference codec at commit $target_commit" diff --git a/.gitlab-ci/snippets/mr-fetch-target-branch.sh b/.gitlab-ci/snippets/mr-fetch-target-branch.sh new file mode 100644 index 0000000000..57735e2510 --- /dev/null +++ b/.gitlab-ci/snippets/mr-fetch-target-branch.sh @@ -0,0 +1,11 @@ +#! /bin/bash + +set -euo pipefail + +cd "${CI_PROJECT_DIR}" + +# first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching +# depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later +git branch -D "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" || true +# needed when depth is lower than the number of commits in the branch +git fetch origin "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME":"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" -- GitLab From 40516f6c6f7596eb22d85eff685998328bb6971b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 22:38:52 +0100 Subject: [PATCH 07/31] Replace mr-get-target-commit with shell script --- .gitlab-ci.yml | 3 --- .gitlab-ci/snippets/mr-get-target-commit.sh | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .gitlab-ci/snippets/mr-get-target-commit.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ab59e994a..47aecac48b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,9 +66,6 @@ stages: echo "Commit time was $CI_COMMIT_TIMESTAMP" ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression -.mr-get-target-commit: &mr-get-target-commit # compare to last target branch commit before pipeline was created - - target_commit=$(git log $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -1 --oneline --before=${CI_PIPELINE_CREATED_AT} --format=%H) - .check-for-testvectors: &check-for-testvectors # check if the testvector files specified in scripts/config/ci_linux*.json are present - python3 -m pytest ci/test_vectors_available.py diff --git a/.gitlab-ci/snippets/mr-get-target-commit.sh b/.gitlab-ci/snippets/mr-get-target-commit.sh new file mode 100644 index 0000000000..728149f6f7 --- /dev/null +++ b/.gitlab-ci/snippets/mr-get-target-commit.sh @@ -0,0 +1,7 @@ +#! /bin/bash + +set -euo pipefail + +cd "${CI_PROJECT_DIR}" + +exec git log "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" -1 --oneline --before="${CI_PIPELINE_CREATED_AT}" --format="%H" -- GitLab From 7f1281f0043f3fb63eaf19460a066ac85580d267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 22:43:36 +0100 Subject: [PATCH 08/31] Replace check-for-testvectors with shell script --- .gitlab-ci.yml | 5 +---- .gitlab-ci/snippets/check-for-testvectors.sh | 7 +++++++ 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 .gitlab-ci/snippets/check-for-testvectors.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 47aecac48b..4177f7b66b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,9 +66,6 @@ stages: echo "Commit time was $CI_COMMIT_TIMESTAMP" ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression -.check-for-testvectors: &check-for-testvectors # check if the testvector files specified in scripts/config/ci_linux*.json are present - - python3 -m pytest ci/test_vectors_available.py - .disable-debugging-macro: &disable-debugging-macro # automatically disable #DEBUGGING macro in options.h using /**/-comment - sed -i.bak -e "s/^[[:space:]]*\(#define[[:space:]]*DEBUGGING\)/\/\*\1\*\//g" lib_com/options.h @@ -1162,7 +1159,7 @@ check-first-frame-is-sid: - *update-ltv-repo # this rm makes check-for-testvectors only check for the signals we actually need in this test - rm scripts/config/ci_linux_ltv.json scripts/config/ci_linux.json - - *check-for-testvectors + - bash "${CI_PROJECT_DIR}"/.gitlab-ci/snippets/check-for-testvectors.sh - bash ci/run-first-frame-is-sid-test.sh artifacts: diff --git a/.gitlab-ci/snippets/check-for-testvectors.sh b/.gitlab-ci/snippets/check-for-testvectors.sh new file mode 100644 index 0000000000..633c81bbbe --- /dev/null +++ b/.gitlab-ci/snippets/check-for-testvectors.sh @@ -0,0 +1,7 @@ +#! /bin/bash + +set -euo pipefail + +cd "${CI_PROJECT_DIR}" + +exec python3 -m pytest ci/test_vectors_available.py -- GitLab From a6cfd59377a31b487d297d7f94bb915a3e4e9f93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 22:46:08 +0100 Subject: [PATCH 09/31] Replace disable-debugging-macro with shell script --- .gitlab-ci.yml | 8 ++------ .gitlab-ci/snippets/disable-debugging-macro.sh | 8 ++++++++ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 .gitlab-ci/snippets/disable-debugging-macro.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4177f7b66b..662eec04a9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,10 +66,6 @@ stages: echo "Commit time was $CI_COMMIT_TIMESTAMP" ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression -.disable-debugging-macro: &disable-debugging-macro -# automatically disable #DEBUGGING macro in options.h using /**/-comment - - sed -i.bak -e "s/^[[:space:]]*\(#define[[:space:]]*DEBUGGING\)/\/\*\1\*\//g" lib_com/options.h - .enable-debugging-macro: &enable-debugging-macro # automatically enable #DEBUGGING macro in options.h using either /**/-comment or //-comment - sed -i.bak -e "s/\/\*\ *\(#define\ *DEBUGGING\ *\)\*\//\1/g" lib_com/options.h @@ -86,7 +82,7 @@ stages: .merge-request-comparison-setup-codec: &merge-request-comparison-setup-codec ### build test binaries, initial clean for paranoia reasons - - *disable-debugging-macro + - bash "${CI_PROJECT_DIR}"/.gitlab-ci/snippets/disable-debugging-macro.sh - make clean - mkdir build - cd build @@ -109,7 +105,7 @@ stages: - echo "Building reference codec at commit $target_commit" ### build reference binaries - - *disable-debugging-macro + - bash "${CI_PROJECT_DIR}"/.gitlab-ci/snippets/disable-debugging-macro.sh - cd build - cmake .. - make -j diff --git a/.gitlab-ci/snippets/disable-debugging-macro.sh b/.gitlab-ci/snippets/disable-debugging-macro.sh new file mode 100644 index 0000000000..3abbea15fb --- /dev/null +++ b/.gitlab-ci/snippets/disable-debugging-macro.sh @@ -0,0 +1,8 @@ +#! /bin/bash + +set -euo pipefail + +cd "${CI_PROJECT_DIR}" + +# automatically disable #DEBUGGING macro in options.h using /**/-comment +sed -i.bak -e "s/^[[:space:]]*\(#define[[:space:]]*DEBUGGING\)/\/\*\1\*\//g" lib_com/options.h -- GitLab From 942e159b85cec02098416ad94a2984de7df4351a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 22:49:00 +0100 Subject: [PATCH 10/31] Replace enable-debugging-macro with shell script --- .gitlab-ci.yml | 7 +------ .gitlab-ci/snippets/enable-debugging-macro.sh | 9 +++++++++ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 .gitlab-ci/snippets/enable-debugging-macro.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 662eec04a9..b6ef907235 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,11 +66,6 @@ stages: echo "Commit time was $CI_COMMIT_TIMESTAMP" ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression -.enable-debugging-macro: &enable-debugging-macro -# automatically enable #DEBUGGING macro in options.h using either /**/-comment or //-comment - - sed -i.bak -e "s/\/\*\ *\(#define\ *DEBUGGING\ *\)\*\//\1/g" lib_com/options.h - - sed -i.bak -e "s/\/\/\ *\(#define\ *DEBUGGING\ *\)/\1/g" lib_com/options.h - .get-basop-float-reference: &get-basop-float-reference - git clone -b $BASOP_REFERENCE_BRANCH https://forge.3gpp.org/rep/sa4/audio/ivas-basop.git --single-branch --depth 1 ivas-basop - cd ivas-basop @@ -1680,7 +1675,7 @@ check-clipping: - 123 script: - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - - *enable-debugging-macro + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/enable-debugging-macro.sh - make -j - tests/scale_pcm.py ./scripts/testv/ $SCALE_FACTOR # Default: 3.162 (+10 dB). Can be set in manual trigger. - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 --html=report.html --self-contained-html --junit-xml=report-junit.xml --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec diff --git a/.gitlab-ci/snippets/enable-debugging-macro.sh b/.gitlab-ci/snippets/enable-debugging-macro.sh new file mode 100644 index 0000000000..d52401d358 --- /dev/null +++ b/.gitlab-ci/snippets/enable-debugging-macro.sh @@ -0,0 +1,9 @@ +#! /bin/bash + +set -euo pipefail + +cd "${CI_PROJECT_DIR}" + +# automatically enable #DEBUGGING macro in options.h using either /**/-comment or //-comment +sed -i.bak -e "s/\/\*\ *\(#define\ *DEBUGGING\ *\)\*\//\1/g" lib_com/options.h +sed -i.bak -e "s/\/\/\ *\(#define\ *DEBUGGING\ *\)/\1/g" lib_com/options.h -- GitLab From 71763425991c3877f7fe5030b0898815fb6cbcf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 23:25:18 +0100 Subject: [PATCH 11/31] Replace get-commits-behind-count with shell script --- .gitlab-ci.yml | 19 +++++++------------ .../snippets/get-commits-behind-count.sh | 10 ++++++++++ 2 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 .gitlab-ci/snippets/get-commits-behind-count.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b6ef907235..5441d5e4c1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -137,11 +137,6 @@ stages: # automatically enable #define DISABLE_LIMITER in options.h, handling both /**/-comment and //-comment - sed -i.bak -e "s/\/\*[[:space:]]*\(#define[[:space:]]*DISABLE_LIMITER\)[[:space:]]*\*\//\1/g" ./lib_com/options.h -.get-commits-behind-count: &get-commits-behind-count - - echo $CI_COMMIT_SHA - - echo $CI_MERGE_REQUEST_TARGET_BRANCH_NAME - - commits_behind_count=$(git rev-list --count $CI_COMMIT_SHA..origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME) - .check-commits-behind-count-in-compare-jobs: &check-commits-behind-count-in-compare-jobs - if [ $commits_behind_count -ne 0 ]; then echo "Your branch is not up-to-date with main -> Compare tests will not run as they can contain false negatives this way.\nMain might have changed during your pipeline run. Run 'git merge origin/main' to update."; exit 1; fi @@ -354,9 +349,9 @@ branch-is-up-to-date-with-main-pre: tags: - ivas-linux script: - - *get-commits-behind-count - echo $commits_behind_count - if [ $commits_behind_count -eq 0 ]; then exit 0; else echo "Your branch is behind main, run 'git merge origin/main' to update."; exit 1; fi; + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" check-self-test-names-pre: extends: @@ -385,9 +380,9 @@ branch-is-up-to-date-with-main-post: tags: - ivas-linux script: - - *get-commits-behind-count - echo $commits_behind_count - if [ $commits_behind_count -eq 0 ]; then exit 0; else echo "Your branch is behind main, possibly main changed during your pipeline run, run 'git merge origin/main' to update." exit 1; fi; + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" .basop-ci-branch-compat-template: extends: @@ -775,7 +770,7 @@ renderer-pytest-on-merge-request: stage: compare script: - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - - *get-commits-behind-count + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -860,7 +855,7 @@ split-rendering-pytest-on-merge-request: stage: compare script: - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - - *get-commits-behind-count + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs # some helper variables - "|| true" to prevent failures from grep not finding anything @@ -931,7 +926,7 @@ ivas-pytest-on-merge-request: timeout: "14 minutes" script: - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - - *get-commits-behind-count + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -985,7 +980,7 @@ ivas-interop-on-merge-request: timeout: "10 minutes" script: - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - - *get-commits-behind-count + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec # the next line is dependent on ref-using-main flag in the other tests, but here the flag does not make sense @@ -1034,7 +1029,7 @@ evs-pytest-on-merge-request: timeout: "10 minutes" script: - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - - *get-commits-behind-count + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec diff --git a/.gitlab-ci/snippets/get-commits-behind-count.sh b/.gitlab-ci/snippets/get-commits-behind-count.sh new file mode 100644 index 0000000000..93d4cb9a0f --- /dev/null +++ b/.gitlab-ci/snippets/get-commits-behind-count.sh @@ -0,0 +1,10 @@ +#! /bin/bash + +set -euo pipefail + +cd "${CI_PROJECT_DIR}" + +echo "CI_COMMIT_SHA: ${CI_COMMIT_SHA}" 1>&2 +echo "CI_MERGE_REQUEST_TARGET_BRANCH_NAME: ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}" 1>&2 + +git rev-list --count "$CI_COMMIT_SHA"..origin/"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" -- GitLab From 72e66d48665d9841a8cdc7a0cdba8d7a0bdb96c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 23:25:51 +0100 Subject: [PATCH 12/31] Improve branch-is-up-to-date scripts --- .gitlab-ci.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5441d5e4c1..a7cf06df1c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -349,9 +349,13 @@ branch-is-up-to-date-with-main-pre: tags: - ivas-linux script: - - echo $commits_behind_count - - if [ $commits_behind_count -eq 0 ]; then exit 0; else echo "Your branch is behind main, run 'git merge origin/main' to update."; exit 1; fi; - - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + - | + commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + echo "Commits behind: $commits_behind_count" + if [ "$commits_behind_count" -nq 0 ]; then + echo "Your branch is behind main, run 'git merge origin/main' to update." + exit 1 + fi check-self-test-names-pre: extends: @@ -380,9 +384,13 @@ branch-is-up-to-date-with-main-post: tags: - ivas-linux script: - - echo $commits_behind_count - - if [ $commits_behind_count -eq 0 ]; then exit 0; else echo "Your branch is behind main, possibly main changed during your pipeline run, run 'git merge origin/main' to update." exit 1; fi; - - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + - | + commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + echo "Commits behind: $commits_behind_count" + if [ "$commits_behind_count" -nq 0 ]; then + echo "Your branch is behind main, possibly main changed during your pipeline run, run 'git merge origin/main' to update." + exit 1 + fi .basop-ci-branch-compat-template: extends: -- GitLab From c7c47de65cb91669a889aada3e9383f0dcf95b23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 7 Mar 2025 17:07:50 +0100 Subject: [PATCH 13/31] Include CI code from ivas-codec-ci repository --- .gitlab-ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7cf06df1c..18cc641812 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,11 @@ -include: '.gitlab-ci/variables.yml' - -default: - interruptible: true # Make all jobs by default interruptible +variables: + IVAS_CODEC_CI_REF: &IVAS_CODEC_CI_REF mullerfa/ci-refactor + +include: + - local: .gitlab-ci/variables.yml + - project: ivas-codec-pc/ivas-codec-ci + ref: *IVAS_CODEC_CI_REF + file: main.yml # This sets when pipelines are created. Jobs have more specific rules to restrict them. workflow: -- GitLab From d4fb6190f25e7c605b8e24cc6396f84cd936826a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 7 Mar 2025 17:08:04 +0100 Subject: [PATCH 14/31] Remove redundant stages --- .gitlab-ci.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 18cc641812..f4a3139f4a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,16 +47,6 @@ workflow: variables: IVAS_PIPELINE_NAME: 'Pass-through comparison vs input: $CI_COMMIT_BRANCH' -stages: - - .pre - - maintenance - - prevalidate - - build - - test - - compare - - postvalidate - - deploy - # --------------------------------------------------------------- # Generic script anchors # --------------------------------------------------------------- -- GitLab From 18592da420c89b9d5b6536d43dae55243f3f6fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 7 Mar 2025 17:08:26 +0100 Subject: [PATCH 15/31] Move rules and job templates to ivas-codec-ci --- .gitlab-ci.yml | 134 --------------------------------------- .gitlab-ci/variables.yml | 12 ---- 2 files changed, 146 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f4a3139f4a..ac0e756066 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -175,140 +175,6 @@ workflow: - if [ $exit_code20 -ne 0 ] || [ $exit_code10 -ne 0 ] || [ $exit_code5 -ne 0 ]; then exit 1; fi -# --------------------------------------------------------------- -# Job templates -# --------------------------------------------------------------- - -# When designing templates, try not to use too much inheritance and -# if multiple templates and extended on, remember that on conflict, -# latest overwrites the parameter. - -# 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 - - 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-merge-request-to-basop-ci-branch: - extends: .rules-basis - rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "basop-ci-branch" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - -.rules-merge-request-to-basop-ci-branch-or-main: - extends: .rules-basis - rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "basop-ci-branch" || $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 - -# templates to define stages and platforms -.test-job-linux: - tags: - - ivas-linux - -.build-job-linux: - stage: build - timeout: "4 minutes" - needs: [] - tags: - - ivas-linux - -.build-job-windows: - stage: build - needs: [] - timeout: "4 minutes" - tags: - - ivas-windows - -# template for test jobs on linux that need the TESTV_DIR -.test-job-linux-needs-testv-dir: - extends: .test-job-linux - before_script: - - if [ ! -d "$TESTV_DIR" ]; then mkdir -p $TESTV_DIR; fi - - python3 scripts/prepare_combined_format_inputs.py - - cp -r scripts/testv/* $TESTV_DIR/ - -.sanitizer-selftest-on-mr: - stage: test - extends: - - .test-job-linux-needs-testv-dir - - .rules-merge-request-to-main - artifacts: - name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" - expire_in: 1 week - when: always - paths: - - report-junit-20ms.xml - - report-junit-10ms.xml - - report-junit-5ms.xml - - report-20ms.html - - report-10ms.html - - report-5ms.html - expose_as: "Sanitizer selftest results" - reports: - junit: - - report-junit-20ms.xml - - report-junit-10ms.xml - - report-junit-5ms.xml - -.sanitizer-selftest-ltv: - stage: test - extends: - - .test-job-linux-needs-testv-dir - artifacts: - name: "$CI_JOB_NAME--sha-$CI_COMMIT_SHORT_SHA--results" - expire_in: 2 week - when: always - paths: - - report-junit-20ms.xml - - report-junit-10ms.xml - - report-junit-5ms.xml - - report-20ms.html - - report-10ms.html - - report-5ms.html - expose_as: "Sanitizer selftest results" - reports: - junit: - - report-junit-20ms.xml - - report-junit-10ms.xml - - report-junit-5ms.xml - # --------------------------------------------------------------- # .pre jobs for setting up things # --------------------------------------------------------------- diff --git a/.gitlab-ci/variables.yml b/.gitlab-ci/variables.yml index 7c800a3471..50f6f405c0 100644 --- a/.gitlab-ci/variables.yml +++ b/.gitlab-ci/variables.yml @@ -1,19 +1,12 @@ variables: - TESTV_DIR: "/usr/local/testv" - LTV_DIR: "/usr/local/ltv" - BUILD_OUTPUT: "build_output.txt" EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test" EVS_BE_WIN_TEST_DIR: "C:/Users/gitlab-runner/testvec" - EXIT_CODE_NON_BE: 123 - EXIT_CODE_FAIL: 1 PROCESSING_SCRIPTS_BIN_DIR: "/test-bin" - TESTS_DIR_CODEC_BE_ON_MR: "tests/codec_be_on_mr_nonselection" 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" - IVAS_PIPELINE_NAME: '' MANUAL_PIPELINE_TYPE: description: "Type for the manual pipeline run. Use 'test-be-release' to run BE test against release codec." value: 'default' @@ -26,11 +19,6 @@ variables: - 'check-clipping' - 'test-branch-vs-input-passthrough' - GIT_CLEAN_FLAGS: -ffdxq - TESTCASE_TIMEOUT_STV_SANITIZERS: 180 - TESTCASE_TIMEOUT_LTV_SANITIZERS: 2400 - BASOP_REFERENCE_BRANCH: "ivas-float-update" - SCALE_FACTOR: "3.162" 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" -- GitLab From 4b951083c48b8447d7e20ca361dc2f98696f336f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 7 Mar 2025 17:21:57 +0100 Subject: [PATCH 16/31] Move scripts over to ivas-codec-ci --- .gitlab-ci.yml | 72 +++++++++---------- .gitlab-ci/snippets/check-for-testvectors.sh | 7 -- .../snippets/copy-ltv-files-to-testv-dir.sh | 9 --- .../snippets/disable-debugging-macro.sh | 8 --- .gitlab-ci/snippets/enable-debugging-macro.sh | 9 --- .../snippets/get-commits-behind-count.sh | 10 --- .gitlab-ci/snippets/mr-fetch-target-branch.sh | 11 --- .gitlab-ci/snippets/mr-get-target-commit.sh | 7 -- .gitlab-ci/snippets/print-common-info.sh | 9 --- 9 files changed, 36 insertions(+), 106 deletions(-) delete mode 100644 .gitlab-ci/snippets/check-for-testvectors.sh delete mode 100644 .gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh delete mode 100644 .gitlab-ci/snippets/disable-debugging-macro.sh delete mode 100644 .gitlab-ci/snippets/enable-debugging-macro.sh delete mode 100644 .gitlab-ci/snippets/get-commits-behind-count.sh delete mode 100644 .gitlab-ci/snippets/mr-fetch-target-branch.sh delete mode 100644 .gitlab-ci/snippets/mr-get-target-commit.sh delete mode 100644 .gitlab-ci/snippets/print-common-info.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ac0e756066..e0dc100b19 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -71,7 +71,7 @@ workflow: .merge-request-comparison-setup-codec: &merge-request-comparison-setup-codec ### build test binaries, initial clean for paranoia reasons - - bash "${CI_PROJECT_DIR}"/.gitlab-ci/snippets/disable-debugging-macro.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/disable-debugging-macro.sh - make clean - mkdir build - cd build @@ -88,13 +88,13 @@ workflow: - source_branch_commit_sha=$(git rev-parse HEAD) ### checkout version to compare against - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/mr-fetch-target-branch.sh - - target_commit="$("$CI_PROJECT_DIR"/.gitlab-ci/snippets/mr-get-target-commit.sh)" + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/mr-fetch-target-branch.sh + - target_commit="$("${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/mr-get-target-commit.sh)" - git checkout $target_commit - echo "Building reference codec at commit $target_commit" ### build reference binaries - - bash "${CI_PROJECT_DIR}"/.gitlab-ci/snippets/disable-debugging-macro.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/disable-debugging-macro.sh - cd build - cmake .. - make -j @@ -151,8 +151,8 @@ workflow: # set CLANG_NUM, SELFTEST_SANITY_TIMEOUT and SELF_TEST_PRM_FILE in before_script section .sanitizer-selftest-anchor: script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh + - 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 - make clean - make -j CLANG=$CLANG_NUM - testcase_timeout=$SELFTEST_SANITY_TIMEOUT @@ -264,7 +264,7 @@ branch-is-up-to-date-with-main-post: - python3 scripts/prepare_combined_format_inputs.py - *update-ltv-repo - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/copy-ltv-files-to-testv-dir.sh - *get-basop-float-reference @@ -343,7 +343,7 @@ build-codec-linux-make: - .build-job-linux - .rules-basis script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *activate-Werror-linux - make -j @@ -352,7 +352,7 @@ build-codec-linux-cmake: - .build-job-linux - .rules-basis script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *activate-Werror-linux - mkdir build - cd build @@ -366,7 +366,7 @@ build-codec-instrumented-linux: - .rules-basis timeout: "10 minutes" script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - ./scripts/prepare_instrumentation.sh - make -j -C scripts/c-code_instrument @@ -376,7 +376,7 @@ build-codec-sanitizers-linux: - .build-job-linux - .rules-basis script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *activate-Werror-linux - bash ci/build_codec_sanitizers_linux.sh @@ -414,7 +414,7 @@ codec-smoke-test: stage: test needs: ["build-codec-linux-cmake", "build-codec-linux-make", "build-codec-instrumented-linux", "build-codec-sanitizers-linux"] script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh # LTV update needed as ltv ISM metadata files are used - *update-ltv-repo @@ -490,7 +490,7 @@ pytest-compare-20ms-and-5ms-rendering: stage: test needs: ["build-codec-linux-cmake", "build-codec-linux-make", "build-codec-instrumented-linux", "build-codec-sanitizers-linux"] script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *disable-limiter - make clean - make -j @@ -637,7 +637,7 @@ renderer-pytest-on-merge-request: timeout: "20 minutes" stage: compare script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -722,7 +722,7 @@ split-rendering-pytest-on-merge-request: timeout: "30 minutes" stage: compare script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs @@ -735,8 +735,8 @@ split-rendering-pytest-on-merge-request: # store the current commit hash - source_branch_commit_sha=$(git rev-parse HEAD) - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/mr-fetch-target-branch.sh - - target_commit="$("$CI_PROJECT_DIR"/.gitlab-ci/snippets/mr-get-target-commit.sh)" + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/mr-fetch-target-branch.sh + - target_commit="$("${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/mr-get-target-commit.sh)" - git checkout $target_commit - echo "Building reference codec at commit $target_commit" @@ -793,7 +793,7 @@ ivas-pytest-on-merge-request: needs: ["build-codec-linux-cmake", "codec-smoke-test"] timeout: "14 minutes" script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -847,7 +847,7 @@ ivas-interop-on-merge-request: needs: ["build-codec-linux-cmake"] timeout: "10 minutes" script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -896,7 +896,7 @@ evs-pytest-on-merge-request: needs: ["build-codec-linux-cmake", "codec-smoke-test"] timeout: "10 minutes" script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -948,7 +948,7 @@ voip-be-on-merge-request: needs: ["build-codec-linux-make"] timeout: "10 minutes" script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - make clean - make -j - python3 -m pytest tests/test_be_for_jbm_neutral_dly_profile.py @@ -1009,11 +1009,11 @@ check-first-frame-is-sid: stage: test needs: ["build-codec-linux-cmake"] script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *update-ltv-repo # this rm makes check-for-testvectors only check for the signals we actually need in this test - rm scripts/config/ci_linux_ltv.json scripts/config/ci_linux.json - - bash "${CI_PROJECT_DIR}"/.gitlab-ci/snippets/check-for-testvectors.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/check-for-testvectors.sh - bash ci/run-first-frame-is-sid-test.sh artifacts: @@ -1050,7 +1050,7 @@ check-bitexactness-hrtf-rom-and-file: needs: ["build-codec-linux-cmake"] timeout: "5 minutes" script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - cmake . - make -j - python3 tests/create_short_testvectors.py --cut_len 1.0 @@ -1072,7 +1072,7 @@ check-bitexactness-ext-and-transport-format: needs: ["build-codec-linux-cmake"] timeout: "5 minutes" script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - cmake . - make -j - python3 tests/create_short_testvectors.py --cut_len 1.0 @@ -1126,7 +1126,7 @@ be-2-evs-linux: needs: ["build-codec-linux-cmake"] timeout: "20 minutes" # To be revisited script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - mkdir build - cd build @@ -1150,7 +1150,7 @@ codec-comparison-on-main-push: needs: ["build-codec-linux-cmake"] timeout: "30 minutes" # To be revisited script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - latest_commit=$(git rev-parse HEAD) # Latest commit - previous_merge_commit=$(git --no-pager log --merges HEAD~1 -n 1 --pretty=format:%H) - echo "Comparing changes from $previous_merge_commit to $latest_commit" @@ -1360,7 +1360,7 @@ ivas-conformance-linux: exit_codes: - 123 script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - make -j - cp IVAS_cod IVAS_cod_ref - cp IVAS_dec IVAS_dec_ref @@ -1468,7 +1468,7 @@ test-long-self-test: exit_codes: - 123 script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *update-ltv-repo ### build branch binaries @@ -1497,7 +1497,7 @@ test-long-self-test: ### prepare pytest # Copy test vectors from LTV to TESTV - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/copy-ltv-files-to-testv-dir.sh # create references - exit_code_ref=0 @@ -1537,8 +1537,8 @@ check-clipping: exit_codes: - 123 script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/enable-debugging-macro.sh + - 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 - tests/scale_pcm.py ./scripts/testv/ $SCALE_FACTOR # Default: 3.162 (+10 dB). Can be set in manual trigger. - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 --html=report.html --self-contained-html --junit-xml=report-junit.xml --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec @@ -1567,7 +1567,7 @@ test-branch-vs-input-passthrough: exit_codes: - 123 script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - make -j - exit_code=0 @@ -2187,9 +2187,9 @@ coverage-test-on-main-scheduled: - if: $COVERAGE_TEST timeout: 3 hours script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *update-ltv-repo - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/copy-ltv-files-to-testv-dir.sh - make GCOV=1 -j - cp IVAS_rend IVAS_rend_ref # Copy exec to be able to run renderer script @@ -2294,7 +2294,7 @@ coverage-test-on-main-scheduled: timeout: 3 hours 30 minutes stage: test before_script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *update-ltv-repo - *complexity-measurements-setup allow_failure: diff --git a/.gitlab-ci/snippets/check-for-testvectors.sh b/.gitlab-ci/snippets/check-for-testvectors.sh deleted file mode 100644 index 633c81bbbe..0000000000 --- a/.gitlab-ci/snippets/check-for-testvectors.sh +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/bash - -set -euo pipefail - -cd "${CI_PROJECT_DIR}" - -exec python3 -m pytest ci/test_vectors_available.py diff --git a/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh b/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh deleted file mode 100644 index c9190f1abf..0000000000 --- a/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/bash - -set -euo pipefail - -cd "${CI_PROJECT_DIR}" - -cp "$LTV_DIR"/*.wav scripts/testv/ -cp "$LTV_DIR"/*.met scripts/testv/ -cp "$LTV_DIR"/*.csv scripts/testv/ diff --git a/.gitlab-ci/snippets/disable-debugging-macro.sh b/.gitlab-ci/snippets/disable-debugging-macro.sh deleted file mode 100644 index 3abbea15fb..0000000000 --- a/.gitlab-ci/snippets/disable-debugging-macro.sh +++ /dev/null @@ -1,8 +0,0 @@ -#! /bin/bash - -set -euo pipefail - -cd "${CI_PROJECT_DIR}" - -# automatically disable #DEBUGGING macro in options.h using /**/-comment -sed -i.bak -e "s/^[[:space:]]*\(#define[[:space:]]*DEBUGGING\)/\/\*\1\*\//g" lib_com/options.h diff --git a/.gitlab-ci/snippets/enable-debugging-macro.sh b/.gitlab-ci/snippets/enable-debugging-macro.sh deleted file mode 100644 index d52401d358..0000000000 --- a/.gitlab-ci/snippets/enable-debugging-macro.sh +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/bash - -set -euo pipefail - -cd "${CI_PROJECT_DIR}" - -# automatically enable #DEBUGGING macro in options.h using either /**/-comment or //-comment -sed -i.bak -e "s/\/\*\ *\(#define\ *DEBUGGING\ *\)\*\//\1/g" lib_com/options.h -sed -i.bak -e "s/\/\/\ *\(#define\ *DEBUGGING\ *\)/\1/g" lib_com/options.h diff --git a/.gitlab-ci/snippets/get-commits-behind-count.sh b/.gitlab-ci/snippets/get-commits-behind-count.sh deleted file mode 100644 index 93d4cb9a0f..0000000000 --- a/.gitlab-ci/snippets/get-commits-behind-count.sh +++ /dev/null @@ -1,10 +0,0 @@ -#! /bin/bash - -set -euo pipefail - -cd "${CI_PROJECT_DIR}" - -echo "CI_COMMIT_SHA: ${CI_COMMIT_SHA}" 1>&2 -echo "CI_MERGE_REQUEST_TARGET_BRANCH_NAME: ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}" 1>&2 - -git rev-list --count "$CI_COMMIT_SHA"..origin/"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" diff --git a/.gitlab-ci/snippets/mr-fetch-target-branch.sh b/.gitlab-ci/snippets/mr-fetch-target-branch.sh deleted file mode 100644 index 57735e2510..0000000000 --- a/.gitlab-ci/snippets/mr-fetch-target-branch.sh +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/bash - -set -euo pipefail - -cd "${CI_PROJECT_DIR}" - -# first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching -# depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later -git branch -D "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" || true -# needed when depth is lower than the number of commits in the branch -git fetch origin "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME":"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" diff --git a/.gitlab-ci/snippets/mr-get-target-commit.sh b/.gitlab-ci/snippets/mr-get-target-commit.sh deleted file mode 100644 index 728149f6f7..0000000000 --- a/.gitlab-ci/snippets/mr-get-target-commit.sh +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/bash - -set -euo pipefail - -cd "${CI_PROJECT_DIR}" - -exec git log "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" -1 --oneline --before="${CI_PIPELINE_CREATED_AT}" --format="%H" diff --git a/.gitlab-ci/snippets/print-common-info.sh b/.gitlab-ci/snippets/print-common-info.sh deleted file mode 100644 index 32b29b3985..0000000000 --- a/.gitlab-ci/snippets/print-common-info.sh +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/bash - -set -euo pipefail - -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 -n "System time is " -date -- GitLab From 70e359720df550bf7f63c4613e4855432c105e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 10:18:58 +0100 Subject: [PATCH 17/31] Document YAML anchor --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e0dc100b19..ad5865edd7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,5 @@ variables: + # note: GitLab cannot reference the variable in the include ref:, we need to use a YAML anchor for this IVAS_CODEC_CI_REF: &IVAS_CODEC_CI_REF mullerfa/ci-refactor include: -- GitLab From 74efe169413dcbb95e97b664fac9174911e6519f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 10:25:21 +0100 Subject: [PATCH 18/31] Fix branch-is-up-to-date-with-main-pre --- .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ad5865edd7..cc3f529ca9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -205,10 +205,9 @@ uninterruptible: branch-is-up-to-date-with-main-pre: extends: - .rules-merge-request-to-main + - .job-linux stage: prevalidate needs: [] - tags: - - ivas-linux script: - | commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" -- GitLab From 2ee156ae3319de79309f4bcab2bb337bd865630b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 10:34:16 +0100 Subject: [PATCH 19/31] Use .job-linux template where applicable --- .gitlab-ci.yml | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cc3f529ca9..c0bba38291 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -220,29 +220,26 @@ branch-is-up-to-date-with-main-pre: check-self-test-names-pre: extends: - .rules-merge-request-to-main + - .job-linux stage: prevalidate needs: [] - tags: - - ivas-linux script: - python3 ci/check_self_test_names.py scripts/config/self_test.prm 135 check-no-duplicates-in-self-tests: extends: - .rules-merge-request-to-main + - .job-linux stage: prevalidate needs: [] - tags: - - ivas-linux script: - python3 ci/find_duplicates_in_prm_files.py branch-is-up-to-date-with-main-post: extends: - .rules-merge-request-to-main + - .job-linux stage: postvalidate - tags: - - ivas-linux script: - | commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" @@ -1350,8 +1347,8 @@ ivas-conformance: junit: report-junit.xml ivas-conformance-linux: - tags: - - ivas-linux + extends: + - .job-linux stage: test timeout: "90 minutes" rules: @@ -1457,8 +1454,8 @@ ivas-conformance-linux: test-long-self-test: - tags: - - ivas-linux-fast + extends: + - .job-linux stage: compare resource_group: ivas-long-self-test-resource timeout: "50 minutes" @@ -1527,8 +1524,8 @@ test-long-self-test: - report-junit-ltv.xml check-clipping: - tags: - - ivas-linux + extends: + - .job-linux stage: test timeout: "30 minutes" rules: @@ -1557,8 +1554,8 @@ check-clipping: - report-junit.xml test-branch-vs-input-passthrough: - tags: - - ivas-linux + extends: + - .job-linux stage: compare timeout: "30 minutes" # TBD rules: @@ -2612,8 +2609,8 @@ complexity-osba-in-binaural_room_ir-out: # job that sets up gitlab pages website pages: stage: deploy - tags: - - ivas-linux + extends: + - .job-linux rules: - if: $UPDATE_PAGES script: -- GitLab From 69f39a89cb41e3744e685e18c74c6c6803c2d8e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 10:34:32 +0100 Subject: [PATCH 20/31] Remove superfluous tag --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c0bba38291..58b9415821 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1001,8 +1001,6 @@ check-first-frame-is-sid: extends: - .test-job-linux-needs-testv-dir - .rules-merge-request-to-main - tags: - - ivas-linux stage: test needs: ["build-codec-linux-cmake"] script: -- GitLab From 9bf0d87d3e02326364cfc724eb56cb592bf7d686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 10:38:59 +0100 Subject: [PATCH 21/31] Include existing before_script snippets --- .gitlab-ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 58b9415821..c7d0f0cfcf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -256,6 +256,7 @@ branch-is-up-to-date-with-main-post: tags: - ivas-linux before_script: + - !reference [.test-job-linux, before_script] - python3 ci/remove_unsupported_testcases.py scripts/config/self_test.prm scripts/config/self_test_ltv.prm - python3 tests/create_short_testvectors.py - python3 scripts/prepare_combined_format_inputs.py @@ -450,6 +451,7 @@ codec-msan: tags: - ivas-linux-fast before_script: + - !reference [.sanitizer-selftest-on-mr, before_script] - CLANG_NUM=1 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" @@ -461,6 +463,7 @@ codec-asan: - .sanitizer-selftest-on-mr - .sanitizer-selftest-anchor before_script: + - !reference [.sanitizer-selftest-on-mr, before_script] - CLANG_NUM=2 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" @@ -474,6 +477,7 @@ codec-usan: tags: - ivas-linux-fast before_script: + - !reference [.sanitizer-selftest-on-mr, before_script] - CLANG_NUM=3 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" @@ -1601,6 +1605,7 @@ ltv-msan: tags: - ivas-linux-fast before_script: + - !reference [.sanitizer-selftest-ltv, before_script] - CLANG_NUM=1 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" @@ -1619,6 +1624,7 @@ ltv-asan: - ivas-linux-fast timeout: 4 hours before_script: + - !reference [.sanitizer-selftest-ltv, before_script] - CLANG_NUM=2 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" @@ -1637,6 +1643,7 @@ ltv-usan: - ivas-linux-fast timeout: 4 hours before_script: + - !reference [.sanitizer-selftest-ltv, before_script] - CLANG_NUM=3 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" @@ -2289,6 +2296,7 @@ coverage-test-on-main-scheduled: timeout: 3 hours 30 minutes stage: test before_script: + - !reference [.test-job-linux-needs-testv-dir, before_script] - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *update-ltv-repo - *complexity-measurements-setup -- GitLab From c967767198127fc2723c895368728bf32898fc93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 10:44:56 +0100 Subject: [PATCH 22/31] Use direct references --- .gitlab-ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c7d0f0cfcf..6f02545402 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -256,7 +256,7 @@ branch-is-up-to-date-with-main-post: tags: - ivas-linux before_script: - - !reference [.test-job-linux, before_script] + - !reference [.job-linux, before_script] - python3 ci/remove_unsupported_testcases.py scripts/config/self_test.prm scripts/config/self_test_ltv.prm - python3 tests/create_short_testvectors.py - python3 scripts/prepare_combined_format_inputs.py @@ -451,7 +451,7 @@ codec-msan: tags: - ivas-linux-fast before_script: - - !reference [.sanitizer-selftest-on-mr, before_script] + - !reference [.job-linux, before_script] - CLANG_NUM=1 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" @@ -463,7 +463,7 @@ codec-asan: - .sanitizer-selftest-on-mr - .sanitizer-selftest-anchor before_script: - - !reference [.sanitizer-selftest-on-mr, before_script] + - !reference [.job-linux, before_script] - CLANG_NUM=2 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" @@ -477,7 +477,7 @@ codec-usan: tags: - ivas-linux-fast before_script: - - !reference [.sanitizer-selftest-on-mr, before_script] + - !reference [.job-linux, before_script] - CLANG_NUM=3 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" @@ -1605,7 +1605,7 @@ ltv-msan: tags: - ivas-linux-fast before_script: - - !reference [.sanitizer-selftest-ltv, before_script] + - !reference [.job-linux, before_script] - CLANG_NUM=1 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" @@ -1624,7 +1624,7 @@ ltv-asan: - ivas-linux-fast timeout: 4 hours before_script: - - !reference [.sanitizer-selftest-ltv, before_script] + - !reference [.job-linux, before_script] - CLANG_NUM=2 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" @@ -1643,7 +1643,7 @@ ltv-usan: - ivas-linux-fast timeout: 4 hours before_script: - - !reference [.sanitizer-selftest-ltv, before_script] + - !reference [.job-linux, before_script] - CLANG_NUM=3 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" @@ -2296,7 +2296,7 @@ coverage-test-on-main-scheduled: timeout: 3 hours 30 minutes stage: test before_script: - - !reference [.test-job-linux-needs-testv-dir, before_script] + - !reference [.job-linux, before_script] - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *update-ltv-repo - *complexity-measurements-setup -- GitLab From 7bd8eab0b0c22e9aaf46b35b82ff4ff5b908ea38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 10:49:07 +0100 Subject: [PATCH 23/31] Trigger build -- GitLab From c94a2bdc8c298a0897833009d528e7c1013199ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 10:50:52 +0100 Subject: [PATCH 24/31] Fix pre/post branch update --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6f02545402..5ef2a30913 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -210,7 +210,7 @@ branch-is-up-to-date-with-main-pre: needs: [] script: - | - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" echo "Commits behind: $commits_behind_count" if [ "$commits_behind_count" -nq 0 ]; then echo "Your branch is behind main, run 'git merge origin/main' to update." @@ -242,7 +242,7 @@ branch-is-up-to-date-with-main-post: stage: postvalidate script: - | - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" echo "Commits behind: $commits_behind_count" if [ "$commits_behind_count" -nq 0 ]; then echo "Your branch is behind main, possibly main changed during your pipeline run, run 'git merge origin/main' to update." -- GitLab From 49e0f9c8d121f0fe0694e77cbbcdb07039a13471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 10:54:24 +0100 Subject: [PATCH 25/31] Fix numeric comparison --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5ef2a30913..86a45aefe6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -212,7 +212,7 @@ branch-is-up-to-date-with-main-pre: - | commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" echo "Commits behind: $commits_behind_count" - if [ "$commits_behind_count" -nq 0 ]; then + if [ "$commits_behind_count" -ne 0 ]; then echo "Your branch is behind main, run 'git merge origin/main' to update." exit 1 fi @@ -244,7 +244,7 @@ branch-is-up-to-date-with-main-post: - | commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" echo "Commits behind: $commits_behind_count" - if [ "$commits_behind_count" -nq 0 ]; then + if [ "$commits_behind_count" -ne 0 ]; then echo "Your branch is behind main, possibly main changed during your pipeline run, run 'git merge origin/main' to update." exit 1 fi -- GitLab From d0f7fdf589d186b284ee729dbd199172f8a2b17a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 11:01:54 +0100 Subject: [PATCH 26/31] Fix more references to ivas-codec-ci/snippets --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 86a45aefe6..c3f1362b97 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -639,7 +639,7 @@ renderer-pytest-on-merge-request: stage: compare script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -724,7 +724,7 @@ split-rendering-pytest-on-merge-request: stage: compare script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs # some helper variables - "|| true" to prevent failures from grep not finding anything @@ -795,7 +795,7 @@ ivas-pytest-on-merge-request: timeout: "14 minutes" script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -849,7 +849,7 @@ ivas-interop-on-merge-request: timeout: "10 minutes" script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec # the next line is dependent on ref-using-main flag in the other tests, but here the flag does not make sense @@ -898,7 +898,7 @@ evs-pytest-on-merge-request: timeout: "10 minutes" script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec -- GitLab From f1fb6bcc3cdc74def66d12a90a78523679b4a3ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 18:23:24 +0100 Subject: [PATCH 27/31] Move update-ltv-repo to ivas-codec-ci --- .gitlab-ci.yml | 111 +++++++++++++++++++++++-------------------------- 1 file changed, 53 insertions(+), 58 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c3f1362b97..cae90c038e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -117,11 +117,6 @@ workflow: - if [ $exit_code -ne 0 ] && [ $non_be_flag != 0 ]; then echo "Non-bitexact cases with non-BE tag encountered"; exit $EXIT_CODE_NON_BE; fi - exit 0 -.update-ltv-repo: &update-ltv-repo - - cd $LTV_DIR - - git pull - - cd - - .update-ltv-repo-win: &update-ltv-repo-win - Push-Location - cd $LTV_DIR_WIN @@ -261,7 +256,7 @@ branch-is-up-to-date-with-main-post: - python3 tests/create_short_testvectors.py - python3 scripts/prepare_combined_format_inputs.py - - *update-ltv-repo + - 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 - *get-basop-float-reference @@ -414,7 +409,7 @@ codec-smoke-test: script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh # LTV update needed as ltv ISM metadata files are used - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh # for MRs to basop-ci-branch, 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 @@ -1009,7 +1004,7 @@ check-first-frame-is-sid: needs: ["build-codec-linux-cmake"] script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh # this rm makes check-for-testvectors only check for the signals we actually need in this test - rm scripts/config/ci_linux_ltv.json scripts/config/ci_linux.json - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/check-for-testvectors.sh @@ -1468,7 +1463,7 @@ test-long-self-test: - 123 script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh ### build branch binaries - cmake . -Bbuild-test @@ -1680,7 +1675,7 @@ sanitizer-test-mono: - if: $SANITIZER_SCHEDULE_A timeout: 1.25 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py mono mono --tests $SANITIZER_TESTS sanitizer-test-stereo: @@ -1691,7 +1686,7 @@ sanitizer-test-stereo: start_in: 1.25 hours timeout: 2.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py stereo $OUT_FORMATS_CHANNEL_BASED EXT --tests $SANITIZER_TESTS sanitizer-test-stereodmxevs: @@ -1702,7 +1697,7 @@ sanitizer-test-stereodmxevs: start_in: 3.75 hours timeout: 1.25 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py StereoDmxEVS mono --tests $SANITIZER_TESTS sanitizer-test-mc-5_1: @@ -1713,7 +1708,7 @@ sanitizer-test-mc-5_1: start_in: 5 hours timeout: 2.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py 5_1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-mc-5_1_2: @@ -1724,7 +1719,7 @@ sanitizer-test-mc-5_1_2: start_in: 7.5 hours timeout: 2.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py 5_1_2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-mc-5_1_4: @@ -1735,7 +1730,7 @@ sanitizer-test-mc-5_1_4: start_in: 10 hours timeout: 3.75 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py 5_1_4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-mc-7_1: @@ -1746,7 +1741,7 @@ sanitizer-test-mc-7_1: start_in: 13.75 hours timeout: 2.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py 7_1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-mc-7_1_4: @@ -1757,7 +1752,7 @@ sanitizer-test-mc-7_1_4: start_in: 16.25 hours timeout: 5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py 7_1_4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-ism+1: @@ -1768,7 +1763,7 @@ sanitizer-test-ism+1: start_in: 21.25 hours timeout: 1.25 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py ISM1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-ism+2: @@ -1779,7 +1774,7 @@ sanitizer-test-ism+2: start_in: 22.5 hours timeout: 2.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py ISM2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-ism+3: @@ -1790,7 +1785,7 @@ sanitizer-test-ism+3: start_in: 25 hours timeout: 3.75 hour script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py ISM3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-ism+4: @@ -1801,7 +1796,7 @@ sanitizer-test-ism+4: start_in: 28.75 hours timeout: 5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py ISM4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-masa: @@ -1812,7 +1807,7 @@ sanitizer-test-masa: start_in: 33.75 hours timeout: 10 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py MASA $OUT_FORMATS_ALL --tests $SANITIZER_TESTS ### --- sanitizer schedule B --- @@ -1827,7 +1822,7 @@ sanitizer-test-foa: rules: - if: $SANITIZER_SCHEDULE_B script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py FOA $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-hoa2: @@ -1837,7 +1832,7 @@ sanitizer-test-hoa2: when: delayed start_in: 7.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-hoa3: @@ -1847,7 +1842,7 @@ sanitizer-test-hoa3: when: delayed start_in: 15 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-foa-ism1: @@ -1857,7 +1852,7 @@ sanitizer-test-osba-foa-ism1: when: delayed start_in: 22.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py FOA-ISM1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-foa-ism2: @@ -1867,7 +1862,7 @@ sanitizer-test-osba-foa-ism2: when: delayed start_in: 30 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py FOA-ISM2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-foa-ism3: @@ -1877,7 +1872,7 @@ sanitizer-test-osba-foa-ism3: when: delayed start_in: 37.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py FOA-ISM3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-foa-ism4: @@ -1887,7 +1882,7 @@ sanitizer-test-osba-foa-ism4: when: delayed start_in: 45 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py FOA-ISM4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-hoa2-ism1: @@ -1897,7 +1892,7 @@ sanitizer-test-osba-hoa2-ism1: when: delayed start_in: 52.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA2-ISM1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-hoa2-ism2: @@ -1907,7 +1902,7 @@ sanitizer-test-osba-hoa2-ism2: when: delayed start_in: 60 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA2-ISM2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-hoa2-ism3: @@ -1917,7 +1912,7 @@ sanitizer-test-osba-hoa2-ism3: when: delayed start_in: 67.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA2-ISM3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-hoa2-ism4: @@ -1927,7 +1922,7 @@ sanitizer-test-osba-hoa2-ism4: when: delayed start_in: 75 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA2-ISM4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-hoa3-ism1: @@ -1937,7 +1932,7 @@ sanitizer-test-osba-hoa3-ism1: when: delayed start_in: 82.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA3-ISM1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-hoa3-ism2: @@ -1947,7 +1942,7 @@ sanitizer-test-osba-hoa3-ism2: when: delayed start_in: 90 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA3-ISM2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-omasa-ism4: @@ -1958,7 +1953,7 @@ sanitizer-test-omasa-ism4: start_in: 97.5 hours timeout: 10 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py MASA-ISM4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS @@ -1974,7 +1969,7 @@ sanitizer-test-omasa-ism1: rules: - if: $SANITIZER_SCHEDULE_C script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py MASA-ISM1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-omasa-ism2: @@ -1984,7 +1979,7 @@ sanitizer-test-omasa-ism2: when: delayed start_in: 10 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py MASA-ISM2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-omasa-ism3: @@ -1994,7 +1989,7 @@ sanitizer-test-omasa-ism3: when: delayed start_in: 20 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py MASA-ISM3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-hoa3-ism3: @@ -2005,7 +2000,7 @@ sanitizer-test-osba-hoa3-ism3: start_in: 30 hours timeout: 7.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA3-ISM3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-hoa3-ism4: @@ -2016,7 +2011,7 @@ sanitizer-test-osba-hoa3-ism4: start_in: 37.5 hours timeout: 7.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA3-ISM4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS ### --- sanitizer schedule D --- @@ -2031,7 +2026,7 @@ sanitizer-test-planar-foa: rules: - if: $SANITIZER_SCHEDULE_D script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarFOA $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-planar-hoa2: @@ -2041,7 +2036,7 @@ sanitizer-test-planar-hoa2: when: delayed start_in: 7.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-planar-hoa3: @@ -2051,7 +2046,7 @@ sanitizer-test-planar-hoa3: when: delayed start_in: 15 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-foa-ism1: @@ -2061,7 +2056,7 @@ sanitizer-test-osba-planar-foa-ism1: when: delayed start_in: 22.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarFOA-ISM1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-foa-ism2: @@ -2071,7 +2066,7 @@ sanitizer-test-osba-planar-foa-ism2: when: delayed start_in: 30 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarFOA-ISM2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-foa-ism3: @@ -2081,7 +2076,7 @@ sanitizer-test-osba-planar-foa-ism3: when: delayed start_in: 37.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarFOA-ISM3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-foa-ism4: @@ -2091,7 +2086,7 @@ sanitizer-test-osba-planar-foa-ism4: when: delayed start_in: 45 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarFOA-ISM4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-hoa2-ism1: @@ -2101,7 +2096,7 @@ sanitizer-test-osba-planar-hoa2-ism1: when: delayed start_in: 52.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA2-ISM1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-hoa2-ism2: @@ -2111,7 +2106,7 @@ sanitizer-test-osba-planar-hoa2-ism2: when: delayed start_in: 60 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA2-ISM2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-hoa2-ism3: @@ -2121,7 +2116,7 @@ sanitizer-test-osba-planar-hoa2-ism3: when: delayed start_in: 67.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA2-ISM3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-hoa2-ism4: @@ -2131,7 +2126,7 @@ sanitizer-test-osba-planar-hoa2-ism4: when: delayed start_in: 75 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA2-ISM4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-hoa3-ism1: @@ -2141,7 +2136,7 @@ sanitizer-test-osba-planar-hoa3-ism1: when: delayed start_in: 82.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA3-ISM1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-hoa3-ism2: @@ -2151,7 +2146,7 @@ sanitizer-test-osba-planar-hoa3-ism2: when: delayed start_in: 90 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA3-ISM2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-hoa3-ism3: @@ -2161,7 +2156,7 @@ sanitizer-test-osba-planar-hoa3-ism3: when: delayed start_in: 97.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA3-ISM3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-hoa3-ism4: @@ -2171,7 +2166,7 @@ sanitizer-test-osba-planar-hoa3-ism4: when: delayed start_in: 105 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA3-ISM4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS @@ -2190,7 +2185,7 @@ coverage-test-on-main-scheduled: timeout: 3 hours script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - *update-ltv-repo + - 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 - make GCOV=1 -j - cp IVAS_rend IVAS_rend_ref # Copy exec to be able to run renderer script @@ -2298,7 +2293,7 @@ coverage-test-on-main-scheduled: before_script: - !reference [.job-linux, before_script] - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - *complexity-measurements-setup allow_failure: exit_codes: -- GitLab From b6a0ac979cacffdb993b49e5c6e1034cdfadf655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 18:47:30 +0100 Subject: [PATCH 28/31] Move activate-Werror-linux to ivas-codec-ci --- .gitlab-ci.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cae90c038e..fb97dcfab6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -135,10 +135,6 @@ workflow: - cp $LTV_DIR_WIN\*.met scripts\testv - cp $LTV_DIR_WIN\*.csv scripts\testv -.activate-Werror-linux: &activate-Werror-linux - - sed -i.bak "s/^# \(CFLAGS += -Werror\)/\1/" Makefile - - sed -i.bak "s/# \(set(CMAKE_C_FLAGS \"\${CMAKE_C_FLAGS} -Werror\")\)/\1/" CMakeLists.txt - .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 } @@ -337,7 +333,7 @@ build-codec-linux-make: - .rules-basis script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - *activate-Werror-linux + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - make -j build-codec-linux-cmake: @@ -346,7 +342,7 @@ build-codec-linux-cmake: - .rules-basis script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - *activate-Werror-linux + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - mkdir build - cd build - cmake .. @@ -370,7 +366,7 @@ build-codec-sanitizers-linux: - .rules-basis script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - *activate-Werror-linux + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - bash ci/build_codec_sanitizers_linux.sh build-codec-windows-cmake: -- GitLab From 3fd7636e16b2b77624bbd2cb7e2909beb2d8c367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 18:53:36 +0100 Subject: [PATCH 29/31] Move check-commits-behind-count-in-compare-jobs to ivas-codec-ci --- .gitlab-ci.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb97dcfab6..26b8b66c4a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -127,9 +127,6 @@ workflow: # automatically enable #define DISABLE_LIMITER in options.h, handling both /**/-comment and //-comment - sed -i.bak -e "s/\/\*[[:space:]]*\(#define[[:space:]]*DISABLE_LIMITER\)[[:space:]]*\*\//\1/g" ./lib_com/options.h -.check-commits-behind-count-in-compare-jobs: &check-commits-behind-count-in-compare-jobs - - if [ $commits_behind_count -ne 0 ]; then echo "Your branch is not up-to-date with main -> Compare tests will not run as they can contain false negatives this way.\nMain might have changed during your pipeline run. Run 'git merge origin/main' to update."; exit 1; fi - .copy-ltv-files-to-testv-dir-win: ©-ltv-files-to-testv-dir-win - cp $LTV_DIR_WIN\*.wav scripts\testv - cp $LTV_DIR_WIN\*.met scripts\testv @@ -630,8 +627,7 @@ renderer-pytest-on-merge-request: stage: compare script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - - *check-commits-behind-count-in-compare-jobs + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/check-commits-behind-count-in-compare-jobs.sh - *merge-request-comparison-setup-codec # some helper variables - "|| true" to prevent failures from grep not finding anything @@ -716,7 +712,7 @@ split-rendering-pytest-on-merge-request: script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - - *check-commits-behind-count-in-compare-jobs + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/check-commits-behind-count-in-compare-jobs.sh # some helper variables - "|| true" to prevent failures from grep not finding anything # write to temporary file as workaround for failures observed with piping echo @@ -787,7 +783,7 @@ ivas-pytest-on-merge-request: script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - - *check-commits-behind-count-in-compare-jobs + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/check-commits-behind-count-in-compare-jobs.sh - *merge-request-comparison-setup-codec # some helper variables - "|| true" to prevent failures from grep not finding anything @@ -841,7 +837,7 @@ ivas-interop-on-merge-request: script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - - *check-commits-behind-count-in-compare-jobs + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/check-commits-behind-count-in-compare-jobs.sh - *merge-request-comparison-setup-codec # the next line is dependent on ref-using-main flag in the other tests, but here the flag does not make sense - git checkout $source_branch_commit_sha @@ -890,7 +886,7 @@ evs-pytest-on-merge-request: script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - - *check-commits-behind-count-in-compare-jobs + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/check-commits-behind-count-in-compare-jobs.sh - *merge-request-comparison-setup-codec # some helper variables - "|| true" to prevent failures from grep not finding anything -- GitLab From 271430e357cb65359db16dd97cd29c669ff4283b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 19:00:09 +0100 Subject: [PATCH 30/31] Move disable-limiter to ivas-codec-ci --- .gitlab-ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 26b8b66c4a..e108200c2c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -123,10 +123,6 @@ workflow: - git pull - Pop-Location -.disable-limiter: &disable-limiter -# automatically enable #define DISABLE_LIMITER in options.h, handling both /**/-comment and //-comment - - sed -i.bak -e "s/\/\*[[:space:]]*\(#define[[:space:]]*DISABLE_LIMITER\)[[:space:]]*\*\//\1/g" ./lib_com/options.h - .copy-ltv-files-to-testv-dir-win: ©-ltv-files-to-testv-dir-win - cp $LTV_DIR_WIN\*.wav scripts\testv - cp $LTV_DIR_WIN\*.met scripts\testv @@ -480,7 +476,7 @@ pytest-compare-20ms-and-5ms-rendering: needs: ["build-codec-linux-cmake", "build-codec-linux-make", "build-codec-instrumented-linux", "build-codec-sanitizers-linux"] script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - *disable-limiter + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/disable-limiter.sh - make clean - make -j ### prepare pytest -- GitLab From 0b9dade8f51b26a1d8a9b4df52524fced89049cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Thu, 24 Apr 2025 21:36:46 +0200 Subject: [PATCH 31/31] Pin latest commit on main --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e108200c2c..eead0d128e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ variables: - # note: GitLab cannot reference the variable in the include ref:, we need to use a YAML anchor for this - IVAS_CODEC_CI_REF: &IVAS_CODEC_CI_REF mullerfa/ci-refactor + # note: GitLab cannot reference variables defined by users in the include ref:, we need to use a YAML anchor for this + # see https://docs.gitlab.com/ci/yaml/includes/#use-variables-with-include for more information + IVAS_CODEC_CI_REF: &IVAS_CODEC_CI_REF 4eb4c0dfbdc845280a9994b5f7540f69c737537b include: - local: .gitlab-ci/variables.yml -- GitLab