diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 068dfb01931130e1a97945e95b8733445c45d502..eead0d128ea4ab7ee806e9141dfc11b8c756f9f4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,47 +1,13 @@ 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: "" - - -default: - interruptible: true # Make all jobs by default interruptible + # 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 + - 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: @@ -83,30 +49,12 @@ 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 # --------------------------------------------------------------- # 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." @@ -114,31 +62,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 - - 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) - -.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 - -.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 @@ -150,7 +73,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}"/ivas-codec-ci/snippets/disable-debugging-macro.sh - make clean - mkdir build - cd build @@ -167,13 +90,13 @@ 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}"/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 - - *disable-debugging-macro + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/disable-debugging-macro.sh - cd build - cmake .. - make -j @@ -195,53 +118,27 @@ stages: - 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 - 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 - -.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 - -.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 - 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 } # 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 + - 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,140 +161,6 @@ stages: - 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 # --------------------------------------------------------------- @@ -427,45 +190,49 @@ uninterruptible: branch-is-up-to-date-with-main-pre: extends: - .rules-merge-request-to-main + - .job-linux stage: prevalidate needs: [] - 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}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" + echo "Commits behind: $commits_behind_count" + if [ "$commits_behind_count" -ne 0 ]; then + echo "Your branch is behind main, run 'git merge origin/main' to update." + exit 1 + fi 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: - - *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}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" + echo "Commits behind: $commits_behind_count" + 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 .basop-ci-branch-compat-template: extends: @@ -474,12 +241,13 @@ branch-is-up-to-date-with-main-post: tags: - ivas-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 - - *update-ltv-repo - - *copy-ltv-files-to-testv-dir + - 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 @@ -558,8 +326,8 @@ build-codec-linux-make: - .build-job-linux - .rules-basis script: - - *print-common-info - - *activate-Werror-linux + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - make -j build-codec-linux-cmake: @@ -567,8 +335,8 @@ build-codec-linux-cmake: - .build-job-linux - .rules-basis script: - - *print-common-info - - *activate-Werror-linux + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - mkdir build - cd build - cmake .. @@ -581,7 +349,7 @@ build-codec-instrumented-linux: - .rules-basis timeout: "10 minutes" script: - - *print-common-info + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - ./scripts/prepare_instrumentation.sh - make -j -C scripts/c-code_instrument @@ -591,8 +359,8 @@ build-codec-sanitizers-linux: - .build-job-linux - .rules-basis script: - - *print-common-info - - *activate-Werror-linux + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - bash ci/build_codec_sanitizers_linux.sh build-codec-windows-cmake: @@ -629,9 +397,9 @@ 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}"/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 @@ -664,38 +432,41 @@ codec-smoke-test: codec-msan: extends: - .sanitizer-selftest-on-mr + - .sanitizer-selftest-anchor tags: - ivas-linux-fast 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" - USE_LTV="" - <<: *sanitizer-selftest-anchor # code selftest testvectors with address-sanitizer binaries codec-asan: extends: - .sanitizer-selftest-on-mr + - .sanitizer-selftest-anchor 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" - 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: + - !reference [.job-linux, before_script] - CLANG_NUM=3 - 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: @@ -705,8 +476,8 @@ 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 - - *disable-limiter + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/disable-limiter.sh - make clean - make -j ### prepare pytest @@ -852,9 +623,8 @@ renderer-pytest-on-merge-request: timeout: "20 minutes" stage: compare script: - - *print-common-info - - *get-commits-behind-count - - *check-commits-behind-count-in-compare-jobs + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh + - 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 @@ -937,9 +707,9 @@ split-rendering-pytest-on-merge-request: timeout: "30 minutes" stage: compare script: - - *print-common-info - - *get-commits-behind-count - - *check-commits-behind-count-in-compare-jobs + - 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)" + - 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 @@ -950,8 +720,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}"/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" @@ -1008,9 +778,9 @@ ivas-pytest-on-merge-request: needs: ["build-codec-linux-cmake", "codec-smoke-test"] timeout: "14 minutes" script: - - *print-common-info - - *get-commits-behind-count - - *check-commits-behind-count-in-compare-jobs + - 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)" + - 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 @@ -1062,9 +832,9 @@ ivas-interop-on-merge-request: needs: ["build-codec-linux-cmake"] timeout: "10 minutes" script: - - *print-common-info - - *get-commits-behind-count - - *check-commits-behind-count-in-compare-jobs + - 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)" + - 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 @@ -1111,9 +881,9 @@ evs-pytest-on-merge-request: needs: ["build-codec-linux-cmake", "codec-smoke-test"] timeout: "10 minutes" script: - - *print-common-info - - *get-commits-behind-count - - *check-commits-behind-count-in-compare-jobs + - 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)" + - 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 @@ -1163,7 +933,7 @@ voip-be-on-merge-request: needs: ["build-codec-linux-make"] timeout: "10 minutes" script: - - *print-common-info + - 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 @@ -1219,16 +989,14 @@ 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: - - *print-common-info - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh + - 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 - - *check-for-testvectors + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/check-for-testvectors.sh - bash ci/run-first-frame-is-sid-test.sh artifacts: @@ -1265,7 +1033,7 @@ check-bitexactness-hrtf-rom-and-file: needs: ["build-codec-linux-cmake"] timeout: "5 minutes" script: - - *print-common-info + - 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 @@ -1287,7 +1055,7 @@ check-bitexactness-ext-and-transport-format: needs: ["build-codec-linux-cmake"] timeout: "5 minutes" script: - - *print-common-info + - 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 @@ -1341,7 +1109,7 @@ be-2-evs-linux: needs: ["build-codec-linux-cmake"] timeout: "20 minutes" # To be revisited script: - - *print-common-info + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - mkdir build - cd build @@ -1365,9 +1133,9 @@ codec-comparison-on-main-push: needs: ["build-codec-linux-cmake"] timeout: "30 minutes" # To be revisited script: - - *print-common-info + - bash "${CI_PROJECT_DIR}"/ivas-codec-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 @@ -1565,8 +1333,8 @@ ivas-conformance: junit: report-junit.xml ivas-conformance-linux: - tags: - - ivas-linux + extends: + - .job-linux stage: test timeout: "90 minutes" rules: @@ -1575,7 +1343,7 @@ ivas-conformance-linux: exit_codes: - 123 script: - - *print-common-info + - 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 @@ -1672,8 +1440,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" @@ -1683,8 +1451,8 @@ test-long-self-test: exit_codes: - 123 script: - - *print-common-info - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh ### build branch binaries - cmake . -Bbuild-test @@ -1712,7 +1480,7 @@ test-long-self-test: ### prepare pytest # Copy test vectors from LTV to TESTV - - *copy-ltv-files-to-testv-dir + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/copy-ltv-files-to-testv-dir.sh # create references - exit_code_ref=0 @@ -1742,8 +1510,8 @@ test-long-self-test: - report-junit-ltv.xml check-clipping: - tags: - - ivas-linux + extends: + - .job-linux stage: test timeout: "30 minutes" rules: @@ -1752,8 +1520,8 @@ check-clipping: exit_codes: - 123 script: - - *print-common-info - - *enable-debugging-macro + - 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 @@ -1772,8 +1540,8 @@ check-clipping: - report-junit.xml test-branch-vs-input-passthrough: - tags: - - ivas-linux + extends: + - .job-linux stage: compare timeout: "30 minutes" # TBD rules: @@ -1782,7 +1550,7 @@ test-branch-vs-input-passthrough: exit_codes: - 123 script: - - *print-common-info + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - make -j - exit_code=0 @@ -1814,22 +1582,24 @@ test-branch-vs-input-passthrough: ltv-msan: extends: - .sanitizer-selftest-ltv + - .sanitizer-selftest-anchor rules: - if: $SANITIZER_SCHEDULE_E timeout: 4 hours tags: - ivas-linux-fast 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" - 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 @@ -1838,16 +1608,17 @@ ltv-asan: - ivas-linux-fast timeout: 4 hours 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" - 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 @@ -1856,11 +1627,11 @@ ltv-usan: - ivas-linux-fast timeout: 4 hours 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" - USE_LTV="--use_ltv" - <<: *sanitizer-selftest-anchor .sanitizer-test-template: extends: @@ -1893,7 +1664,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: @@ -1904,7 +1675,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: @@ -1915,7 +1686,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: @@ -1926,7 +1697,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: @@ -1937,7 +1708,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: @@ -1948,7 +1719,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: @@ -1959,7 +1730,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: @@ -1970,7 +1741,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: @@ -1981,7 +1752,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: @@ -1992,7 +1763,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: @@ -2003,7 +1774,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: @@ -2014,7 +1785,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: @@ -2025,7 +1796,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 --- @@ -2040,7 +1811,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: @@ -2050,7 +1821,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: @@ -2060,7 +1831,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: @@ -2070,7 +1841,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: @@ -2080,7 +1851,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: @@ -2090,7 +1861,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: @@ -2100,7 +1871,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: @@ -2110,7 +1881,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: @@ -2120,7 +1891,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: @@ -2130,7 +1901,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: @@ -2140,7 +1911,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: @@ -2150,7 +1921,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: @@ -2160,7 +1931,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: @@ -2171,7 +1942,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 @@ -2187,7 +1958,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: @@ -2197,7 +1968,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: @@ -2207,7 +1978,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: @@ -2218,7 +1989,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: @@ -2229,7 +2000,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 --- @@ -2244,7 +2015,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: @@ -2254,7 +2025,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: @@ -2264,7 +2035,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: @@ -2274,7 +2045,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: @@ -2284,7 +2055,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: @@ -2294,7 +2065,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: @@ -2304,7 +2075,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: @@ -2314,7 +2085,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: @@ -2324,7 +2095,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: @@ -2334,7 +2105,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: @@ -2344,7 +2115,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: @@ -2354,7 +2125,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: @@ -2364,7 +2135,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: @@ -2374,7 +2145,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: @@ -2384,7 +2155,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 @@ -2402,9 +2173,9 @@ coverage-test-on-main-scheduled: - if: $COVERAGE_TEST timeout: 3 hours script: - - *print-common-info - - *update-ltv-repo - - *copy-ltv-files-to-testv-dir + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh + - 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 @@ -2509,8 +2280,9 @@ coverage-test-on-main-scheduled: timeout: 3 hours 30 minutes stage: test before_script: - - *print-common-info - - *update-ltv-repo + - !reference [.job-linux, before_script] + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - *complexity-measurements-setup allow_failure: exit_codes: @@ -2827,8 +2599,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: diff --git a/.gitlab-ci/variables.yml b/.gitlab-ci/variables.yml new file mode 100644 index 0000000000000000000000000000000000000000..50f6f405c03d899f85761e03c765faaf97156205 --- /dev/null +++ b/.gitlab-ci/variables.yml @@ -0,0 +1,28 @@ +variables: + EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test" + EVS_BE_WIN_TEST_DIR: "C:/Users/gitlab-runner/testvec" + PROCESSING_SCRIPTS_BIN_DIR: "/test-bin" + SANITIZER_TESTS: "CLANG1 CLANG2 CLANG3" + OUT_FORMATS_CHANNEL_BASED: "stereo mono 5_1 5_1_2 5_1_4 7_1 7_1_4" + OUT_FORMATS_SCENE_BASED: "FOA HOA2 HOA3" + OUT_FORMATS_BINAURAL: "BINAURAL BINAURAL_ROOM_IR BINAURAL_ROOM_REVERB" + OUT_FORMATS_ALL: "$OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT" + MANUAL_PIPELINE_TYPE: + description: "Type for the manual pipeline run. Use 'test-be-release' to run BE test against release codec." + value: 'default' + options: + - 'default' + - 'test-be-release' + - 'test-long-self-test' + - 'ivas-conformance' + - 'ivas-conformance-linux' + - 'check-clipping' + - 'test-branch-vs-input-passthrough' + + 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: ""