Commit e2f388a3 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'ci/main-pc-pipeline' into 'main-pc'

[CI] Add jobs to be run on MRs to main-pc

See merge request !1021
parents 2ef3ede8 66881a26
Loading
Loading
Loading
Loading
+61 −15
Original line number Diff line number Diff line
@@ -312,6 +312,13 @@ stages:
    - if: $CI_PIPELINE_SOURCE == 'push'
      when: never

.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

.rules-pytest-long:
  rules:
    - if: $PYTEST_MLD_LONG # Set by scheduled pipeline
@@ -376,6 +383,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:
@@ -393,7 +407,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
@@ -545,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
@@ -828,6 +841,32 @@ clang-format-check:
    name: "$ARTIFACT_BASE_NAME"
    expose_as: "formatting patch"

# from float
# 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
  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
    # TODO: run full test again once the custom binary files are supported
    - 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
      - 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
# ---------------------------------------------------------------
@@ -865,7 +904,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
@@ -886,11 +924,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
@@ -957,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-short
    - .rules-mr-to-main-or-main-pc-or-manual
    - .test-job-linux
  before_script:
    - USE_LTV=0
@@ -969,7 +1015,7 @@ ivas-pytest-compare_to_main-short-dec:

ivas-pytest-compare_to_main-short-dec-lev-10:
  extends:
    - .rules-pytest-to-main-short
    - .rules-mr-to-main-or-main-pc-or-manual
    - .test-job-linux
  before_script:
    - USE_LTV=0
@@ -981,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-short
    - .rules-mr-to-main-or-main-pc-or-manual
    - .test-job-linux
  before_script:
    - USE_LTV=0
@@ -999,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-ref-enc-short-temp
    - .rules-mr-to-main-or-main-pc-or-manual
    - .test-job-linux
  before_script:
    - USE_LTV=0
@@ -1012,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-ref-enc-short-temp
    - .rules-mr-to-main-or-main-pc-or-manual
    - .test-job-linux    
  before_script:
    - USE_LTV=0
@@ -1025,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-ref-enc-short-temp
    - .rules-mr-to-main-or-main-pc-or-manual
    - .test-job-linux    
  before_script:
    - USE_LTV=0
@@ -1322,7 +1368,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
@@ -1428,7 +1474,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"
@@ -1469,7 +1515,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