From: Magnus Jacobsson Date: Sat, 22 Aug 2020 08:27:06 +0000 (+0200) Subject: Fix platform name in Windows CI artifacts directory X-Git-Tag: 2.46.0~20^2^2~114^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=614998cdfa34e555fae859089ec21006e35bf9d8;p=graphviz Fix platform name in Windows CI artifacts directory By renaming $Env:platform to $Env:project_platform. This avoids a clash with the environment set up with vcvarsall.bat which changes $Env:platform to the *architecture* which is 'x86' or 'x64' while we use 'Win32' or 'x64' as the *project-level* platform. From https://docs.microsoft.com/en-us/visualstudio/ide/how-to-configure-projects-to-target-platforms?view=vs-2019: "Note The Win32 platform name is used for C++ projects, and it means x86. Visual Studio considers both project-level platforms and solution-level platforms, and the project platforms come from the language-specific project systems. C++ projects use Win32 and x64, but the solution platforms use x86 and x64. When you choose x86 as the solution configuration, Visual Studio selects the Win32 platform for C++ projects." Fixes https://gitlab.com/graphviz/graphviz/-/issues/1803. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 998390b5b..e92bf9e7b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -58,7 +58,7 @@ portable-source: script: - $ErrorActionPreference = "Stop" # Toolchain definitions - - if($env:platform -eq "x64") { + - if($Env:project_platform -eq "x64") { $TARGET_ARCH = "x64"; } else { @@ -84,7 +84,7 @@ portable-source: if($env:build_system -eq "cmake") { mkdir build; cd build; - cmake -G "$env:generator" -A $Env:platform ..; + cmake -G "$env:generator" -A $Env:project_platform ..; cmake --build . --config $env:configuration; cd ..; } @@ -94,7 +94,7 @@ portable-source: # Package - $Env:GV_VERSION=$( cat VERSION ) - >- - if($env:platform -eq "x64") { + if($Env:project_platform -eq "x64") { $API = "win64"; } else { $API = "win32"; @@ -151,7 +151,7 @@ portable-source: - $ID = "windows" - $VERSION_ID = "10" - $COLLECTION = $( cat COLLECTION ) - - $DIR = "Packages\${COLLECTION}\${ID}\${VERSION_ID}\$env:build_system\$env:configuration\$Env:platform" + - $DIR = "Packages\${COLLECTION}\${ID}\${VERSION_ID}\$env:build_system\$env:configuration\$Env:project_platform" - mkdir -p $DIR - >- if($env:build_system -eq "cmake") { @@ -259,7 +259,7 @@ windows-cmake-Win32-release-build: <<: *windows_build_definition before_script: - $Env:generator = "Visual Studio 16 2019" - - $Env:platform = "Win32" + - $Env:project_platform = "Win32" - $Env:configuration = "Release" - $Env:build_system = "cmake" @@ -267,7 +267,7 @@ windows-cmake-Win32-debug-build: <<: *windows_build_definition before_script: - $Env:generator = "Visual Studio 16 2019" - - $Env:platform = "Win32" + - $Env:project_platform = "Win32" - $Env:configuration = "Debug" - $Env:build_system = "cmake" @@ -275,7 +275,7 @@ windows-cmake-x64-release-build: <<: *windows_build_definition before_script: - $Env:generator = "Visual Studio 16 2019" - - $Env:platform = "x64" + - $Env:project_platform = "x64" - $Env:configuration = "Release" - $Env:build_system = "cmake" @@ -283,21 +283,21 @@ windows-cmake-x64-debug-build: <<: *windows_build_definition before_script: - $Env:generator = "Visual Studio 16 2019" - - $Env:platform = "x64" + - $Env:project_platform = "x64" - $Env:configuration = "Debug" - $Env:build_system = "cmake" windows-msbuild-Win32-release-build: <<: *windows_build_definition before_script: - - $Env:platform = "Win32" + - $Env:project_platform = "Win32" - $Env:configuration = "Release" - $Env:build_system = "msbuild" windows-msbuild-Win32-debug-build: <<: *windows_build_definition before_script: - - $Env:platform = "Win32" + - $Env:project_platform = "Win32" - $Env:configuration = "Debug" - $Env:build_system = "msbuild"