Commit c349af39 authored by vaclav's avatar vaclav
Browse files

- Merge branch 'main' into 118-bitrate-range-for-dtx-support

- add comments
parents 253009ca e3510c80
Loading
Loading
Loading
Loading
Loading
+215 −7
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ workflow:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # Runs for merge requests
    - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Pushes to main
    - if: $CI_PIPELINE_SOURCE == 'schedule' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Scheduled in main
    - if: $CI_PIPELINE_SOURCE == "web"
    - if: $CI_PIPELINE_SOURCE == 'web' # for testing

stages:
  - maintenance
@@ -28,6 +28,7 @@ stages:
  - test
  - compare
  - validate
  - deploy

# ---------------------------------------------------------------
# Generic script anchors
@@ -420,7 +421,7 @@ external-renderer-pytest-on-merge-request:
    - *print-common-info

    # some helper variables - "|| true" to prevent failures from grep not finding anything
    - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[rend(erer)*[ -]*non[ -]*be\]") || true
    - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[rend\(erer\)*[ -]*non[ -]*be\]") || true
    # TODO: needs splitting the test between reference and cut generation
    #- ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true

@@ -442,7 +443,7 @@ external-renderer-pytest-on-merge-request:

    # run test
    - exit_code=0
    - python3 -m pytest -q --log-level ERROR -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer_be_comparison.py || exit_code=$?
    - 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_be_comparison.py || exit_code=$?
    - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true

    - *merge-request-comparison-check
@@ -455,6 +456,7 @@ external-renderer-pytest-on-merge-request:
    when: always
    paths:
      - report-junit.xml
      - report.html
    expose_as: "pytest external renderer results"
    reports:
      junit:
@@ -491,7 +493,7 @@ ivas-pytest-on-merge-request:

    ### run pytest
    - exit_code=0
    - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$?
    - python3 -m pytest tests -v --html=report.html --self-contained-html --junit-xml=report-junit.xml || exit_code=$?
    - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true

    - *merge-request-comparison-check
@@ -504,6 +506,7 @@ ivas-pytest-on-merge-request:
    when: always
    paths:
      - report-junit.xml
      - report.html
    expose_as: "pytest ivas results"
    reports:
      junit:
@@ -536,7 +539,7 @@ evs-pytest-on-merge-request:

    ### run pytest for EVS cases
    - exit_code=0
    - python3 -m pytest tests/test_param_file.py -v --param_file scripts/config/self_test_evs.prm --junit-xml=report-junit-evs.xml || exit_code=$?
    - python3 -m pytest tests/test_param_file.py -v --param_file scripts/config/self_test_evs.prm --html=report.html --self-contained-html --junit-xml=report-junit-evs.xml || exit_code=$?
    - zero_errors=$(cat report-junit-evs.xml | grep -c 'errors="0"') || true

    - *merge-request-comparison-check
@@ -549,6 +552,7 @@ evs-pytest-on-merge-request:
    when: always
    paths:
      - report-junit-evs.xml
      - report.html
    expose_as: "pytest evs results"
    reports:
      junit:
@@ -690,7 +694,7 @@ codec-comparison-on-main-push:

    ### run pytest
    - exit_code=0
    - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$?
    - python3 -m pytest tests -v --html=report.html --self-contained-html --junit-xml=report-junit.xml || exit_code=$?
    - if [ $exit_code -eq 1 ] && [ $non_be_flag == 0 ]; then echo "pytest run had failures and non-BE flag not present"; exit $EXIT_CODE_FAIL; fi
    - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true
    - if [ $exit_code -eq 1 ] && [ $zero_errors == 1 ]; then echo "pytest run had failures, but no errors and non-BE flag present"; exit $EXIT_CODE_NON_BE; fi
@@ -703,6 +707,7 @@ codec-comparison-on-main-push:
    when: always
    paths:
      - report-junit.xml
      - report.html
    expose_as: "Results of comparison to previous merge commit"
    reports:
      junit: report-junit.xml
@@ -898,7 +903,7 @@ coverage-test-on-main-scheduled:
    - .test-job-linux-needs-testv-dir
    - .rules-main-scheduled
  tags:
    - coverage-test
    - ivas-linux
  stage: test
  rules:
    # only run in scheduled pipeline that passes this env vars
@@ -919,10 +924,213 @@ coverage-test-on-main-scheduled:
      - coverage.info
      - coverage


# ---------------------------------------------------------------
# Complexity measurement jobs
# ---------------------------------------------------------------

.complexity-measurements-setup: &complexity-measurements-setup
  # create necessary environment
  - mkdir -p wmops/logs

  - job_id=$(python3 ci/get_id_of_last_job_occurence.py $CI_COMMIT_REF_NAME $CI_JOB_NAME)
  - echo $job_id
  - curl --request GET "https://forge.3gpp.org/rep/api/v4/projects/$CI_PROJECT_ID/jobs/$job_id/artifacts" --output artifacts.zip
  - unzip artifacts.zip || true # this may fail on first run, when there are no artifacts there and the zip file is actually just "404"-html
  - ls
  - public_dir="$CI_JOB_NAME-public"
  # if is needed to catch case when no artifact is there (first run), similarly as above
  - if [[ -d $public_dir ]]; then mv $public_dir/* wmops/;  fi
  - ls wmops
  - rm artifacts.zip
  - rm -rf $public_dir

.complexity-measurements-prepare-artifacts: &complexity-measurements-prepare-artifacts
  # prepare artifacts -> move to public directory
  - public_dir="$CI_JOB_NAME-public"
  - mkdir $public_dir
  - mv -f wmops/log_*_all.txt wmops/*.js ${public_dir}/
  # move logfiles for links
  - mkdir $public_dir/logs
  # first move logs for "native" sampling rate
  - log_files=$(cat $public_dir/graphs_wmops_flc.js | grep logFile | sed "s/.*\(wmops_newsletter_.*\.csv\).*/\1/g")
  - echo $log_files
  - ls wmops/logs
  - for f in $log_files; do [ -f wmops/logs/$f ] && mv wmops/logs/$f $public_dir/logs/$f; done
  # copy index page blueprint
  - cp ci/complexity_measurements/index_complexity.html ${public_dir}/index.html
  # patch the format in the title
  - sed -i "s/IVAS FORMAT/IVAS $in_format to $out_format/g" ${public_dir}/index.html
  # do separately here to avoid overwrite complaints by mv
  - mv -f ci/complexity_measurements/style.css ${public_dir}/

.complexity-template:
  extends:
    # still needed as long as no long MASA testvectors are there
    - .test-job-linux-needs-testv-dir
  tags:
    - test-complexity-measurement
  timeout: 3 hours 30 minutes
  stage: test
  artifacts:
    name: "$CI_JOB_NAME--$CI_COMMIT_REF_NAME--sha-$CI_COMMIT_SHA"
    paths:
      - $CI_JOB_NAME-public

complexity-stereo-in-stereo-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
  script:
    - *print-common-info
    - *update-ltv-repo
    - *complexity-measurements-setup
    - in_format=stereo
    - out_format=stereo
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format"
    - *complexity-measurements-prepare-artifacts

complexity-ism-in-binaural-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 1 hour
  script:
    - *print-common-info
    - *update-ltv-repo
    - *complexity-measurements-setup
    - in_format=ISM
    - out_format=BINAURAL
    - bash ci/complexity_measurements/getWmops.sh "ISM1 ISM2 ISM3 ISM4" "$out_format"
    - *complexity-measurements-prepare-artifacts

complexity-sba-hoa3-in-hoa3-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 2 hours 30 minutes
  script:
    - *print-common-info
    - *update-ltv-repo
    - *complexity-measurements-setup
    - in_format=SBA
    - out_format=HOA3
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format"
    - *complexity-measurements-prepare-artifacts

complexity-mc-in-7_1_4-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 4 hours
  script:
    - *print-common-info
    - *update-ltv-repo
    - *complexity-measurements-setup
    - in_format=MC
    - out_format=7_1_4
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format"
    - *complexity-measurements-prepare-artifacts

complexity-masa-in-7_1_4-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 7 hours 30 minutes
  script:
    - *print-common-info
    - *update-ltv-repo
    - *complexity-measurements-setup
    - in_format=MASA
    - out_format=7_1_4
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format"
    - *complexity-measurements-prepare-artifacts

complexity-StereoDmxEVS-stereo-in-mono-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 8 hours 30 minutes
  script:
    - *print-common-info
    - *update-ltv-repo
    - *complexity-measurements-setup
    - in_format=StereoDmxEVS
    - out_format=mono
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format"
    - *complexity-measurements-prepare-artifacts

# ---------------------------------------------------------------
# Other jobs
# ---------------------------------------------------------------

# job that sets up gitlab pages website
# is run on a separate schedule and collects artifacts from other jobs (currently
# only the complexity measurements) multiple times a day
pages:
  stage: deploy
  tags:
    - ivas-linux
  rules:
    - if: $UPDATE_PAGES
    # TODO: add coverage job
  script:

    - API_URL_BASE=https://forge.3gpp.org/rep/api/v4/projects/$CI_PROJECT_ID/jobs
    - branch=$CI_COMMIT_REF_NAME

    - mkdir public

    ### fetch artifacts from latest run of complexity jobs
    - job_id=$(python3 ci/get_id_of_last_job_occurence.py $branch complexity-stereo-in-stereo-out)
    - echo $job_id
    - echo "$API_URL_BASE/$job_id/artifacts"
    - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output artifacts_comp_stereo.zip
    - cat artifacts_comp_stereo.zip
    - unzip -o artifacts_comp_stereo.zip
    - mv complexity-stereo-in-stereo-out-public ./public/

    - job_id=$(python3 ci/get_id_of_last_job_occurence.py $branch complexity-ism-in-binaural-out)
    - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output artifacts_comp_ism.zip
    - unzip -o artifacts_comp_ism.zip
    - mv complexity-ism-in-binaural-out-public ./public/

    - job_id=$(python3 ci/get_id_of_last_job_occurence.py $branch complexity-sba-hoa3-in-hoa3-out)
    - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output artifacts_comp_sba.zip
    - unzip -o artifacts_comp_sba.zip
    - mv complexity-sba-hoa3-in-hoa3-out-public ./public/

    - job_id=$(python3 ci/get_id_of_last_job_occurence.py $branch complexity-mc-in-7_1_4-out)
    - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output artifacts_comp_mc.zip
    - unzip -o artifacts_comp_mc.zip
    - mv complexity-mc-in-7_1_4-out-public ./public/

    - job_id=$(python3 ci/get_id_of_last_job_occurence.py $branch complexity-masa-in-7_1_4-out)
    - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output artifacts_comp_masa.zip
    - unzip -o artifacts_comp_masa.zip
    - mv complexity-masa-in-7_1_4-out-public ./public/

    - job_id=$(python3 ci/get_id_of_last_job_occurence.py $branch complexity-StereoDmxEVS-stereo-in-mono-out)
    - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output artifacts_comp_StereoDmxEVS.zip
    - unzip -o artifacts_comp_StereoDmxEVS.zip
    - mv complexity-StereoDmxEVS-stereo-in-mono-out-public ./public/

    - cp ci/index-pages.html public/index.html
  artifacts:
    paths:
      - public

# Pull state of a branch on 3GPP repo, push to a mirror repo.
pull-from-3gpp-forge:
  stage: maintenance
+1 −1
Original line number Diff line number Diff line
@@ -314,10 +314,10 @@
    <ClCompile Include="..\lib_dec\ivas_stereo_mdct_stereo_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_switching_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_td_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_td_low_rate_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_svd_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_tcx_core_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_td_decorr.c" />
    <ClCompile Include="..\lib_dec\ivas_td_low_rate_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_vbap.c" />
    <ClCompile Include="..\lib_dec\jbm_jb4sb.c" />
    <ClCompile Include="..\lib_dec\jbm_jb4_circularbuffer.c" />
+3 −9
Original line number Diff line number Diff line
@@ -466,9 +466,6 @@
    <ClCompile Include="..\lib_dec\ivas_stereo_td_dec.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_dec\ivas_stereo_td_low_rate_dec.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_dec\ivas_tcx_core_dec.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
@@ -476,15 +473,9 @@
    <ClCompile Include="..\lib_dec\ivas_agc_dec.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_dec\ivas_spar_foa_md_dec.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_dec\ivas_td_decorr.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_dec\ivas_spar_foa_dec.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_dec\ivas_pca_dec.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
@@ -506,6 +497,9 @@
    <ClCompile Include="..\lib_dec\ivas_corecoder_dec_reconfig.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_dec\ivas_td_low_rate_dec.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_dec\jbm_jb4_inputbuffer.h">
+2 −2
Original line number Diff line number Diff line
@@ -330,8 +330,8 @@
    <ClCompile Include="..\lib_enc\ivas_stereo_switching_enc.c" />
    <ClCompile Include="..\lib_enc\ivas_stereo_td_analysis.c" />
    <ClCompile Include="..\lib_enc\ivas_stereo_td_enc.c" />
    <ClCompile Include="..\lib_enc\ivas_stereo_td_low_rate_enc.c" />
    <ClCompile Include="..\lib_enc\ivas_tcx_core_enc.c" />
    <ClCompile Include="..\lib_enc\ivas_td_low_rate_enc.c" />
    <ClCompile Include="..\lib_enc\lead_indexing.c" />
    <ClCompile Include="..\lib_enc\lib_enc.c" />
    <ClCompile Include="..\lib_enc\long_enr.c" />
+3 −3
Original line number Diff line number Diff line
@@ -550,9 +550,6 @@
    <ClCompile Include="..\lib_enc\ivas_stereo_td_enc.c">
      <Filter>enc_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_enc\ivas_stereo_td_low_rate_enc.c">
      <Filter>enc_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_enc\ivas_tcx_core_enc.c">
      <Filter>enc_ivas_c</Filter>
    </ClCompile>
@@ -584,6 +581,9 @@
    <ClCompile Include="..\lib_enc\ivas_corecoder_enc_reconfig.c">
      <Filter>enc_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_enc\ivas_td_low_rate_enc.c">
      <Filter>enc_ivas_c</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_enc\ivas_stat_enc.h">
Loading