diff --git a/includes/build-jobs.yml b/includes/build-jobs.yml index 508705e991bb26a81afe0d512131f8da9d4224f1..6c973c85e37eeda6f8f44e50469c06f0430810cf 100644 --- a/includes/build-jobs.yml +++ b/includes/build-jobs.yml @@ -112,7 +112,8 @@ build-codec-windows-msbuild: rules: - if: $MANUAL_PIPELINE_TYPE == 'long-term-logs' || $MANUAL_PIPELINE_TYPE == 'backup-long-term-logs' || $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux' || $UPDATE_PAGES || $MANUAL_PIPELINE_TYPE == 'complexity' || $MEASURE_COMPLEXITY_LINUX when: never - - if: $CI_PIPELINE_SOURCE == 'web' + # - if: $CI_PIPELINE_SOURCE == 'web' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE != 'loudness' - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - if: $CI_PIPELINE_SOURCE == 'schedule' diff --git a/includes/loudness-jobs.yml b/includes/loudness-jobs.yml new file mode 100644 index 0000000000000000000000000000000000000000..f30cb83f2a03600fdbf788da5e2ead0d1c36cb76 --- /dev/null +++ b/includes/loudness-jobs.yml @@ -0,0 +1,108 @@ +loudness-measurement: + tags: + - processing-scripts-linux + + extends: + - .test-job-linux-needs-testv-dir + + stage: test + timeout: 24 hours + rules: + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'loudness' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'loudness-measurement-only' + + variables: + FORMAT_LIST: $LOUDNESS_FORMATS + CONFIG_JSON: $LOUDNESS_CONFIG + + allow_failure: + exit_codes: + - 123 + + script: + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh + - set -x + - echo "Using formats ${FORMAT_LIST}" + - echo "Using config ${CONFIG_JSON}" + - git clone --single-branch --branch main https://gitlab-ci-token:${CI_JOB_TOKEN}@forge.3gpp.org/rep/ivas-codec-pc/ivas-processing-scripts.git + - make -j + - | + for fmt in ${FORMAT_LIST}; + do + ./scripts/runIvasCodec.py -z console -p ${CONFIG_JSON} -x ${fmt}_b | tee -a smoke_test_output.txt + done + - ./scripts/get_loudness_data.py ${CONFIG_JSON} --formats ${FORMAT_LIST} + + artifacts: + name: "loudness-measurements--sha-$CI_COMMIT_SHORT_SHA--results" + when: always + expire_in: 2 weeks + paths: + - loudness.csv + - smoke_test_output.txt + + expose_as: "loudness measurements" + +loudness-analysis: + tags: + - processing-scripts-linux + + extends: + - .test-job-linux-needs-testv-dir + + stage: compare + rules: + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'loudness' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'loudness-analysis-only' + + needs: + - job: loudness-measurement + + artifacts: true + optional: true + before_script: + - !reference [.test-job-linux-needs-testv-dir, before_script] + - | + if [ ! -f "loudness.csv" ]; then + echo "No loudness.csv found in current pipeline, fetching from last successful measurement job..." + + job_id=$(python3 ci/get_id_of_last_job_occurence.py $CI_COMMIT_REF_NAME "loudness-measurement" $CI_PROJECT_ID --success_only) + echo "Found job ID: $job_id" + + if [ "$JOB_ID_INJECT" != "" ]; then + job_id=$JOB_ID_INJECT + echo "Using injected job ID: $job_id" + fi + + if [ "$job_id" == "-1" ]; then + echo "ERROR: No successful loudness-measurement job found on branch $CI_COMMIT_REF_NAME" + exit 1 + fi + + # Download and extract artifacts + curl --silent --show-error --request GET "$CI_API_V4_URL/projects/$CI_PROJECT_ID/jobs/$job_id/artifacts" --output artifacts.zip + unzip -qq artifacts.zip || true + + if [ ! -f "loudness.csv" ]; then + echo "ERROR: loudness.csv not found in artifacts from job $job_id" + exit 1 + fi + + echo "Successfully fetched loudness.csv from job $job_id" + else + echo "loudness.csv found in current pipeline artifacts" + fi + script: + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh + - set -x + - git clone --single-branch --branch main https://gitlab-ci-token:${CI_JOB_TOKEN}@forge.3gpp.org/rep/ivas-codec-pc/ivas-processing-scripts.git + - ./scripts/parse_loudness_data.py + + artifacts: + name: "loudness-analysis--sha-$CI_COMMIT_SHORT_SHA--results" + when: always + expire_in: 2 weeks + paths: + - plots/ + + expose_as: "loudness analysis results" diff --git a/main-float.yml b/main-float.yml index 0c06a42ab6bef7d6813824ee351e58deb8644ba0..1099672e2a79568ee5f69a2603d1d01ec263a910 100644 --- a/main-float.yml +++ b/main-float.yml @@ -3,6 +3,7 @@ include: - local: includes/default-variables.yml - local: includes/job-templates.yml - local: includes/complexity-jobs.yml + - local: includes/loudness-jobs.yml - local: includes/smoke-test.yml - local: includes/build-jobs.yml - local: includes/rules.yml @@ -33,23 +34,48 @@ variables: 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' + value: "default" options: - - 'default' - - 'test-be-release' - - 'test-long-self-test' - - 'ivas-conformance' - - 'ivas-conformance-linux' - - 'check-clipping' - - 'test-branch-vs-input-passthrough' - - 'coverage' - - 'complexity' + - "default" + - "test-be-release" + - "test-long-self-test" + - "ivas-conformance" + - "ivas-conformance-linux" + - "check-clipping" + - "test-branch-vs-input-passthrough" + - "coverage" + - "complexity" + - "loudness" + - "loudness-measurement-only" + - "loudness-analysis-only" PYTEST_ARGS: "" COVERAGE_OUTPUT_FILE_STV: "coverage-stv.info" COVERAGE_OUTPUT_FILE_LTV: "coverage-ltv.info" COVERAGE_OUTPUT_FILE_CONFORMANCE: "coverage-conformance.info" COVERAGE_OUTPUT_FILE_MERGED: "coverage-merged.info" + LOUDNESS_CONFIG: + description: "Config JSON file path (needs MANUAL_PIPELINE_TYPE loudness*)" + value: "scripts/config/ci_loudness_linux.json" + options: + # currently dont work due to inconsistent metadata naming + # - "scripts/config/ci_linux.json" + # - "scripts/config/ci_linux_ltv.json" + - "scripts/config/ci_loudness_linux.json" + + LOUDNESS_FORMATS: + description: "Space-separated list of formats to test (needs MANUAL_PIPELINE_TYPE loudness*)" + value: > + mono stereo + MC_5_1 MC_5_1_2 MC_5_1_4 MC_7_1 MC_7_1_4 + ISM1 ISM2 ISM3 ISM4 + FOA HOA2 HOA3 + MASA_1TC MASA_2TC + OMASA_ISM1_1TC OMASA_ISM2_1TC OMASA_ISM3_1TC OMASA_ISM4_1TC + OMASA_ISM1_2TC OMASA_ISM2_2TC OMASA_ISM3_2TC OMASA_ISM4_2TC + OSBA_ISM1_FOA OSBA_ISM2_FOA OSBA_ISM3_FOA OSBA_ISM4_FOA + OSBA_ISM1_HOA2 OSBA_ISM2_HOA2 OSBA_ISM3_HOA2 OSBA_ISM4_HOA2 + OSBA_ISM1_HOA3 OSBA_ISM2_HOA3 OSBA_ISM3_HOA3 OSBA_ISM4_HOA3 # This sets when pipelines are created. Jobs have more specific rules to restrict them. workflow: @@ -96,7 +122,16 @@ workflow: IVAS_PIPELINE_NAME: "Coverage measurement" - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'complexity' variables: - IVAS_PIPELINE_NAME: 'Complexity Measurement on $CI_COMMIT_BRANCH' + IVAS_PIPELINE_NAME: "Complexity Measurement on $CI_COMMIT_BRANCH" + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'loudness' + variables: + IVAS_PIPELINE_NAME: "Loudness measurement and analysis on $CI_COMMIT_BRANCH" + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'loudness-measurement-only' + variables: + IVAS_PIPELINE_NAME: "Loudness measurement on $CI_COMMIT_BRANCH" + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'loudness-analysis-only' + variables: + IVAS_PIPELINE_NAME: "Loudness analysis on $CI_COMMIT_BRANCH" # --------------------------------------------------------------- # Rules templates @@ -112,8 +147,8 @@ workflow: # These can be used later on to do common tasks -.merge-request-comparison-setup-codec: &merge-request-comparison-setup-codec - ### build test binaries, initial clean for paranoia reasons +.merge-request-comparison-setup-codec: + &merge-request-comparison-setup-codec ### build test binaries, initial clean for paranoia reasons - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/disable-debugging-macro.sh - make clean - mkdir build @@ -308,8 +343,8 @@ basop-compat-stv: parallel: matrix: - TEST_SUITE: - - tests/codec_be_on_mr_nonselection/test_param_file.py - - tests/renderer_short/test_renderer.py + - tests/codec_be_on_mr_nonselection/test_param_file.py + - tests/renderer_short/test_renderer.py script: - exit 0