Commit 37d88fc8 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'update-basop-ci-branch' into 'basop-ci-branch'

Update basop ci branch

See merge request !2277
parents 2cfe375f 91609ef9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ IVAS_cod
IVAS_dec
IVAS_rend
ISAR_post_rend
ambi_converter
obj/
*.a
*.o
@@ -18,6 +19,7 @@ IVAS_cod.exe
IVAS_dec.exe
IVAS_rend.exe
ISAR_post_rend.exe
ambi_converter.exe
*.user
.vs/
Debug_*/
+135 −116
Original line number Diff line number Diff line
@@ -554,7 +554,7 @@ renderer-smoke-test:
    - .rules-merge-request-to-main
  needs: ["build-codec-linux-cmake"]
  stage: test
  timeout: "30 minutes"
  timeout: "90 minutes"
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    expire_in: 1 week
@@ -568,12 +568,6 @@ renderer-smoke-test:
  before_script:
    - cmake -B cmake-build -G "Unix Makefiles" -DCLANG=$SANITIZER_BUILD_STRING -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true
    - cmake --build cmake-build -- -j
    # rename files to fit naming convention
    # en- and decoder needed because of split rendering testcases
    - mv IVAS_cod IVAS_cod_ref
    - mv IVAS_dec IVAS_dec_ref
    - mv IVAS_rend IVAS_rend_ref
    - mv ISAR_post_rend ISAR_post_rend_ref
    - testcase_timeout=180

# test renderer executable with cmake + asan
@@ -583,7 +577,7 @@ renderer-asan:
  variables:
    SANITIZER_BUILD_STRING: "asan"
  script:
    - python3 -m pytest -q --tb=no -n auto --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/renderer/test_renderer.py tests/split_rendering/test_split_rendering.py --create_ref --testcase_timeout=$testcase_timeout
    - python3 -m pytest -q --tb=no -n auto --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/renderer/test_renderer.py tests/split_rendering/test_split_rendering.py --testcase_timeout=$testcase_timeout
  artifacts:
    expose_as: "renderer asan result"

@@ -595,7 +589,7 @@ renderer-msan:
  variables:
    SANITIZER_BUILD_STRING: "msan"
  script:
    - python3 -m pytest -q --tb=no -n auto --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/renderer/test_renderer.py tests/split_rendering/test_split_rendering.py --create_ref --testcase_timeout=$testcase_timeout
    - python3 -m pytest -q --tb=no -n auto --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/renderer/test_renderer.py tests/split_rendering/test_split_rendering.py --testcase_timeout=$testcase_timeout
  artifacts:
    expose_as: "renderer msan result"

@@ -607,7 +601,7 @@ renderer-usan:
  variables:
    SANITIZER_BUILD_STRING: "usan"
  script:
    - UBSAN_OPTIONS=suppressions=scripts/ubsan.supp,report_error_type=1 python3 -m pytest -q --tb=no -n auto --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/renderer/test_renderer.py tests/split_rendering/test_split_rendering.py --create_ref --testcase_timeout=$testcase_timeout
    - UBSAN_OPTIONS=suppressions=scripts/ubsan.supp,report_error_type=1 python3 -m pytest -q --tb=no -n auto --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/renderer/test_renderer.py tests/split_rendering/test_split_rendering.py --testcase_timeout=$testcase_timeout
  artifacts:
    expose_as: "renderer usan result"

@@ -685,6 +679,28 @@ split-rendering-smoke-test:
      junit:
        - report-junit.xml

# test split rendering in VoIP mode against BINAURAL output
split-rendering-voip-be-to-binaural:
  extends:
    - .test-job-linux
    - .rules-merge-request-to-main
  needs: ["build-codec-linux-make"]
  stage: test
  script:
    - make -j
    - testcase_timeout=30
    - python3 -m pytest -q -n auto -rA --junit-xml=report-junit.xml tests/split_rendering/test_voip_be_splitrend_vs_binaural.py --testcase_timeout=$testcase_timeout
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    expire_in: 1 week
    when: always
    paths:
      - report-junit.xml
    expose_as: "VoIP split rendering vs BINAURAL make pytest results"
    reports:
      junit:
        - report-junit.xml

lc3-wrapper-unit-test:
  extends:
    - .test-job-linux
@@ -1098,113 +1114,116 @@ be-2-evs-windows:
    - cd evs_be_win_test
    - python ../ci/run_evs_be_win_test.py

# TODO: turn into manual job if needed
# check bitexactness to EVS
be-2-evs-linux:
  extends:
    - .test-job-linux
    - .rules-main-push
  tags:
    - be-2-evs-temp
  stage: test
  needs: ["build-codec-linux-cmake"]
  timeout: "20 minutes" # To be revisited
  script:
    - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh

    - mkdir build
    - cd build
    - cmake ..
    - make -j
    - cd ..

    # copy over to never change the testvector dir
    - cp -r $EVS_BE_TEST_DIR ./evs_be_test
    - cp build/IVAS_cod ./evs_be_test/bin/EVS_cod
    - cp build/IVAS_dec ./evs_be_test/bin/EVS_dec

    - cd evs_be_test
    - python3 ../ci/run_evs_be_test.py

codec-comparison-on-main-push:
  extends:
    - .test-job-linux-needs-testv-dir
    - .rules-main-push
  stage: compare
  needs: ["build-codec-linux-cmake"]
  timeout: "30 minutes" # To be revisited
  script:
    - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh
    - latest_commit=$(git rev-parse HEAD) # Latest commit
    - 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

    # Rest is more or less placeholder adapted from MR self test. This should be replaced with more complex tests.

    ### build test binaries, initial clean for paranoia reasons
    - make clean
    - mkdir build
    - cd build
    - cmake ..
    - make -j
    - mv IVAS_cod ../IVAS_cod_test
    - mv IVAS_dec ../IVAS_dec_test
    - cd ..
    - rm -rf build/*

    ### compare to the previous merge commit in the main branch
    - git fetch origin main
    - git checkout $previous_merge_commit
    - echo "Building reference codec at commit $previous_merge_commit"

    ### build reference binaries
    - cd build
    - cmake ..
    - make -j
    - mv IVAS_cod ../IVAS_cod_ref
    - mv IVAS_dec ../IVAS_dec_ref
    - cd ..

    # helper variable - "|| true" to prevent failures from grep not finding anything
    # write to temporary file as workaround for failures observed with piping echo
    - echo $CI_COMMIT_MESSAGE > tmp.txt
    - non_be_flag=$(grep -c --ignore-case "\[non[ -]*be\]" tmp.txt) || true
    - ref_using_main=$(grep -c --ignore-case "\[ref[ -]*using[ -]*main\]" tmp.txt) || true

    ### re-checkout the latest commit in the main branch, if ref_using_main is not set
    - if [ $ref_using_main == 0 ]; then git checkout $latest_commit;fi

    ### prepare pytest
    # rename test binaries back
    - mv IVAS_cod_test IVAS_cod
    - mv IVAS_dec_test IVAS_dec
    # create references
    - testcase_timeout=60
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 --testcase_timeout=$testcase_timeout

    ### re-checkout the latest commit here, if ref_using_main is set
    - if [ $ref_using_main -eq 1 ]; then git checkout $latest_commit;fi

    ### run pytest
    - exit_code=0
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --testcase_timeout=$testcase_timeout || exit_code=$?
    - if [ $exit_code -ne 0 ] && [ $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 -ne 0 ] && [ $zero_errors == 1 ]; then echo "pytest run had failures, but no errors and non-BE flag present"; exit $EXIT_CODE_NON_BE; fi
    - if [ $exit_code -ne 0 ]; then echo "pytest run had errors"; exit $EXIT_CODE_FAIL; fi;
  allow_failure:
    exit_codes:
      - 123
  artifacts:
    name: "main-push--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    when: always
    paths:
      - report-junit.xml
      - report.html
    expose_as: "Results of comparison to previous merge commit"
    reports:
      junit: report-junit.xml
# be-2-evs-linux:
#   extends:
#     - .test-job-linux
#     - .rules-main-push
#   tags:
#     - be-2-evs-temp
#   stage: test
#   needs: ["build-codec-linux-cmake"]
#   timeout: "20 minutes" # To be revisited
#   script:
#     - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh
#
#     - mkdir build
#     - cd build
#     - cmake ..
#     - make -j
#     - cd ..
#
#     # copy over to never change the testvector dir
#     - cp -r $EVS_BE_TEST_DIR ./evs_be_test
#     - cp build/IVAS_cod ./evs_be_test/bin/EVS_cod
#     - cp build/IVAS_dec ./evs_be_test/bin/EVS_dec
#
#     - cd evs_be_test
#     - python3 ../ci/run_evs_be_test.py


# TODO: do we still need this?
# codec-comparison-on-main-push:
#   extends:
#     - .test-job-linux-needs-testv-dir
#     - .rules-main-push
#   stage: compare
#   needs: ["build-codec-linux-cmake"]
#   timeout: "30 minutes" # To be revisited
#   script:
#     - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh
#     - latest_commit=$(git rev-parse HEAD) # Latest commit
#     - 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
#
#     # Rest is more or less placeholder adapted from MR self test. This should be replaced with more complex tests.
#
#     ### build test binaries, initial clean for paranoia reasons
#     - make clean
#     - mkdir build
#     - cd build
#     - cmake ..
#     - make -j
#     - mv IVAS_cod ../IVAS_cod_test
#     - mv IVAS_dec ../IVAS_dec_test
#     - cd ..
#     - rm -rf build/*
#
#     ### compare to the previous merge commit in the main branch
#     - git fetch origin main
#     - git checkout $previous_merge_commit
#     - echo "Building reference codec at commit $previous_merge_commit"
#
#     ### build reference binaries
#     - cd build
#     - cmake ..
#     - make -j
#     - mv IVAS_cod ../IVAS_cod_ref
#     - mv IVAS_dec ../IVAS_dec_ref
#     - cd ..
#
#     # helper variable - "|| true" to prevent failures from grep not finding anything
#     # write to temporary file as workaround for failures observed with piping echo
#     - echo $CI_COMMIT_MESSAGE > tmp.txt
#     - non_be_flag=$(grep -c --ignore-case "\[non[ -]*be\]" tmp.txt) || true
#     - ref_using_main=$(grep -c --ignore-case "\[ref[ -]*using[ -]*main\]" tmp.txt) || true
#
#     ### re-checkout the latest commit in the main branch, if ref_using_main is not set
#     - if [ $ref_using_main == 0 ]; then git checkout $latest_commit;fi
#
#     ### prepare pytest
#     # rename test binaries back
#     - mv IVAS_cod_test IVAS_cod
#     - mv IVAS_dec_test IVAS_dec
#     # create references
#     - testcase_timeout=60
#     - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 --testcase_timeout=$testcase_timeout
#
#     ### re-checkout the latest commit here, if ref_using_main is set
#     - if [ $ref_using_main -eq 1 ]; then git checkout $latest_commit;fi
#
#     ### run pytest
#     - exit_code=0
#     - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --testcase_timeout=$testcase_timeout || exit_code=$?
#     - if [ $exit_code -ne 0 ] && [ $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 -ne 0 ] && [ $zero_errors == 1 ]; then echo "pytest run had failures, but no errors and non-BE flag present"; exit $EXIT_CODE_NON_BE; fi
#     - if [ $exit_code -ne 0 ]; then echo "pytest run had errors"; exit $EXIT_CODE_FAIL; fi;
#   allow_failure:
#     exit_codes:
#       - 123
#   artifacts:
#     name: "main-push--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
#     expire_in: 1 week
#     when: always
#     paths:
#       - report-junit.xml
#       - report.html
#     expose_as: "Results of comparison to previous merge commit"
#     reports:
#       junit: report-junit.xml


# ---------------------------------------------------------------
+8 −0
Original line number Diff line number Diff line
@@ -206,12 +206,20 @@ add_executable(ISAR_post_rend apps/isar_post_rend.c)
target_link_libraries(ISAR_post_rend lib_isar lib_util)
target_include_directories(ISAR_post_rend PRIVATE lib_isar)

add_executable(ambi_converter apps/ambi_converter.c)
  target_link_libraries(ambi_converter lib_util)
if(UNIX)
  target_link_libraries(ambi_converter m)
endif()
target_include_directories(ambi_converter PRIVATE lib_util)

if(COPY_EXECUTABLES_FROM_BUILD_DIR)
  # Optionally copy executables to the same place where Make puts them (useful for tests that expect executables in specific places)
  add_custom_command(TARGET IVAS_cod POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:IVAS_cod>" "${CMAKE_CURRENT_SOURCE_DIR}/")
  add_custom_command(TARGET IVAS_dec POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:IVAS_dec>" "${CMAKE_CURRENT_SOURCE_DIR}/")
  add_custom_command(TARGET IVAS_rend POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:IVAS_rend>" "${CMAKE_CURRENT_SOURCE_DIR}/")
  add_custom_command(TARGET ISAR_post_rend POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:ISAR_post_rend>" "${CMAKE_CURRENT_SOURCE_DIR}/")
  add_custom_command(TARGET ambi_converter POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:ambi_converter>" "${CMAKE_CURRENT_SOURCE_DIR}/")
  if (NOT WMOPS)
    add_custom_command(TARGET ivas_lc3plus_unit_test POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:ivas_lc3plus_unit_test>" "${CMAKE_CURRENT_SOURCE_DIR}/scripts/split_rendering/lc3plus_float")
  endif()
+7 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ CLI_APIDEC ?= IVAS_dec
CLI_APIENC   	?= IVAS_cod
CLI_APIREND  	?= IVAS_rend
CLI_APIPOSTREND ?= ISAR_post_rend
CLI_AMBICONVERT ?= ambi_converter
LIB_LIBCOM   	?= libivascom.a
LIB_LIBDEBUG 	?= libivasdebug.a
LIB_LIBDEC   	?= libivasdec.a
@@ -150,10 +151,12 @@ OBJS_LIBREND = $(addprefix $(OBJDIR)/,$(SRCS_LIBREND:.c=.o))
OBJS_LIBISAR     = $(addprefix $(OBJDIR)/,$(SRCS_LIBISAR:.c=.o))
OBJS_LC3PLUS     = $(addprefix $(OBJDIR)/,$(SRCS_LC3PLUS:.c=.o))
OBJS_LIBUTIL     = $(addprefix $(OBJDIR)/,$(SRCS_LIBUTIL:.c=.o))
OBJS_AMBICONVERT = $(OBJDIR)/ambi_convert.o
OBJS_CLI_APIDEC  = $(OBJDIR)/decoder.o
OBJS_CLI_APIENC  = $(OBJDIR)/encoder.o
OBJS_CLI_APPREND = $(OBJDIR)/renderer.o
OBJS_CLI_APPPOSTREND = $(OBJDIR)/isar_post_rend.o
OBJS_CLI_AMBICONVERT = $(OBJDIR)/ambi_converter.o

DEPS = $(addprefix $(OBJDIR)/,$(SRCS_LIBCOM:.c=.P) $(SRCS_LIBDEBUG:.c=.P) $(SRCS_LIBDEC:.c=.P) \
  $(SRCS_LIBENC:.c=.P) $(SRCS_LIBUTIL:.c=.P) $(SRCS_LIBREND:.c=.P) $(SRCS_LIBISAR:.c=.P) \
@@ -204,13 +207,16 @@ $(CLI_APIREND): $(OBJS_CLI_APPREND) $(LIB_LIBREND) $(LIB_LIBCOM) $(LIB_LIBUTIL)
$(CLI_APIPOSTREND): $(OBJS_CLI_APPPOSTREND) $(LIB_LIBISAR) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LC3PLUS)
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APPPOSTREND) -L. -lisar -livasutil -livasdebug -livascom -llc3plus $(LDLIBS) -o $(CLI_APIPOSTREND)

$(CLI_AMBICONVERT): $(OBJS_CLI_AMBICONVERT) $(OBJS_AMBICONVERT)
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_AMBICONVERT) $(OBJS_AMBICONVERT) $(LDLIBS) -o $(CLI_AMBICONVERT)

libs: $(LIB_LIBENC) $(LIB_LIBDEBUG) $(LIB_LIBCOM) $(LIB_LIBDEC) $(LIB_LIBREND) $(LIB_LIBISAR) $(LIB_LC3PLUS) $(LIB_LIBUTIL)

clean: 
	$(QUIET)$(RM) $(OBJS_LIBENC) $(OBJS_LIBDEC) $(DEPS)
	$(QUIET)$(RM) $(DEPS:.P=.d)
	$(QUIET)test ! -d $(OBJDIR) || rm -rf $(OBJDIR)
	$(QUIET)$(RM) $(CLI_APIENC) $(CLI_APIDEC) $(CLI_APIREND) $(CLI_APIPOSTREND) $(LIB_LIBENC) $(LIB_LIBDEBUG) $(LIB_LIBCOM) $(LIB_LIBDEC) $(LIB_LIBUTIL) $(LIB_LIBREND) $(LIB_LIBISAR) $(LIB_LC3PLUS)
	$(QUIET)$(RM) $(CLI_APIENC) $(CLI_APIDEC) $(CLI_APIREND) $(CLI_APIPOSTREND) $(CLI_AMBICONVERT) $(LIB_LIBENC) $(LIB_LIBDEBUG) $(LIB_LIBCOM) $(LIB_LIBDEC) $(LIB_LIBUTIL) $(LIB_LIBREND) $(LIB_LIBISAR) $(LIB_LC3PLUS)

$(OBJDIR)/%.o : %.c | $(OBJDIR)
	$(QUIET_CC)$(CC) $(CFLAGS) -c -MD -o $@ $<
+8 −0
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_isar", "lib_isar.vcxpro
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "isar_post_rend", "isar_post_rend.vcxproj", "{12374ADC-0E5C-4FDD-B903-71D572413831}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ambi_converter", "ambi_converter.vcxproj", "{2074FFD6-8056-4C5F-8A08-0B2607D1FEFF}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Win32 = Debug|Win32
@@ -111,6 +113,12 @@ Global
		{12374ADC-0E5C-4FDD-B903-71D572413831}.Release|Win32.ActiveCfg = Release|Win32
		{12374ADC-0E5C-4FDD-B903-71D572413831}.Release|Win32.Build.0 = Release|Win32
		{12374ADC-0E5C-4FDD-B903-71D572413831}.Release|x64.ActiveCfg = Release|Win32
		{2074FFD6-8056-4C5F-8A08-0B2607D1FEFF}.Debug|Win32.ActiveCfg = Debug|Win32
		{2074FFD6-8056-4C5F-8A08-0B2607D1FEFF}.Debug|Win32.Build.0 = Debug|Win32
		{2074FFD6-8056-4C5F-8A08-0B2607D1FEFF}.Debug|x64.ActiveCfg = Debug|Win32
		{2074FFD6-8056-4C5F-8A08-0B2607D1FEFF}.Release|Win32.ActiveCfg = Release|Win32
		{2074FFD6-8056-4C5F-8A08-0B2607D1FEFF}.Release|Win32.Build.0 = Release|Win32
		{2074FFD6-8056-4C5F-8A08-0B2607D1FEFF}.Release|x64.ActiveCfg = Release|Win32
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
Loading