]> granicus.if.org Git - graphviz/commitdiff
Fix platform name in Windows CI artifacts directory
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Sat, 22 Aug 2020 08:27:06 +0000 (10:27 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Sun, 23 Aug 2020 16:05:03 +0000 (18:05 +0200)
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.

.gitlab-ci.yml

index 998390b5b5d024dd25de926592925ee7bed9cae2..e92bf9e7b31cf65e95a19141ff8adf2db3a53a7a 100644 (file)
@@ -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"