From 8f9b94cc3a949a8751571e50dce5ab1422106a67 Mon Sep 17 00:00:00 2001 From: Johannes Lenzen Date: Tue, 26 May 2020 11:34:26 +0200 Subject: [PATCH 1/3] windows template support --- .gitlab-ci.yml | 86 +++++++++++++------ CI/gitlab-ci/windows-template-job.yml | 36 ++++++++ CI/gitlab-ci/windows.yml | 118 +------------------------- 3 files changed, 98 insertions(+), 142 deletions(-) create mode 100644 CI/gitlab-ci/windows-template-job.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 75ed8497..d9f4bc08 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -297,7 +297,15 @@ macos-cpp14-release: # Windows tasks # ----------------- -VS2017-64-bit-shared-apps: +#------------- Job Informations: +# Type: Build+Test: Release +# OS: Windows +# Architecture: x64 +# Shared: TRUE +# VS Version: VS2017 +# Apps: {{APPS}} + +build-VS2017-x64-shared-TRUE-apps: stage: build variables: BUILD_PLATFORM: "VS2017" @@ -310,25 +318,9 @@ VS2017-64-bit-shared-apps: - Qt5101 artifacts: paths: - - build-release/*.exe - -VS2017-64-bit-static-apps: - stage: build - variables: - BUILD_PLATFORM: "VS2017" - ARCHITECTURE: "x64" - SHARED: "FALSE" - APPS: "ON" - script: "CI\\Windows.bat" - tags: - - VS2017 - - Qt5101 - artifacts: - paths: - - build-release/*.exe + - build-release/*.exe - -VS2017-64-bit-shared-no-apps: +build-VS2017-x64-shared-TRUE-no-apps: stage: build variables: BUILD_PLATFORM: "VS2017" @@ -341,8 +333,30 @@ VS2017-64-bit-shared-no-apps: artifacts: paths: - build-release/*.exe +#------------- Job Informations: +# Type: Build+Test: Release +# OS: Windows +# Architecture: x64 +# Shared: FALSE +# VS Version: VS2017 +# Apps: {{APPS}} -VS2017-64-bit-static-no-apps: +build-VS2017-x64-shared-FALSE-apps: + stage: build + variables: + BUILD_PLATFORM: "VS2017" + ARCHITECTURE: "x64" + SHARED: "FALSE" + APPS: "ON" + script: "CI\\Windows.bat" + tags: + - VS2017 + - Qt5101 + artifacts: + paths: + - build-release/*.exe + +build-VS2017-x64-shared-FALSE-no-apps: stage: build variables: BUILD_PLATFORM: "VS2017" @@ -356,7 +370,15 @@ VS2017-64-bit-static-no-apps: paths: - build-release/*.exe -VS2015-64-bit-shared-apps: +#------------- Job Informations: +# Type: Build+Test: Release +# OS: Windows +# Architecture: x64 +# Shared: TRUE +# VS Version: VS2015 +# Apps: {{APPS}} + +build-VS2015-x64-shared-TRUE-apps: stage: build variables: BUILD_PLATFORM: "VS2015" @@ -366,12 +388,12 @@ VS2015-64-bit-shared-apps: script: "CI\\Windows.bat" tags: - VS2015 + - Qt5101 artifacts: paths: - - build-release/*.exe - - -VS2015-64-bit-shared-no-apps: + - build-release/*.exe + +build-VS2015-x64-shared-TRUE-no-apps: stage: build variables: BUILD_PLATFORM: "VS2015" @@ -384,8 +406,15 @@ VS2015-64-bit-shared-no-apps: artifacts: paths: - build-release/*.exe +#------------- Job Informations: +# Type: Build+Test: Release +# OS: Windows +# Architecture: x64 +# Shared: FALSE +# VS Version: VS2015 +# Apps: {{APPS}} -VS2015-64-bit-static-apps: +build-VS2015-x64-shared-FALSE-apps: stage: build variables: BUILD_PLATFORM: "VS2015" @@ -395,11 +424,12 @@ VS2015-64-bit-static-apps: script: "CI\\Windows.bat" tags: - VS2015 + - Qt5101 artifacts: paths: - - build-release/*.exe + - build-release/*.exe -VS2015-64-bit-static-no-apps: +build-VS2015-x64-shared-FALSE-no-apps: stage: build variables: BUILD_PLATFORM: "VS2015" diff --git a/CI/gitlab-ci/windows-template-job.yml b/CI/gitlab-ci/windows-template-job.yml new file mode 100644 index 00000000..2c31c4f9 --- /dev/null +++ b/CI/gitlab-ci/windows-template-job.yml @@ -0,0 +1,36 @@ +#------------- Job Informations: +# Type: Build+Test: Release +# OS: Windows +# Architecture: {{ARCHITECTURE}} +# Shared: {{SHARED}} +# VS Version: {{VSVERSION}} +# Apps: {{APPS}} + +build-{{VSVERSION}}-{{ARCHITECTURE}}-shared-{{SHARED}}-apps: + stage: build + variables: + BUILD_PLATFORM: "{{VSVERSION}}" + ARCHITECTURE: "{{ARCHITECTURE}}" + SHARED: "{{SHARED}}" + APPS: "ON" + script: "CI\\Windows.bat" + tags: + - {{VSVERSION}} + - {{QTTAG}} + artifacts: + paths: + - build-release/*.exe + +build-{{VSVERSION}}-{{ARCHITECTURE}}-shared-{{SHARED}}-no-apps: + stage: build + variables: + BUILD_PLATFORM: "{{VSVERSION}}" + ARCHITECTURE: "{{ARCHITECTURE}}" + SHARED: "{{SHARED}}" + APPS: "OFF" + script: "CI\\Windows.bat" + tags: + - {{VSVERSION}} + artifacts: + paths: + - build-release/*.exe diff --git a/CI/gitlab-ci/windows.yml b/CI/gitlab-ci/windows.yml index 5577eaf7..0000105c 100644 --- a/CI/gitlab-ci/windows.yml +++ b/CI/gitlab-ci/windows.yml @@ -2,118 +2,8 @@ # Windows tasks # ----------------- -VS2017-64-bit-shared-apps: - stage: build - variables: - BUILD_PLATFORM: "VS2017" - ARCHITECTURE: "x64" - SHARED: "TRUE" - APPS: "ON" - script: "CI\\Windows.bat" - tags: - - VS2017 - - Qt5101 - artifacts: - paths: - - build-release/*.exe - -VS2017-64-bit-static-apps: - stage: build - variables: - BUILD_PLATFORM: "VS2017" - ARCHITECTURE: "x64" - SHARED: "FALSE" - APPS: "ON" - script: "CI\\Windows.bat" - tags: - - VS2017 - - Qt5101 - artifacts: - paths: - - build-release/*.exe +{windows-template-job.yml, ARCHITECTURE=x64, SHARED=TRUE, VSVERSION=VS2017, QTTAG=Qt5101} +{windows-template-job.yml, ARCHITECTURE=x64, SHARED=FALSE, VSVERSION=VS2017, QTTAG=Qt5101} - -VS2017-64-bit-shared-no-apps: - stage: build - variables: - BUILD_PLATFORM: "VS2017" - ARCHITECTURE: "x64" - SHARED: "TRUE" - APPS: "OFF" - script: "CI\\Windows.bat" - tags: - - VS2017 - artifacts: - paths: - - build-release/*.exe - -VS2017-64-bit-static-no-apps: - stage: build - variables: - BUILD_PLATFORM: "VS2017" - ARCHITECTURE: "x64" - SHARED: "FALSE" - APPS: "OFF" - script: "CI\\Windows.bat" - tags: - - VS2017 - artifacts: - paths: - - build-release/*.exe - -VS2015-64-bit-shared-apps: - stage: build - variables: - BUILD_PLATFORM: "VS2015" - ARCHITECTURE: "x64" - SHARED: "TRUE" - APPS: "ON" - script: "CI\\Windows.bat" - tags: - - VS2015 - artifacts: - paths: - - build-release/*.exe - - -VS2015-64-bit-shared-no-apps: - stage: build - variables: - BUILD_PLATFORM: "VS2015" - ARCHITECTURE: "x64" - SHARED: "TRUE" - APPS: "OFF" - script: "CI\\Windows.bat" - tags: - - VS2015 - artifacts: - paths: - - build-release/*.exe - -VS2015-64-bit-static-apps: - stage: build - variables: - BUILD_PLATFORM: "VS2015" - ARCHITECTURE: "x64" - SHARED: "FALSE" - APPS: "ON" - script: "CI\\Windows.bat" - tags: - - VS2015 - artifacts: - paths: - - build-release/*.exe - -VS2015-64-bit-static-no-apps: - stage: build - variables: - BUILD_PLATFORM: "VS2015" - ARCHITECTURE: "x64" - SHARED: "FALSE" - APPS: "OFF" - script: "CI\\Windows.bat" - tags: - - VS2015 - artifacts: - paths: - - build-release/*.exe +{windows-template-job.yml, ARCHITECTURE=x64, SHARED=TRUE, VSVERSION=VS2015, QTTAG=Qt5101} +{windows-template-job.yml, ARCHITECTURE=x64, SHARED=FALSE, VSVERSION=VS2015, QTTAG=Qt5101} From 5c794cd6a48f090f5e0893caeaf0cc15a667979b Mon Sep 17 00:00:00 2001 From: Johannes Lenzen Date: Tue, 26 May 2020 11:39:49 +0200 Subject: [PATCH 2/3] gitlab junit integration --- .gitlab-ci.yml | 52 ++++++++++++++++++++++++--- CI/Windows.bat | 6 ++-- CI/ci-mac-test.sh | 6 ++-- CI/gitlab-ci/windows-template-job.yml | 13 ++++++- 4 files changed, 66 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d9f4bc08..aea39f46 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -318,7 +318,12 @@ build-VS2017-x64-shared-TRUE-apps: - Qt5101 artifacts: paths: - - build-release/*.exe + - build-release/*.exe + reports: + junit: + - build-release/report.xml + - build-release/report-customvec.xml + - build-release/report-doublevec.xml build-VS2017-x64-shared-TRUE-no-apps: stage: build @@ -333,6 +338,12 @@ build-VS2017-x64-shared-TRUE-no-apps: artifacts: paths: - build-release/*.exe + reports: + junit: + - build-release/report.xml + - build-release/report-customvec.xml + - build-release/report-doublevec.xml + #------------- Job Informations: # Type: Build+Test: Release # OS: Windows @@ -354,7 +365,12 @@ build-VS2017-x64-shared-FALSE-apps: - Qt5101 artifacts: paths: - - build-release/*.exe + - build-release/*.exe + reports: + junit: + - build-release/report.xml + - build-release/report-customvec.xml + - build-release/report-doublevec.xml build-VS2017-x64-shared-FALSE-no-apps: stage: build @@ -369,6 +385,12 @@ build-VS2017-x64-shared-FALSE-no-apps: artifacts: paths: - build-release/*.exe + reports: + junit: + - build-release/report.xml + - build-release/report-customvec.xml + - build-release/report-doublevec.xml + #------------- Job Informations: # Type: Build+Test: Release @@ -391,7 +413,12 @@ build-VS2015-x64-shared-TRUE-apps: - Qt5101 artifacts: paths: - - build-release/*.exe + - build-release/*.exe + reports: + junit: + - build-release/report.xml + - build-release/report-customvec.xml + - build-release/report-doublevec.xml build-VS2015-x64-shared-TRUE-no-apps: stage: build @@ -406,6 +433,12 @@ build-VS2015-x64-shared-TRUE-no-apps: artifacts: paths: - build-release/*.exe + reports: + junit: + - build-release/report.xml + - build-release/report-customvec.xml + - build-release/report-doublevec.xml + #------------- Job Informations: # Type: Build+Test: Release # OS: Windows @@ -427,7 +460,12 @@ build-VS2015-x64-shared-FALSE-apps: - Qt5101 artifacts: paths: - - build-release/*.exe + - build-release/*.exe + reports: + junit: + - build-release/report.xml + - build-release/report-customvec.xml + - build-release/report-doublevec.xml build-VS2015-x64-shared-FALSE-no-apps: stage: build @@ -442,6 +480,12 @@ build-VS2015-x64-shared-FALSE-no-apps: artifacts: paths: - build-release/*.exe + reports: + junit: + - build-release/report.xml + - build-release/report-customvec.xml + - build-release/report-doublevec.xml + Doc-publish: stage: deploy diff --git a/CI/Windows.bat b/CI/Windows.bat index 18933585..616dcf27 100644 --- a/CI/Windows.bat +++ b/CI/Windows.bat @@ -115,11 +115,11 @@ IF %errorlevel% NEQ 0 exit /b %errorlevel% cd unittests -unittests.exe --gtest_output=xml +unittests.exe --gtest_output=xml:./report.xml -unittests_customvec.exe --gtest_output=xml +unittests_customvec.exe --gtest_output=xml:./report-customvec.xml -unittests_doublevec.exe --gtest_output=xml +unittests_doublevec.exe --gtest_output=xml:./report-doublevec.xml cd .. diff --git a/CI/ci-mac-test.sh b/CI/ci-mac-test.sh index de25ba39..deeee00d 100755 --- a/CI/ci-mac-test.sh +++ b/CI/ci-mac-test.sh @@ -40,7 +40,7 @@ echo -e "${NC}" cd Unittests #execute tests -./unittests --gtest_color=yes --gtest_output=xml +./unittests --gtest_color=yes --gtest_output=xml:./report.xml echo -e "${OUTPUT}" echo "" @@ -49,7 +49,7 @@ echo "Running unittests $BUILD_TYPE version with minimal vector type" echo "======================================================================" echo -e "${NC}" -./unittests_customvec --gtest_color=yes --gtest_output=xml +./unittests_customvec --gtest_color=yes --gtest_output=xml:./report-customvec.xml echo -e "${OUTPUT}" echo "" @@ -59,7 +59,7 @@ echo "======================================================================" echo -e "${NC}" #execute tests -./unittests_doublevec --gtest_color=yes --gtest_output=xml +./unittests_doublevec --gtest_color=yes --gtest_output=xml:./report-doublevec.xml cd .. cd .. \ No newline at end of file diff --git a/CI/gitlab-ci/windows-template-job.yml b/CI/gitlab-ci/windows-template-job.yml index 2c31c4f9..0d5eb8c3 100644 --- a/CI/gitlab-ci/windows-template-job.yml +++ b/CI/gitlab-ci/windows-template-job.yml @@ -19,7 +19,12 @@ build-{{VSVERSION}}-{{ARCHITECTURE}}-shared-{{SHARED}}-apps: - {{QTTAG}} artifacts: paths: - - build-release/*.exe + - build-release/*.exe + reports: + junit: + - build-release/report.xml + - build-release/report-customvec.xml + - build-release/report-doublevec.xml build-{{VSVERSION}}-{{ARCHITECTURE}}-shared-{{SHARED}}-no-apps: stage: build @@ -34,3 +39,9 @@ build-{{VSVERSION}}-{{ARCHITECTURE}}-shared-{{SHARED}}-no-apps: artifacts: paths: - build-release/*.exe + reports: + junit: + - build-release/report.xml + - build-release/report-customvec.xml + - build-release/report-doublevec.xml + From 9df37090eee6bdae1c182de4c187149a121c77b4 Mon Sep 17 00:00:00 2001 From: Johannes Lenzen Date: Tue, 26 May 2020 12:00:47 +0200 Subject: [PATCH 3/3] directory fix --- .gitlab-ci.yml | 48 +++++++++++++-------------- CI/gitlab-ci/windows-template-job.yml | 12 +++---- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aea39f46..89307908 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -321,9 +321,9 @@ build-VS2017-x64-shared-TRUE-apps: - build-release/*.exe reports: junit: - - build-release/report.xml - - build-release/report-customvec.xml - - build-release/report-doublevec.xml + - build-release/unittests/report.xml + - build-release/unittests/report-customvec.xml + - build-release/unittests/report-doublevec.xml build-VS2017-x64-shared-TRUE-no-apps: stage: build @@ -340,9 +340,9 @@ build-VS2017-x64-shared-TRUE-no-apps: - build-release/*.exe reports: junit: - - build-release/report.xml - - build-release/report-customvec.xml - - build-release/report-doublevec.xml + - build-release/unittests/report.xml + - build-release/unittests/report-customvec.xml + - build-release/unittests/report-doublevec.xml #------------- Job Informations: # Type: Build+Test: Release @@ -368,9 +368,9 @@ build-VS2017-x64-shared-FALSE-apps: - build-release/*.exe reports: junit: - - build-release/report.xml - - build-release/report-customvec.xml - - build-release/report-doublevec.xml + - build-release/unittests/report.xml + - build-release/unittests/report-customvec.xml + - build-release/unittests/report-doublevec.xml build-VS2017-x64-shared-FALSE-no-apps: stage: build @@ -387,9 +387,9 @@ build-VS2017-x64-shared-FALSE-no-apps: - build-release/*.exe reports: junit: - - build-release/report.xml - - build-release/report-customvec.xml - - build-release/report-doublevec.xml + - build-release/unittests/report.xml + - build-release/unittests/report-customvec.xml + - build-release/unittests/report-doublevec.xml #------------- Job Informations: @@ -416,9 +416,9 @@ build-VS2015-x64-shared-TRUE-apps: - build-release/*.exe reports: junit: - - build-release/report.xml - - build-release/report-customvec.xml - - build-release/report-doublevec.xml + - build-release/unittests/report.xml + - build-release/unittests/report-customvec.xml + - build-release/unittests/report-doublevec.xml build-VS2015-x64-shared-TRUE-no-apps: stage: build @@ -435,9 +435,9 @@ build-VS2015-x64-shared-TRUE-no-apps: - build-release/*.exe reports: junit: - - build-release/report.xml - - build-release/report-customvec.xml - - build-release/report-doublevec.xml + - build-release/unittests/report.xml + - build-release/unittests/report-customvec.xml + - build-release/unittests/report-doublevec.xml #------------- Job Informations: # Type: Build+Test: Release @@ -463,9 +463,9 @@ build-VS2015-x64-shared-FALSE-apps: - build-release/*.exe reports: junit: - - build-release/report.xml - - build-release/report-customvec.xml - - build-release/report-doublevec.xml + - build-release/unittests/report.xml + - build-release/unittests/report-customvec.xml + - build-release/unittests/report-doublevec.xml build-VS2015-x64-shared-FALSE-no-apps: stage: build @@ -482,9 +482,9 @@ build-VS2015-x64-shared-FALSE-no-apps: - build-release/*.exe reports: junit: - - build-release/report.xml - - build-release/report-customvec.xml - - build-release/report-doublevec.xml + - build-release/unittests/report.xml + - build-release/unittests/report-customvec.xml + - build-release/unittests/report-doublevec.xml Doc-publish: diff --git a/CI/gitlab-ci/windows-template-job.yml b/CI/gitlab-ci/windows-template-job.yml index 0d5eb8c3..c87d8922 100644 --- a/CI/gitlab-ci/windows-template-job.yml +++ b/CI/gitlab-ci/windows-template-job.yml @@ -22,9 +22,9 @@ build-{{VSVERSION}}-{{ARCHITECTURE}}-shared-{{SHARED}}-apps: - build-release/*.exe reports: junit: - - build-release/report.xml - - build-release/report-customvec.xml - - build-release/report-doublevec.xml + - build-release/unittests/report.xml + - build-release/unittests/report-customvec.xml + - build-release/unittests/report-doublevec.xml build-{{VSVERSION}}-{{ARCHITECTURE}}-shared-{{SHARED}}-no-apps: stage: build @@ -41,7 +41,7 @@ build-{{VSVERSION}}-{{ARCHITECTURE}}-shared-{{SHARED}}-no-apps: - build-release/*.exe reports: junit: - - build-release/report.xml - - build-release/report-customvec.xml - - build-release/report-doublevec.xml + - build-release/unittests/report.xml + - build-release/unittests/report-customvec.xml + - build-release/unittests/report-doublevec.xml