Commit 4a65e671 authored by Jan Kiene's avatar Jan Kiene
Browse files

move merge-request-comparison-check into script

parent 2f0f4976
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -85,14 +85,6 @@ workflow:
  - (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 '<TreatWarningAsError>false', '<TreatWarningAsError>true' | Set-Content -Path $_.FullName }

# From float CI
.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

.rules-merge-request:
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
@@ -1246,7 +1238,7 @@ renderer-pytest-on-merge-request:

    - python3 scripts/parse_xml_report.py $REPORT_XML $REPORT_CSV

    - *merge-request-comparison-check
    - source "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/merge-request-comparison-check.sh

  allow_failure:
    exit_codes:
@@ -1312,7 +1304,7 @@ ivas-pytest-on-merge-request:

    - python3 scripts/parse_xml_report.py $REPORT_XML $REPORT_CSV

    - *merge-request-comparison-check
    - source "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/merge-request-comparison-check.sh

  allow_failure:
    exit_codes:
@@ -1383,7 +1375,7 @@ ivas-pytest-on-merge-request:

    - python3 scripts/parse_xml_report.py $REPORT_XML $REPORT_CSV

    - *merge-request-comparison-check
    - source "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/merge-request-comparison-check.sh

  allow_failure:
    exit_codes:
+0 −0

Empty file deleted.

+21 −0
Original line number Diff line number Diff line
#! /bin/bash

# This needs to "source"'d as this reuses vars from the job

set +x
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

echo "All is bit-exact"
exit 0