From: Magnus Jacobsson Date: Thu, 10 Sep 2020 17:55:46 +0000 (+0200) Subject: Add a metrics report with warnings to CI also for Windows X-Git-Tag: 2.46.0~20^2^2~84^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cbcb06cfd37eb9b0de67f45c4dcc6bc59e5d1139;p=graphviz Add a metrics report with warnings to CI also for Windows --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 15fd0b8ce..a43446f8d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -69,6 +69,7 @@ portable-source: needs: [] script: - $ErrorActionPreference = "Stop" + - $PSDefaultParameterValues['Out-File:Encoding'] = 'utf8' # Toolchain definitions - if($Env:project_platform -eq "x64") { $TARGET_ARCH = "x64"; @@ -82,7 +83,12 @@ portable-source: - $Env:graphviz_install_dir = "C:\Graphviz" # Build - Set-ExecutionPolicy Bypass -Force -Scope Process - - windows/bin/setup-and-build.ps1 -buildsystem $env:build_system -platform $Env:project_platform -configuration $env:configuration + - $logfile = New-TemporaryFile + - windows/bin/setup-and-build.ps1 -buildsystem $env:build_system -platform $Env:project_platform -configuration $env:configuration 2>&1 | tee $logfile + - $warnings_count = Invoke-Expression "grep -c ' warning ' $logfile" + - echo "$CI_JOB_NAME-warnings $warnings_count" > metrics.txt + - rm $logfile + - cat metrics.txt - python3 gen_version.py > VERSION - python3 gen_version.py --collection > COLLECTION # Package @@ -143,6 +149,8 @@ portable-source: paths: - Packages/*/*/*/*/*/*/*.exe - Packages/*/*/*/*/*/*/*.zip + reports: + metrics: metrics.txt tags: - windows