From 28f32c577eb3b70a1050c09db7f28da041503299 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 1 Jul 2022 14:24:32 +0200 Subject: [PATCH 01/11] remove NOTPARALLEL from makefiles and adjust build_all script --- Makefile | 1 - ci/build_all_linux.sh | 12 +++++------- scripts/prerenderer/Makefile | 3 --- .../object_renderer_standalone/Makefile | 3 --- 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 0514bf0a09..76c916c1d2 100644 --- a/Makefile +++ b/Makefile @@ -148,7 +148,6 @@ DEPS = $(addprefix $(OBJDIR)/,$(SRCS_LIBCOM:.c=.P) $(SRCS_LIBDEBUG:.c=.P) $(SRCS ############################################################################### .PHONY: all clean clean_unittests clean_all -.NOTPARALLEL: clean clean_unittests clean_all all: $(CLI_APIENC) $(CLI_APIDEC) diff --git a/ci/build_all_linux.sh b/ci/build_all_linux.sh index 53f72ac1ee..8a5c4add94 100755 --- a/ci/build_all_linux.sh +++ b/ci/build_all_linux.sh @@ -6,13 +6,11 @@ if [ ! -d "lib_com" ]; then fi # first build codec, everything else needs this anyway -make clean all +make clean all -j # build unittests -make unittests +make unittests -j # build prerenderer -cd scripts/prerenderer -make +make -C scripts/prerenderer -j # build standalone TD object renderer -cd .. -cd td_object_renderer/object_renderer_standalone -make +make -C scripts/td_object_renderer/object_renderer_standalone -j + diff --git a/scripts/prerenderer/Makefile b/scripts/prerenderer/Makefile index dae07e0411..4201cd75e3 100644 --- a/scripts/prerenderer/Makefile +++ b/scripts/prerenderer/Makefile @@ -128,7 +128,6 @@ DEPS = $(addprefix $(OBJDIR)/,$(SRCS_LIBCOM:.c=.P) $(SRCS_LIBDEBUG:.c=.P) $(SRCS ############################################################################### .PHONY: all clean clean_all -.NOTPARALLEL: clean clean_all all: $(CLI_PRD) @@ -155,8 +154,6 @@ $(CLI_PRD): $(LIB_LIBENC) $(LIB_LIBDEC) $(LIB_LIBDEBUG) $(LIB_LIBCOM) $(LIB_LIB libs: $(LIB_LIBENC) $(LIB_LIBDEBUG) $(LIB_LIBCOM) $(LIB_LIBDEC) $(LIB_LIBUTIL) -#.NOTPARALLEL: clean clean_all - clean: $(QUIET)$(RM) $(OBJS_LIBENC) $(OBJS_LIBDEC) $(OBJS_CLI_APPPRD) $(DEPS) $(QUIET)$(RM) $(DEPS:.P=.d) diff --git a/scripts/td_object_renderer/object_renderer_standalone/Makefile b/scripts/td_object_renderer/object_renderer_standalone/Makefile index b5d5ac8b14..1f7571b867 100644 --- a/scripts/td_object_renderer/object_renderer_standalone/Makefile +++ b/scripts/td_object_renderer/object_renderer_standalone/Makefile @@ -133,7 +133,6 @@ DEPS = $(addprefix $(OBJDIR)/,$(SRCS_LIBCOM:.c=.P) $(SRCS_LIBDEBUG:.c=.P) $(SRCS ############################################################################### .PHONY: all clean clean_all -.NOTPARALLEL: clean clean_all all: $(CLI_REN) @@ -160,8 +159,6 @@ $(CLI_REN): $(LIB_LIBENC) $(LIB_LIBDEC) $(LIB_LIBDEBUG) $(LIB_LIBCOM) $(LIB_LIB libs: $(LIB_LIBENC) $(LIB_LIBDEBUG) $(LIB_LIBCOM) $(LIB_LIBDEC) $(LIB_LIBUTIL) -#.NOTPARALLEL: clean clean_all - clean: $(QUIET)$(RM) $(OBJS_LIBENC) $(OBJS_LIBDEC) $(OBJS_REN) $(DEPS) $(QUIET)$(RM) $(DEPS:.P=.d) -- GitLab From ec4627722004f81cb0483c6951de82ff900cf849 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 1 Jul 2022 14:25:49 +0200 Subject: [PATCH 02/11] use -j in make calls also in other ci scripts --- ci/build_codec_instrumented_linux.sh | 2 +- ci/build_codec_sanitizers_linux.sh | 6 +++--- ci/smoke_test.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ci/build_codec_instrumented_linux.sh b/ci/build_codec_instrumented_linux.sh index 37ac65c2c0..e98547c5fa 100755 --- a/ci/build_codec_instrumented_linux.sh +++ b/ci/build_codec_instrumented_linux.sh @@ -8,4 +8,4 @@ fi cd scripts ./prepare_instrumentation.sh cd c-code_instrument -make +make -j diff --git a/ci/build_codec_sanitizers_linux.sh b/ci/build_codec_sanitizers_linux.sh index 054127dab2..65c520d25a 100755 --- a/ci/build_codec_sanitizers_linux.sh +++ b/ci/build_codec_sanitizers_linux.sh @@ -8,8 +8,8 @@ fi # CI linux container would do this, can stay commented if clang (v13) is in your path #PATH=$PATH:/usr/lib/llvm-13/bin make clean -make CLANG=1 +make CLANG=1 -j make clean -make CLANG=2 +make CLANG=2 -j make clean -make CLANG=3 +make CLANG=3 -j diff --git a/ci/smoke_test.sh b/ci/smoke_test.sh index 108e68585b..3e9006e148 100755 --- a/ci/smoke_test.sh +++ b/ci/smoke_test.sh @@ -5,7 +5,7 @@ if [ ! -d "lib_com" ]; then exit 1 fi -make clean all +make clean all -j # get all modes except SBA rate switching (which is broken currently) list=$(./scripts/runIvasCodec.py -l | grep -v "SBA.*rs") -- GitLab From 6ff7832d2037ef401db67c20ff96f18d9e20e36a Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 1 Jul 2022 14:26:48 +0200 Subject: [PATCH 03/11] remove unused dockerfile --- ci/ubuntu_22.04.dockerfile | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 ci/ubuntu_22.04.dockerfile diff --git a/ci/ubuntu_22.04.dockerfile b/ci/ubuntu_22.04.dockerfile deleted file mode 100644 index 00f1afcfab..0000000000 --- a/ci/ubuntu_22.04.dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -FROM ubuntu:22.04 - -RUN ln -snf /bin/bash /bin/sh - -# To avoid problems with Dialog and curses wizards -ENV DEBIAN_FRONTEND noninteractive - -# install dependencies -RUN apt-get update && apt-get install -y \ - build-essential clang-13 lldb-13 lld-13 clang-format-13 \ - valgrind git cmake \ - python3 python3-pip \ - wine wine-binfmt zip - -# for the wmc tool -RUN dpkg --add-architecture i386 && apt-get update -RUN apt-get install -y wine32 - -# cleanup -RUN rm -rf /usr/share/doc /var/lib/apt/lists/* - -RUN pip3 install --upgrade pip -RUN pip3 install numpy scipy pytest pytest-xdist -- GitLab From f604ab3e91b11c792e20c5eade5c2328be882630 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 1 Jul 2022 14:31:37 +0200 Subject: [PATCH 04/11] add template test-job-linux-needs-testv-dir --- .gitlab-ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 187703e147..241ea3dcc0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,10 +30,14 @@ stages: extends: .test-job tags: - ivas-linux + +# template for test jobs on linux that need the TESTV_DIR +.test-job-linux-needs-testv-dir: + extends: .test-job-linux before_script: - if [ ! -d "$TESTV_DIR" ]; then mkdir -p $TESTV_DIR; fi - cp -r scripts/testv/* $TESTV_DIR/ - + # build all components of the project, i.e. codec itself, the unittests, the prerenderer and the standalone version of the TD object renderer build-all-linux-make: @@ -75,7 +79,7 @@ build-codec-sanitizers-linux: # test that runs all modes with 1s input signals codec-smoke-test: - extends: .test-job-linux + extends: .test-job-linux-needs-testv-dir rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' stage: test -- GitLab From a87b197236325dcae04ef6dc19b267097a6f6133 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 1 Jul 2022 14:35:44 +0200 Subject: [PATCH 05/11] checkout source branch in selftest on merge req --- .gitlab-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 241ea3dcc0..f5da869123 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -109,7 +109,7 @@ self-test-on-merge-request: - rm -rf build/* ### backup testvectors from source branch before switching to arget branch -> makes sure that up-to-date testv folder is used in case the branch makes changes to it - - cp -r scripts/testv scripts/testv.bak + #- cp -r scripts/testv scripts/testv.bak ### checkout version to compare against # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching @@ -132,8 +132,9 @@ self-test-on-merge-request: # TODO: instead check out the source commit again ### restore testv folder from branch - - rm -rf scripts/testv - - cp -r scripts/testv.bak scripts/testv + #- rm -rf scripts/testv + #- cp -r scripts/testv.bak scripts/testv + - git checkout $CI_MERGE_REQUEST_REF_PATH ### run selftest - ls -altr scripts/testv -- GitLab From 15fcf8010f157f1594fc3ca8b1b61503c2dfdf17 Mon Sep 17 00:00:00 2001 From: kiene Date: Fri, 1 Jul 2022 12:49:21 +0000 Subject: [PATCH 06/11] split make command --- ci/smoke_test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/smoke_test.sh b/ci/smoke_test.sh index 3e9006e148..d9a22639f0 100755 --- a/ci/smoke_test.sh +++ b/ci/smoke_test.sh @@ -5,7 +5,8 @@ if [ ! -d "lib_com" ]; then exit 1 fi -make clean all -j +make clean +make all -j # get all modes except SBA rate switching (which is broken currently) list=$(./scripts/runIvasCodec.py -l | grep -v "SBA.*rs") -- GitLab From 9720b553d6af977bd3dde2ad51770f7fb7d41d85 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 1 Jul 2022 15:23:03 +0200 Subject: [PATCH 07/11] fix checkout of source branch in BE-check --- .gitlab-ci.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f5da869123..7df1635da6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -108,8 +108,8 @@ self-test-on-merge-request: - cd .. - rm -rf build/* - ### backup testvectors from source branch before switching to arget branch -> makes sure that up-to-date testv folder is used in case the branch makes changes to it - #- cp -r scripts/testv scripts/testv.bak + ### store the current commit hash + - source_branch_commit_sha=$(git rev-parse HEAD) ### checkout version to compare against # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching @@ -130,11 +130,8 @@ self-test-on-merge-request: - mv IVAS_dec ../IVAS_dec_ref - cd .. - # TODO: instead check out the source commit again - ### restore testv folder from branch - #- rm -rf scripts/testv - #- cp -r scripts/testv.bak scripts/testv - - git checkout $CI_MERGE_REQUEST_REF_PATH + ### re-checkout the commit from the source branch to have up-to-date self_test.py and scripts/testv (and actually everything) + - git checkout $source_branch_commit_sha ### run selftest - ls -altr scripts/testv -- GitLab From 97f97da0862afeee6b2a3a345e0e07a3e2f328a6 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 1 Jul 2022 15:52:42 +0200 Subject: [PATCH 08/11] adddebug output in smoke test and only run this single test --- .gitlab-ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7df1635da6..a4969a483a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,10 +37,11 @@ stages: before_script: - if [ ! -d "$TESTV_DIR" ]; then mkdir -p $TESTV_DIR; fi - cp -r scripts/testv/* $TESTV_DIR/ + - ls -altr $TESTV_DIR # build all components of the project, i.e. codec itself, the unittests, the prerenderer and the standalone version of the TD object renderer -build-all-linux-make: +.build-all-linux-make: extends: .test-job-linux rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' @@ -48,7 +49,7 @@ build-all-linux-make: script: - bash ci/build_all_linux.sh -build-codec-linux-cmake: +.build-codec-linux-cmake: extends: .test-job-linux rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' @@ -59,7 +60,7 @@ build-codec-linux-cmake: - cmake .. - make -j -build-codec-instrumented-linux: +.build-codec-instrumented-linux: extends: .test-job-linux rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' @@ -68,7 +69,7 @@ build-codec-instrumented-linux: - bash ci/build_codec_instrumented_linux.sh # make sure that the codec builds with msan, asan and usan -build-codec-sanitizers-linux: +.build-codec-sanitizers-linux: extends: .test-job-linux rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' @@ -91,7 +92,7 @@ codec-smoke-test: # compare bit exactness between target and source branch -self-test-on-merge-request: +.self-test-on-merge-request: extends: .test-job-linux stage: compare rules: -- GitLab From 3ef7982d95143fad79d4cfa515a6eeeedde3d6b5 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 1 Jul 2022 16:01:26 +0200 Subject: [PATCH 09/11] correct testv path in config json file --- scripts/config/docker_linux.json | 38 ++++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/scripts/config/docker_linux.json b/scripts/config/docker_linux.json index fdf7bb3d13..e8db23c8ea 100644 --- a/scripts/config/docker_linux.json +++ b/scripts/config/docker_linux.json @@ -2,24 +2,24 @@ "afspPath": "not_needed", "utilPath": "not_needed", "inpaths": { - "MONO": "scripts/testv/all_mono.wav", - "STEREO": "scripts/testv/all_stereo_speech_ITU_concat.wav", - "FOA": "scripts/testv/test_FOA_v3.wav", - "HOA2": "scripts/testv/test_HOA2_v3.wav", - "HOA3": "scripts/testv/test_HOA3_v3.wav", - "SBA": "scripts/testv/test_HOA3_v3.wav", - "MASA1TC1DIR": "scripts/testv/test_HOA3_v3_1dir_MASA1TC.wav", - "MASA1TC2DIR": "scripts/testv/test_HOA3_v3_2dir_MASA1TC.wav", - "MASA2TC1DIR": "scripts/testv/test_HOA3_v3_1dir_MASA2TC.wav", - "MASA2TC2DIR": "scripts/testv/test_HOA3_v3_2dir_MASA2TC.wav", - "5_1": "scripts/testv/test_MC51.wav", - "5_1_2": "scripts/testv/test_MC51p2.wav", - "5_1_4": "scripts/testv/test_MC51p4.wav", - "7_1": "scripts/testv/test_MC71.wav", - "7_1_4": "scripts/testv/test_MC71p4.wav", - "ISM1": "scripts/testv/test_ISM_1obj.wav", - "ISM2": "scripts/testv/test_ISM_2obj.wav", - "ISM3": "scripts/testv/test_ISM_3obj.wav", - "ISM4": "scripts/testv/test_ISM_4obj.wav" + "MONO": "/usr/local/testv/all_mono.wav", + "STEREO": "/usr/local/testv/all_stereo_speech_ITU_concat.wav", + "FOA": "/usr/local/testv/test_FOA_v3.wav", + "HOA2": "/usr/local/testv/test_HOA2_v3.wav", + "HOA3": "/usr/local/testv/test_HOA3_v3.wav", + "SBA": "/usr/local/testv/test_HOA3_v3.wav", + "MASA1TC1DIR": "/usr/local/testv/test_HOA3_v3_1dir_MASA1TC.wav", + "MASA1TC2DIR": "/usr/local/testv/test_HOA3_v3_2dir_MASA1TC.wav", + "MASA2TC1DIR": "/usr/local/testv/test_HOA3_v3_1dir_MASA2TC.wav", + "MASA2TC2DIR": "/usr/local/testv/test_HOA3_v3_2dir_MASA2TC.wav", + "5_1": "/usr/local/testv/test_MC51.wav", + "5_1_2": "/usr/local/testv/test_MC51p2.wav", + "5_1_4": "/usr/local/testv/test_MC51p4.wav", + "7_1": "/usr/local/testv/test_MC71.wav", + "7_1_4": "/usr/local/testv/test_MC71p4.wav", + "ISM1": "/usr/local/testv/test_ISM_1obj.wav", + "ISM2": "/usr/local/testv/test_ISM_2obj.wav", + "ISM3": "/usr/local/testv/test_ISM_3obj.wav", + "ISM4": "/usr/local/testv/test_ISM_4obj.wav" } } -- GitLab From ebe4392cadbfa23ea1b0893dc09da60873390c39 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 1 Jul 2022 16:02:41 +0200 Subject: [PATCH 10/11] rename scripts config file fro ci use --- ci/smoke_test.sh | 2 +- scripts/config/{docker_linux.json => ci_linux.json} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename scripts/config/{docker_linux.json => ci_linux.json} (100%) diff --git a/ci/smoke_test.sh b/ci/smoke_test.sh index d9a22639f0..9c423d4eec 100755 --- a/ci/smoke_test.sh +++ b/ci/smoke_test.sh @@ -10,4 +10,4 @@ make all -j # get all modes except SBA rate switching (which is broken currently) list=$(./scripts/runIvasCodec.py -l | grep -v "SBA.*rs") -./scripts/runIvasCodec.py -p ./scripts/config/docker_linux.json -m $list -U 1 +./scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -m $list -U 1 diff --git a/scripts/config/docker_linux.json b/scripts/config/ci_linux.json similarity index 100% rename from scripts/config/docker_linux.json rename to scripts/config/ci_linux.json -- GitLab From d026e91c62dd551c440ccd179a8109dbae5e2e11 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 1 Jul 2022 16:05:40 +0200 Subject: [PATCH 11/11] remove debugging output and activate all jobs again --- .gitlab-ci.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a4969a483a..7df1635da6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,11 +37,10 @@ stages: before_script: - if [ ! -d "$TESTV_DIR" ]; then mkdir -p $TESTV_DIR; fi - cp -r scripts/testv/* $TESTV_DIR/ - - ls -altr $TESTV_DIR # build all components of the project, i.e. codec itself, the unittests, the prerenderer and the standalone version of the TD object renderer -.build-all-linux-make: +build-all-linux-make: extends: .test-job-linux rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' @@ -49,7 +48,7 @@ stages: script: - bash ci/build_all_linux.sh -.build-codec-linux-cmake: +build-codec-linux-cmake: extends: .test-job-linux rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' @@ -60,7 +59,7 @@ stages: - cmake .. - make -j -.build-codec-instrumented-linux: +build-codec-instrumented-linux: extends: .test-job-linux rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' @@ -69,7 +68,7 @@ stages: - bash ci/build_codec_instrumented_linux.sh # make sure that the codec builds with msan, asan and usan -.build-codec-sanitizers-linux: +build-codec-sanitizers-linux: extends: .test-job-linux rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' @@ -92,7 +91,7 @@ codec-smoke-test: # compare bit exactness between target and source branch -.self-test-on-merge-request: +self-test-on-merge-request: extends: .test-job-linux stage: compare rules: -- GitLab