Loading .gitlab-ci.yml +25 −27 Original line number Diff line number Diff line Loading @@ -172,6 +172,13 @@ stages: - cp "$LTV_DIR"/*.met scripts/testv/ - cp "$LTV_DIR"/*.csv scripts/testv/ .activate-Werror-linux: &activate-Werror-linux - sed -i.bak "s/^# \(CFLAGS += -Werror\)/\1/" Makefile - sed -i.bak "s/# \(set(CMAKE_C_FLAGS \"\${CMAKE_C_FLAGS} -Werror\")\)/\1/" CMakeLists.txt .activate-WX-windows: &activate-WX-windows - (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 } # --------------------------------------------------------------- # Job templates Loading Loading @@ -239,21 +246,6 @@ stages: - if [ ! -d "$TESTV_DIR" ]; then mkdir -p $TESTV_DIR; fi - cp -r scripts/testv/* $TESTV_DIR/ # template for build jobs to include the check for warnings .build-job-with-check-for-warnings: extends: .build-job-linux stage: build allow_failure: exit_codes: - 123 .build-job-windows-with-check-for-warnings: extends: .build-job-windows stage: build allow_failure: exit_codes: - 123 # --------------------------------------------------------------- # .pre jobs for setting up things # --------------------------------------------------------------- Loading Loading @@ -309,18 +301,20 @@ branch-is-up-to-date-with-main-post: build-codec-linux-make: extends: - .build-job-with-check-for-warnings - .build-job-linux - .rules-basis script: - *print-common-info - *activate-Werror-linux - make -j build-codec-linux-cmake: extends: - .build-job-with-check-for-warnings - .build-job-linux - .rules-basis script: - *print-common-info - *activate-Werror-linux - mkdir build - cd build - cmake .. Loading @@ -334,33 +328,37 @@ build-codec-instrumented-linux: timeout: "6 minutes" script: - *print-common-info - *activate-Werror-linux - bash ci/build_codec_instrumented_linux.sh # make sure that the codec builds with msan, asan and usan build-codec-sanitizers-linux: extends: - .build-job-with-check-for-warnings - .build-job-linux - .rules-basis script: - *print-common-info - *activate-Werror-linux - bash ci/build_codec_sanitizers_linux.sh build-codec-include-split-linux-make: extends: - .build-job-with-check-for-warnings - .build-job-linux - .rules-basis script: - *print-common-info - *enable-split-rendering - *activate-Werror-linux - make -j INCLUDE_SPLIT=1 build-codec-include-split-linux-cmake: extends: - .build-job-with-check-for-warnings - .build-job-linux - .rules-basis script: - *print-common-info - *enable-split-rendering - *activate-Werror-linux - mkdir build - cd build - cmake .. -DINCLUDE_SPLIT=1 Loading @@ -369,21 +367,21 @@ build-codec-include-split-linux-cmake: build-codec-windows-cmake: extends: - .build-job-windows-with-check-for-warnings - .build-job-windows - .rules-basis script: - *print-common-info-windows - $winoutdata = $null - *activate-WX-windows - cmake -G "Visual Studio 15 2017" . -Bbuild - cmake --build build -j build-codec-windows-include-split-cmake: extends: - .build-job-windows-with-check-for-warnings - .build-job-windows - .rules-basis script: - *print-common-info-windows - $winoutdata = $null - *activate-WX-windows - get-content .\lib_com\options.h | %{$_ -replace "/\*#define[\s]*SPLIT_REND_WITH_HEAD_ROT[\s]*\*/", "#define SPLIT_REND_WITH_HEAD_ROT"} | set-content -Path ./options_patched.h - rm ./lib_com/options.h - mv ./options_patched.h ./lib_com/options.h Loading @@ -392,13 +390,13 @@ build-codec-windows-include-split-cmake: build-codec-windows-msbuild: extends: - .build-job-windows-with-check-for-warnings - .build-job-windows - .rules-basis script: - *print-common-info-windows - $winoutdata = $null - *activate-WX-windows - py .\scripts\strip_split_rendering.py - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug | tee -variable winoutdata - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug # --------------------------------------------------------------- # Test jobs for merge requests Loading CMakeLists.txt +7 −2 Original line number Diff line number Diff line Loading @@ -60,7 +60,10 @@ if(UNIX) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffp-contract=off") # disable floating point operation contraction set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wcast-qual -Wall -W -Wextra -Wno-long-long") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wno-unused-parameter") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter") # to be uncommented in CI # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") # CLANG if(CLANG) find_program(clangBin NAMES /home/amm-archiv/soft/Linux/clang/current/bin/clang clang REQUIRED) Loading Loading @@ -113,7 +116,9 @@ elseif(WIN32) /MP ) if(NOT INCLUDE_SPLIT) add_compile_options("/W4" "/WX") add_compile_options("/W4") # to be uncommented in CI # add_compile_options("/WX") endif() endif() Loading Makefile +2 −1 Original line number Diff line number Diff line Loading @@ -57,8 +57,9 @@ endif # C compiler flags CFLAGS += -std=c99 -pedantic -Wcast-qual -Wall -W -Wextra -Wno-long-long \ -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ -Werror \ -Wno-implicit-fallthrough -ffp-contract=off # to be uncommented in CI # CFLAGS += -Werror # libs to link LDLIBS += -lm Loading Workspace_msvc/decoder.vcxproj +2 −2 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ <DebugInformationFormat>OldStyle</DebugInformationFormat> <CompileAs>Default</CompileAs> <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>false</TreatWarningAsError> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> Loading Loading @@ -130,7 +130,7 @@ <DebugInformationFormat /> <CompileAs>Default</CompileAs> <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>false</TreatWarningAsError> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> Loading Workspace_msvc/encoder.vcxproj +2 −2 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ <DebugInformationFormat>OldStyle</DebugInformationFormat> <CompileAs>Default</CompileAs> <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>false</TreatWarningAsError> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> Loading Loading @@ -138,7 +138,7 @@ <DebugInformationFormat /> <CompileAs>Default</CompileAs> <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>false</TreatWarningAsError> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> Loading Loading
.gitlab-ci.yml +25 −27 Original line number Diff line number Diff line Loading @@ -172,6 +172,13 @@ stages: - cp "$LTV_DIR"/*.met scripts/testv/ - cp "$LTV_DIR"/*.csv scripts/testv/ .activate-Werror-linux: &activate-Werror-linux - sed -i.bak "s/^# \(CFLAGS += -Werror\)/\1/" Makefile - sed -i.bak "s/# \(set(CMAKE_C_FLAGS \"\${CMAKE_C_FLAGS} -Werror\")\)/\1/" CMakeLists.txt .activate-WX-windows: &activate-WX-windows - (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 } # --------------------------------------------------------------- # Job templates Loading Loading @@ -239,21 +246,6 @@ stages: - if [ ! -d "$TESTV_DIR" ]; then mkdir -p $TESTV_DIR; fi - cp -r scripts/testv/* $TESTV_DIR/ # template for build jobs to include the check for warnings .build-job-with-check-for-warnings: extends: .build-job-linux stage: build allow_failure: exit_codes: - 123 .build-job-windows-with-check-for-warnings: extends: .build-job-windows stage: build allow_failure: exit_codes: - 123 # --------------------------------------------------------------- # .pre jobs for setting up things # --------------------------------------------------------------- Loading Loading @@ -309,18 +301,20 @@ branch-is-up-to-date-with-main-post: build-codec-linux-make: extends: - .build-job-with-check-for-warnings - .build-job-linux - .rules-basis script: - *print-common-info - *activate-Werror-linux - make -j build-codec-linux-cmake: extends: - .build-job-with-check-for-warnings - .build-job-linux - .rules-basis script: - *print-common-info - *activate-Werror-linux - mkdir build - cd build - cmake .. Loading @@ -334,33 +328,37 @@ build-codec-instrumented-linux: timeout: "6 minutes" script: - *print-common-info - *activate-Werror-linux - bash ci/build_codec_instrumented_linux.sh # make sure that the codec builds with msan, asan and usan build-codec-sanitizers-linux: extends: - .build-job-with-check-for-warnings - .build-job-linux - .rules-basis script: - *print-common-info - *activate-Werror-linux - bash ci/build_codec_sanitizers_linux.sh build-codec-include-split-linux-make: extends: - .build-job-with-check-for-warnings - .build-job-linux - .rules-basis script: - *print-common-info - *enable-split-rendering - *activate-Werror-linux - make -j INCLUDE_SPLIT=1 build-codec-include-split-linux-cmake: extends: - .build-job-with-check-for-warnings - .build-job-linux - .rules-basis script: - *print-common-info - *enable-split-rendering - *activate-Werror-linux - mkdir build - cd build - cmake .. -DINCLUDE_SPLIT=1 Loading @@ -369,21 +367,21 @@ build-codec-include-split-linux-cmake: build-codec-windows-cmake: extends: - .build-job-windows-with-check-for-warnings - .build-job-windows - .rules-basis script: - *print-common-info-windows - $winoutdata = $null - *activate-WX-windows - cmake -G "Visual Studio 15 2017" . -Bbuild - cmake --build build -j build-codec-windows-include-split-cmake: extends: - .build-job-windows-with-check-for-warnings - .build-job-windows - .rules-basis script: - *print-common-info-windows - $winoutdata = $null - *activate-WX-windows - get-content .\lib_com\options.h | %{$_ -replace "/\*#define[\s]*SPLIT_REND_WITH_HEAD_ROT[\s]*\*/", "#define SPLIT_REND_WITH_HEAD_ROT"} | set-content -Path ./options_patched.h - rm ./lib_com/options.h - mv ./options_patched.h ./lib_com/options.h Loading @@ -392,13 +390,13 @@ build-codec-windows-include-split-cmake: build-codec-windows-msbuild: extends: - .build-job-windows-with-check-for-warnings - .build-job-windows - .rules-basis script: - *print-common-info-windows - $winoutdata = $null - *activate-WX-windows - py .\scripts\strip_split_rendering.py - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug | tee -variable winoutdata - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug # --------------------------------------------------------------- # Test jobs for merge requests Loading
CMakeLists.txt +7 −2 Original line number Diff line number Diff line Loading @@ -60,7 +60,10 @@ if(UNIX) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffp-contract=off") # disable floating point operation contraction set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wcast-qual -Wall -W -Wextra -Wno-long-long") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wno-unused-parameter") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter") # to be uncommented in CI # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") # CLANG if(CLANG) find_program(clangBin NAMES /home/amm-archiv/soft/Linux/clang/current/bin/clang clang REQUIRED) Loading Loading @@ -113,7 +116,9 @@ elseif(WIN32) /MP ) if(NOT INCLUDE_SPLIT) add_compile_options("/W4" "/WX") add_compile_options("/W4") # to be uncommented in CI # add_compile_options("/WX") endif() endif() Loading
Makefile +2 −1 Original line number Diff line number Diff line Loading @@ -57,8 +57,9 @@ endif # C compiler flags CFLAGS += -std=c99 -pedantic -Wcast-qual -Wall -W -Wextra -Wno-long-long \ -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ -Werror \ -Wno-implicit-fallthrough -ffp-contract=off # to be uncommented in CI # CFLAGS += -Werror # libs to link LDLIBS += -lm Loading
Workspace_msvc/decoder.vcxproj +2 −2 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ <DebugInformationFormat>OldStyle</DebugInformationFormat> <CompileAs>Default</CompileAs> <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>false</TreatWarningAsError> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> Loading Loading @@ -130,7 +130,7 @@ <DebugInformationFormat /> <CompileAs>Default</CompileAs> <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>false</TreatWarningAsError> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> Loading
Workspace_msvc/encoder.vcxproj +2 −2 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ <DebugInformationFormat>OldStyle</DebugInformationFormat> <CompileAs>Default</CompileAs> <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>false</TreatWarningAsError> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> Loading Loading @@ -138,7 +138,7 @@ <DebugInformationFormat /> <CompileAs>Default</CompileAs> <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>false</TreatWarningAsError> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> Loading