From 70025b4407e73b2e0788561743f8186c0411989f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Wed, 15 Jan 2025 18:04:40 +0100 Subject: [PATCH 01/18] Port CI from float-pc to main-pc This ports the relevant build, compare and postvalidate jobs to this branch, too. --- .gitlab-ci.yml | 338 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 335 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8a1157827..746eaa22b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -105,6 +105,8 @@ stages: - prevalidate - build - test + - compare + - postvalidate - deploy # --------------------------------------------------------------- @@ -121,6 +123,70 @@ stages: 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." + echo "Current job is run on commit $CI_COMMIT_SHA" + echo "Commit time was $CI_COMMIT_TIMESTAMP" + ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression + +.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 + +# From float CI +.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 + +# From float CI +.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) + +# From float CI +.merge-request-comparison-setup-codec: &merge-request-comparison-setup-codec + ### build test binaries, initial clean for paranoia reasons + - *disable-debugging-macro + - make clean + - make -j + - mv IVAS_cod IVAS_cod_test + - mv IVAS_dec IVAS_dec_test + - mv IVAS_rend IVAS_rend_test + - git restore . + + ### store the current commit hash + - source_branch_commit_sha=$(git rev-parse HEAD) + + ### checkout version to compare against + - *mr-fetch-target-branch + - *mr-get-target-commit + - git checkout $target_commit + - echo "Building reference codec at commit $target_commit" + + ### build reference binaries + - *disable-debugging-macro + - make -j + - mv IVAS_cod IVAS_cod_ref + - mv IVAS_dec IVAS_dec_ref + - mv IVAS_rend IVAS_rend_ref + - git restore . + + # rename test binaries back + - mv IVAS_cod_test IVAS_cod + - mv IVAS_dec_test IVAS_dec + - mv IVAS_rend_test IVAS_rend + +.merge-request-comparison-check: &merge-request-comparison-check + - echo "--------------- Running merge-request-comparison-check anchor ---------------" + - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi + - if [ $exit_code -ne 0 ] && [ $non_be_flag == 0 ]; then echo "Non-bitexact cases without non-BE tag encountered!"; exit $EXIT_CODE_FAIL; fi + - 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 + + .activate-debug-mode-info-if-set: &activate-debug-mode-info-if-set - if [ "$BUILD_WITH_DEBUG_MODE_INFO" = "true" ]; then - sed -i.bak -e "s/\/\*\ *\(#define\ *DEBUGGING\ *\)\*\//\1/g" lib_com/options.h @@ -185,7 +251,20 @@ stages: - cd $LTV_DIR - git pull - cd - - + +.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." + echo "Main might have changed during your pipeline run. Run 'git pull origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME' 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/ @@ -194,6 +273,10 @@ stages: .activate-Werror-linux: &activate-Werror-linux - sed -i.bak "s/^# \(CFLAGS += -Werror\)/\1/" Makefile +.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 } + .rules-pytest-to-ref-short: rules: - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare" @@ -259,6 +342,39 @@ stages: # 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' + - if: $MANUAL_PIPELINE_TYPE == 'test-branch-vs-input-passthrough' + when: never + - when: on_success + +.rules-merge-request: + extends: .rules-basis + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + # templates to define stages and platforms .test-job-linux: tags: @@ -271,6 +387,14 @@ stages: tags: - ivas-basop-linux +.build-job-windows: + stage: build + needs: [] + timeout: "4 minutes" + tags: + # TODO: set up ivas-basop-windows runners + - ivas-windows + # template for test jobs on linux that need the TESTV_DIR .test-job-linux-needs-testv-dir: extends: .test-job-linux @@ -609,6 +733,42 @@ uninterruptible: tags: - ivas-basop-linux +# --------------------------------------------------------------- +# Validation jobs +# --------------------------------------------------------------- + +branch-is-up-to-date-with-target-pre: + extends: + - .rules-merge-request + stage: prevalidate + needs: [] + tags: + - ivas-basop-linux + script: + - *get-commits-behind-count + - echo $commits_behind_count + - | + if [ $commits_behind_count -ne 0 ]; then + echo "Your branch is behind the target branch, run 'git pull origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME' to update." + exit 1 + fi + +branch-is-up-to-date-with-target-post: + extends: + - .rules-merge-request + stage: postvalidate + tags: + - ivas-basop-linux + script: + - *get-commits-behind-count + - echo $commits_behind_count + - | + if [ $commits_behind_count -ne 0 ]; then + echo "Your branch is behind the target branch, possibly main changed during your pipeline run, run 'git pull origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME' to update." + exit 1 + fi + + # --------------------------------------------------------------- # verification jobs # --------------------------------------------------------------- @@ -617,7 +777,7 @@ clang-format-check: extends: - .test-job-linux rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" # only have MR pipelines for MRs to main + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - if: $CI_PIPELINE_SOURCE == 'push' when: never - if: $CI_PIPELINE_SOURCE == 'schedule' @@ -625,6 +785,8 @@ clang-format-check: variables: ARTIFACT_BASE_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix" stage: prevalidate + tags: + - ivas-basop-linux needs: [] timeout: "5 minutes" script: @@ -680,6 +842,8 @@ build-codec-linux-make: when: never extends: - .build-job-linux + tags: + - ivas-basop-linux script: - *print-common-info - *activate-Werror-linux @@ -690,19 +854,47 @@ build-codec-linux-instrumented-make: rules: - if: $CI_PIPELINE_SOURCE == 'web' - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" # only have MR pipelines for MRs to main + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - if: $CI_PIPELINE_SOURCE == 'schedule' - if: $CI_PIPELINE_SOURCE == 'push' when: never extends: - .build-job-linux timeout: "7 minutes" + tags: + - ivas-basop-linux script: + - *update-scripts-repo - *print-common-info - *update-scripts-repo - bash scripts/prepare_instrumentation.sh -m MEM_ONLY -p BASOP - make -j -C $INSTR_DIR + +# make sure that the codec builds with msan, asan and usan +build-codec-sanitizers-linux: + extends: + - .build-job-linux + - .rules-basis + tags: + - ivas-basop-linux + script: + - *update-scripts-repo + - *print-common-info + - *activate-Werror-linux + - bash ci/build_codec_sanitizers_linux.sh + + # TODO: reactivate once windows runners are available in BASOP project +.build-codec-windows-msbuild: + extends: + - .build-job-windows + - .rules-basis + script: + - *print-common-info-windows + - *activate-WX-windows + - MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug + + build-codec-linux-debugging-make: rules: - if: $CI_PIPELINE_SOURCE == 'web' @@ -1193,6 +1385,146 @@ voip-be-on-merge-request: - python3 -m pytest tests/test_be_for_jbm_neutral_dly_profile.py +# --------------------------------------------------------------- +# Test jobs for merge requests +# --------------------------------------------------------------- + +# test that runs all modes with 1s input signals +# TODO: disabled temporarily, needs to be adapted to BASOP +.codec-smoke-test: + extends: + - .test-job-linux-needs-testv-dir + - .rules-merge-request + timeout: "20 minutes" + tags: + - ivas-basop-linux + stage: test + needs: ["build-codec-linux-make"] #, "build-codec-instrumented-linux", "build-codec-sanitizers-linux"] + script: + - *print-common-info + # LTV update needed as ltv ISM metadata files are used + - *update-ltv-repo + - bash ci/smoke_test.sh + ### analyze for failures + - if ! [ -s smoke_test_output.txt ] || ! [ -s smoke_test_output_jbm.txt ] || ! [ -s smoke_test_output_hrtf.txt ]; then echo "Error in smoke test"; exit 1; fi + - ret_val=0 + - if cat smoke_test_output.txt | grep -c "failed"; then echo "Smoke test without JBM failed"; ret_val=1; fi + - if cat smoke_test_output_jbm.txt | grep -c "failed"; then echo "Smoke test JBM part failed"; ret_val=1; fi + - if cat smoke_test_output_hrtf.txt | grep -c "failed"; then echo "Smoke test with external hrtf files failed"; ret_val=1; fi + - exit $ret_val + artifacts: + name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" + expire_in: 1 week + when: always + paths: + - smoke_test_output.txt + - smoke_test_output_jbm.txt + - smoke_test_output_hrtf.txt + expose_as: "Smoke test results" + +# compare renderer bitexactness between target and source branch +renderer-pytest-on-merge-request: + extends: + - .test-job-linux-needs-testv-dir + - .rules-merge-request + needs: ["build-codec-linux-make"] + # TODO: set reasonable timeout, will most likely take less + timeout: "20 minutes" + tags: + - ivas-basop-linux + stage: compare + script: + - *print-common-info + - *get-commits-behind-count + - *check-commits-behind-count-in-compare-jobs + - *merge-request-comparison-setup-codec + + # some helper variables - "|| true" to prevent failures from grep not finding anything + # write to temporary file as workaround for failures observed with piping echo + - echo $CI_MERGE_REQUEST_TITLE > tmp.txt + - non_be_flag=$(grep -c --ignore-case "\[rend\(erer\)*[ -]*non[ -]*be\]" tmp.txt) || true + # TODO: ref_using_target comes from float repo, but does not apply here - disable for now + # - ref_using_target=$(grep -c --ignore-case "\[ref[ -]*using[ -]*target\]" tmp.txt) || true + - ref_using_target=0 + + ### If ref_using_target is not set, checkout the source branch to use scripts and input from there + - if [ $ref_using_target == 0 ]; then git checkout $source_branch_commit_sha; fi + + - exit_code=0 + - testcase_timeout=60 + - python3 -m pytest -q --log-level ERROR -n auto -rA --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/renderer/test_renderer.py --create_ref --testcase_timeout=$testcase_timeout || exit_code=$? + + ### Run test using branch scripts and input + - if [ $ref_using_target == 1 ]; then git checkout $source_branch_commit_sha; fi + + # run test + - python3 -m pytest -q --log-level ERROR -n auto -rA --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/renderer/test_renderer.py --create_cut --testcase_timeout=$testcase_timeout || exit_code=$? + - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true + + - *merge-request-comparison-check + +# compare bit exactness between target and source branch +ivas-pytest-on-merge-request: + extends: + - .test-job-linux-needs-testv-dir + - .rules-merge-request + stage: compare + # TODO: broken dependency needs to be removed temporarily, see above + # note: this step doesn't really depend on codec-smoke-test + # it's just pointless to run this step when the smoke test fails and the smoke test should be reasonably fast + # thus, overall, this should save time + needs: ["build-codec-linux-make"] #, "codec-smoke-test"] + timeout: "14 minutes" + tags: + - ivas-basop-linux + script: + - *print-common-info + - *get-commits-behind-count + - *check-commits-behind-count-in-compare-jobs + - *merge-request-comparison-setup-codec + - python3 ci/remove_unsupported_testcases.py $PRM_FILES + + # some helper variables - "|| true" to prevent failures from grep not finding anything + # write to temporary file as workaround for failures observed with piping echo + - echo $CI_MERGE_REQUEST_TITLE > tmp.txt + - non_be_flag=$(grep -c --ignore-case "\[non[ -]*be\]" tmp.txt) || true + # TODO: ref_using_target comes from float repo, but does not apply here - disable for now + # - ref_using_target=$(grep -c --ignore-case "\[ref[ -]*using[ -]*target\]" tmp.txt) || true + - ref_using_target=0 + + ### If ref_using_target is not set, checkout the source branch to use scripts and input from there + - if [ $ref_using_target == 0 ]; then git checkout $source_branch_commit_sha; fi + + ### prepare pytest + # create references + - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 + + ### Run test using branch scripts and input + - if [ $ref_using_target == 1 ]; then git checkout $source_branch_commit_sha; fi + + ### run pytest + - exit_code=0 + - testcase_timeout=60 + - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --testcase_timeout=$testcase_timeout || exit_code=$? + - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true + + - *merge-request-comparison-check + + allow_failure: + exit_codes: + - 123 + 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.xml + - report.html + expose_as: "pytest ivas results" + reports: + junit: + - report-junit.xml + # --------------------------------------------------------------- # Complexity measurement jobs # --------------------------------------------------------------- -- GitLab From 2e0934bfdd8df21fbf44a4b52ac071bd6ba17471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Wed, 15 Jan 2025 19:28:22 +0100 Subject: [PATCH 02/18] Remove redundant parentheses Silences a compiler error/warning (-Werror). --- lib_enc/cod_tcx_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_enc/cod_tcx_fx.c b/lib_enc/cod_tcx_fx.c index 890f98e12..5bde2d5c0 100644 --- a/lib_enc/cod_tcx_fx.c +++ b/lib_enc/cod_tcx_fx.c @@ -4236,7 +4236,7 @@ void QuantizeTCXSpectrum_fx( Word8 tmp8 = 1; move16(); - if ( ( st->last_core == ACELP_CORE ) ) + if ( st->last_core == ACELP_CORE ) { tmp8 = 0; move16(); -- GitLab From 748f2f64402ef3707b24b98467e727c230de5d75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Thu, 16 Jan 2025 11:02:32 +0100 Subject: [PATCH 03/18] Increase timeout --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 746eaa22b..2609423e6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1474,7 +1474,7 @@ ivas-pytest-on-merge-request: # it's just pointless to run this step when the smoke test fails and the smoke test should be reasonably fast # thus, overall, this should save time needs: ["build-codec-linux-make"] #, "codec-smoke-test"] - timeout: "14 minutes" + timeout: "28 minutes" tags: - ivas-basop-linux script: -- GitLab From 85b481ea44df83192609e2835ce3044cc688072f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Thu, 16 Jan 2025 13:35:22 +0100 Subject: [PATCH 04/18] Temporary disable -Werror in sanitizer builds --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2609423e6..7cbe84b34 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -881,7 +881,8 @@ build-codec-sanitizers-linux: script: - *update-scripts-repo - *print-common-info - - *activate-Werror-linux + # TODO: re-enable once all the warnings have been fixed + #- *activate-Werror-linux - bash ci/build_codec_sanitizers_linux.sh # TODO: reactivate once windows runners are available in BASOP project -- GitLab From b425ae37a83942710b1073a2ef3358c014b9f8cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Thu, 16 Jan 2025 13:55:45 +0100 Subject: [PATCH 05/18] Add missing variable --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7cbe84b34..2789e055b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,6 +30,7 @@ variables: CI_REGRESSION_THRESH_ODG: "-0.05" GIT_CLEAN_FLAGS: -ffdxq INSTR_DIR: "scripts/c-code_instrument" + TESTS_DIR_CODEC_BE_ON_MR: "tests/codec_be_on_mr_nonselection" BUILD_WITH_DEBUG_MODE_INFO: "" ENCODER_TEST: "" MANUAL_PIPELINE_TYPE: -- GitLab From 523d74e6482d38c920fac3bab410494468c11c7d Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 17 Jan 2025 08:40:36 +0100 Subject: [PATCH 06/18] try longer timeout --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2789e055b..abc3d61b8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1476,7 +1476,7 @@ ivas-pytest-on-merge-request: # it's just pointless to run this step when the smoke test fails and the smoke test should be reasonably fast # thus, overall, this should save time needs: ["build-codec-linux-make"] #, "codec-smoke-test"] - timeout: "28 minutes" + timeout: "40 minutes" tags: - ivas-basop-linux script: -- GitLab From b922b02e922d1cfe6c9bff7b62f888ac0a9e07ed Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 17 Jan 2025 09:12:37 +0100 Subject: [PATCH 07/18] increase timeout for individual testcases --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index abc3d61b8..df709ee95 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1506,7 +1506,7 @@ ivas-pytest-on-merge-request: ### run pytest - exit_code=0 - - testcase_timeout=60 + - testcase_timeout=600 - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --testcase_timeout=$testcase_timeout || exit_code=$? - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true -- GitLab From 12fd998bd31d9201c9923a3f56bedbb671db704e Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 24 Jan 2025 09:55:47 +0100 Subject: [PATCH 08/18] add compare_to_main tests to main-pc pipeline --- .gitlab-ci.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index df709ee95..c3a276575 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -312,6 +312,12 @@ stages: - if: $CI_PIPELINE_SOURCE == 'push' when: never +.rules-pytest-to-main-or-main-pc-short: + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main-pc") + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + .rules-pytest-long: rules: - if: $PYTEST_MLD_LONG # Set by scheduled pipeline @@ -957,7 +963,7 @@ build-codec-linux-debugging-make: ### jobs that test flt encoder -> fx decoder ivas-pytest-compare_to_main-short-dec: extends: - - .rules-pytest-to-main-short + - .rules-pytest-to-main-or-main-pc-short - .test-job-linux before_script: - USE_LTV=0 @@ -969,7 +975,7 @@ ivas-pytest-compare_to_main-short-dec: ivas-pytest-compare_to_main-short-dec-lev-10: extends: - - .rules-pytest-to-main-short + - .rules-pytest-to-main-or-main-pc-short - .test-job-linux before_script: - USE_LTV=0 @@ -981,7 +987,7 @@ ivas-pytest-compare_to_main-short-dec-lev-10: ivas-pytest-compare_to_main-short-dec-lev+10: extends: - - .rules-pytest-to-main-short + - .rules-pytest-to-main-or-main-pc-short - .test-job-linux before_script: - USE_LTV=0 -- GitLab From 13162c7fb5e52bef2c29513287da9f8acb8d047f Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 24 Jan 2025 10:26:55 +0100 Subject: [PATCH 09/18] make the encoder compare_to_ref jobs run as well --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c3a276575..ea29891da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1005,7 +1005,7 @@ ivas-pytest-compare_to_main-short-dec-lev+10: ivas-pytest-compare_to_ref-short-enc: extends: #- .rules-pytest-to-ref-short - - .rules-pytest-to-ref-enc-short-temp + - .rules-pytest-to-main-or-main-pc-short - .test-job-linux before_script: - USE_LTV=0 @@ -1018,7 +1018,7 @@ ivas-pytest-compare_to_ref-short-enc: ivas-pytest-compare_to_ref-short-enc-lev-10: extends: #- .rules-pytest-to-ref-short - - .rules-pytest-to-ref-enc-short-temp + - .rules-pytest-to-main-or-main-pc-short - .test-job-linux before_script: - USE_LTV=0 @@ -1031,7 +1031,7 @@ ivas-pytest-compare_to_ref-short-enc-lev-10: ivas-pytest-compare_to_ref-short-enc-lev+10: extends: #- .rules-pytest-to-ref-short - - .rules-pytest-to-ref-enc-short-temp + - .rules-pytest-to-main-or-main-pc-short - .test-job-linux before_script: - USE_LTV=0 -- GitLab From 104890a54b25cf182687a0c2f9d520ce2fa7a883 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 24 Jan 2025 10:32:37 +0100 Subject: [PATCH 10/18] add evs conf test --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ea29891da..a0c902b70 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1328,7 +1328,7 @@ be-2-evs-26444: - .test-job-linux rules: - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "evs-26444" - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main-pc") tags: - be-2-evs-basop stage: test -- GitLab From 11b5220997c3e35cdf1bac48a32d8c3c6a66fc42 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Mon, 20 Jan 2025 09:30:38 +0100 Subject: [PATCH 11/18] add hrtf loading BE test --- .gitlab-ci.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a0c902b70..b1687e5b2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -834,6 +834,30 @@ clang-format-check: name: "$ARTIFACT_BASE_NAME" expose_as: "formatting patch" +# from float +check-bitexactness-hrtf-rom-and-file: + extends: + - .test-job-linux + - .rules-merge-request-to-float-pc + stage: test + needs: ["build-codec-linux-make"] + timeout: "5 minutes" + script: + - *print-common-info + - *update-scripts-repo + - make clean + - make -j + - python3 tests/create_short_testvectors.py --cut_len 1.0 + - python3 -m pytest tests/hrtf_binary_loading --html=report.html --junit-xml=report-junit.xml --self-contained-html + artifacts: + paths: + - report.html + - report-junit.xml + when: always + name: "$CI_JOB_NAME--$CI_MERGE_REQUEST_ID--sha-$CI_COMMIT_SHA--hrtf-loading" + expose_as: "logs-hrtf-loading" + expire_in: "5 days" + # --------------------------------------------------------------- # Build jobs # --------------------------------------------------------------- @@ -871,7 +895,6 @@ build-codec-linux-instrumented-make: tags: - ivas-basop-linux script: - - *update-scripts-repo - *print-common-info - *update-scripts-repo - bash scripts/prepare_instrumentation.sh -m MEM_ONLY -p BASOP -- GitLab From b9cea96b030b16adc331f1e2134fc23bd5737c5e Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 24 Jan 2025 10:51:44 +0100 Subject: [PATCH 12/18] add missing rule --- .gitlab-ci.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b1687e5b2..6ed0f5795 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -382,6 +382,13 @@ stages: - if: $CI_PIPELINE_SOURCE == 'push' when: never +.rules-merge-request-to-main-pc: + extends: .rules-basis + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == 'main-pc' + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + # templates to define stages and platforms .test-job-linux: tags: @@ -838,7 +845,7 @@ clang-format-check: check-bitexactness-hrtf-rom-and-file: extends: - .test-job-linux - - .rules-merge-request-to-float-pc + - .rules-merge-request-to-main-pc stage: test needs: ["build-codec-linux-make"] timeout: "5 minutes" @@ -1457,7 +1464,7 @@ voip-be-on-merge-request: renderer-pytest-on-merge-request: extends: - .test-job-linux-needs-testv-dir - - .rules-merge-request + - .rules-merge-request-to-main-pc needs: ["build-codec-linux-make"] # TODO: set reasonable timeout, will most likely take less timeout: "20 minutes" @@ -1498,7 +1505,7 @@ renderer-pytest-on-merge-request: ivas-pytest-on-merge-request: extends: - .test-job-linux-needs-testv-dir - - .rules-merge-request + - .rules-merge-request-to-main-pc stage: compare # TODO: broken dependency needs to be removed temporarily, see above # note: this step doesn't really depend on codec-smoke-test -- GitLab From 4b9ba5e9e21bad02c98c2b5b7abd10f31ebf508d Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Mon, 20 Jan 2025 10:51:18 +0100 Subject: [PATCH 13/18] exclude testcases whcih use the custom binary file format feature --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ed0f5795..835120a8d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -855,7 +855,8 @@ check-bitexactness-hrtf-rom-and-file: - make clean - make -j - python3 tests/create_short_testvectors.py --cut_len 1.0 - - python3 -m pytest tests/hrtf_binary_loading --html=report.html --junit-xml=report-junit.xml --self-contained-html + # TODO: run full test again once the custom binary files are supported + - python3 -m pytest -k "not diff_from_rom" tests/hrtf_binary_loading --html=report.html --junit-xml=report-junit.xml --self-contained-html artifacts: paths: - report.html -- GitLab From fdc5e19dd1897851bb02f00424c95bcbc670ed1e Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Mon, 20 Jan 2025 11:22:02 +0100 Subject: [PATCH 14/18] correct pytest filter for hrtf job --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 835120a8d..4ea3394d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -856,7 +856,7 @@ check-bitexactness-hrtf-rom-and-file: - make -j - python3 tests/create_short_testvectors.py --cut_len 1.0 # TODO: run full test again once the custom binary files are supported - - python3 -m pytest -k "not diff_from_rom" tests/hrtf_binary_loading --html=report.html --junit-xml=report-junit.xml --self-contained-html + - python3 -m pytest -k "not diff_from_rom and not test_binary_file" tests/hrtf_binary_loading --html=report.html --junit-xml=report-junit.xml --self-contained-html artifacts: paths: - report.html -- GitLab From 81e0d4f0fcff9097f1523b4a02196c441068aad9 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 24 Jan 2025 12:18:34 +0100 Subject: [PATCH 15/18] pull explicitly the target branch --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4ea3394d3..ed1646111 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -558,7 +558,7 @@ stages: ### run main now - git checkout $CI_MERGE_REQUEST_TARGET_BRANCH_NAME - - git pull + - git pull origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME - make clean - make -j - python3 -m pytest --tb=no $TEST_SUITE -v --keep_files --create_cut --html=$HTML_REPORT_MAIN --self-contained-html --junit-xml=$XML_REPORT_MAIN --mld --ssnr --odg --ref_encoder_path $REF_ENCODER_PATH --ref_decoder_path $REF_DECODER_PATH --dut_encoder_path $DUT_ENCODER_PATH --dut_decoder_path $DUT_DECODER_PATH -n auto --testcase_timeout $testcase_timeout || true -- GitLab From f81a79bdf70c97950be9ca0c317f821d6a43d592 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Tue, 28 Jan 2025 11:17:52 +0100 Subject: [PATCH 16/18] deactivate hrtf test again --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ed1646111..9ea819f23 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -842,7 +842,8 @@ clang-format-check: expose_as: "formatting patch" # from float -check-bitexactness-hrtf-rom-and-file: +# needs fix to be merged from floating point repo before it can be activated +.check-bitexactness-hrtf-rom-and-file: extends: - .test-job-linux - .rules-merge-request-to-main-pc -- GitLab From 1a58cc08d61027fbb972135d44f82db8bcbe5c37 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Tue, 28 Jan 2025 11:37:18 +0100 Subject: [PATCH 17/18] Enable build-codec-windows-msbuild --- .gitlab-ci.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9ea819f23..feed1b322 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -406,7 +406,6 @@ stages: needs: [] timeout: "4 minutes" tags: - # TODO: set up ivas-basop-windows runners - ivas-windows # template for test jobs on linux that need the TESTV_DIR @@ -924,11 +923,19 @@ build-codec-sanitizers-linux: #- *activate-Werror-linux - bash ci/build_codec_sanitizers_linux.sh - # TODO: reactivate once windows runners are available in BASOP project -.build-codec-windows-msbuild: +build-codec-windows-msbuild: + rules: + - if: $CI_PIPELINE_SOURCE == 'web' + - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # trigger build job for all MRs + - if: $CI_PIPELINE_SOURCE == 'schedule' + - if: $CI_PIPELINE_SOURCE == 'push' + when: never extends: - .build-job-windows - - .rules-basis + timeout: "7 minutes" + tags: + - ivas-windows script: - *print-common-info-windows - *activate-WX-windows -- GitLab From 66881a26dad19845c650a9a9c525fa827a50115a Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Tue, 28 Jan 2025 15:16:48 +0100 Subject: [PATCH 18/18] make stv tests triggerable via manual run --- .gitlab-ci.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index feed1b322..555603e6b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -312,8 +312,9 @@ stages: - if: $CI_PIPELINE_SOURCE == 'push' when: never -.rules-pytest-to-main-or-main-pc-short: +.rules-mr-to-main-or-main-pc-or-manual: rules: + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare" - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main-pc") - if: $CI_PIPELINE_SOURCE == 'push' when: never @@ -1002,7 +1003,7 @@ build-codec-linux-debugging-make: ### jobs that test flt encoder -> fx decoder ivas-pytest-compare_to_main-short-dec: extends: - - .rules-pytest-to-main-or-main-pc-short + - .rules-mr-to-main-or-main-pc-or-manual - .test-job-linux before_script: - USE_LTV=0 @@ -1014,7 +1015,7 @@ ivas-pytest-compare_to_main-short-dec: ivas-pytest-compare_to_main-short-dec-lev-10: extends: - - .rules-pytest-to-main-or-main-pc-short + - .rules-mr-to-main-or-main-pc-or-manual - .test-job-linux before_script: - USE_LTV=0 @@ -1026,7 +1027,7 @@ ivas-pytest-compare_to_main-short-dec-lev-10: ivas-pytest-compare_to_main-short-dec-lev+10: extends: - - .rules-pytest-to-main-or-main-pc-short + - .rules-mr-to-main-or-main-pc-or-manual - .test-job-linux before_script: - USE_LTV=0 @@ -1044,7 +1045,7 @@ ivas-pytest-compare_to_main-short-dec-lev+10: ivas-pytest-compare_to_ref-short-enc: extends: #- .rules-pytest-to-ref-short - - .rules-pytest-to-main-or-main-pc-short + - .rules-mr-to-main-or-main-pc-or-manual - .test-job-linux before_script: - USE_LTV=0 @@ -1057,7 +1058,7 @@ ivas-pytest-compare_to_ref-short-enc: ivas-pytest-compare_to_ref-short-enc-lev-10: extends: #- .rules-pytest-to-ref-short - - .rules-pytest-to-main-or-main-pc-short + - .rules-mr-to-main-or-main-pc-or-manual - .test-job-linux before_script: - USE_LTV=0 @@ -1070,7 +1071,7 @@ ivas-pytest-compare_to_ref-short-enc-lev-10: ivas-pytest-compare_to_ref-short-enc-lev+10: extends: #- .rules-pytest-to-ref-short - - .rules-pytest-to-main-or-main-pc-short + - .rules-mr-to-main-or-main-pc-or-manual - .test-job-linux before_script: - USE_LTV=0 -- GitLab