]> granicus.if.org Git - graphviz/commitdiff
Replace Windows build code in CI config with new build script
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Mon, 17 Aug 2020 09:55:00 +0000 (11:55 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Tue, 25 Aug 2020 11:34:56 +0000 (13:34 +0200)
.gitlab-ci.yml

index 97fbfa5a94ef26d28b8f81e11726fa2cc5ea3594..6cc9f47e8bba15c879faf7daa020e2dfdb85f89b 100644 (file)
@@ -67,30 +67,12 @@ portable-source:
         # Retrieve submodules, dependencies are stored there.
         - git submodule update --init
         # Install and set PATH
-        - $Env:Path += ";$env:CI_PROJECT_DIR\windows\dependencies\graphviz-build-utilities"
-        - $Env:Path += ";$env:CI_PROJECT_DIR\windows\dependencies\graphviz-build-utilities\NSIS\Bin"
-        - $Env:Path += ";$env:CI_PROJECT_DIR\windows\dependencies\graphviz-build-utilities\Perl64\bin"
-        - $Env:Path += ";$env:CI_PROJECT_DIR\windows\dependencies\graphviz-build-utilities\Python38-32"
-        - $Env:Path += ";$env:CI_PROJECT_DIR\windows\dependencies\graphviz-build-utilities\Python38-32\Scripts"
-        - $Env:Path += ";$env:CI_PROJECT_DIR\windows\dependencies\graphviz-build-utilities\GnuWin\bin"
-        # CMake's cpack must be before Chocolatey's in the path
-        - $Env:Path = "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;$Env:Path"
-        - $Env:Path += ";C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin"
         - $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
         - python3 gen_version.py > VERSION
         - python3 gen_version.py --collection > COLLECTION
-        - >-
-            if($env:build_system -eq "cmake") {
-              mkdir build;
-              cd build;
-              cmake -G "$env:generator" -A $Env:project_platform ..;
-              cmake --build . --config $env:configuration;
-              cd ..;
-            }
-            elseif($env:build_system -eq "msbuild") {
-              msbuild /p:Configuration=$env:configuration
-            }
         # Package
         - $Env:GV_VERSION=$( cat VERSION )
         - >-
@@ -99,20 +81,6 @@ portable-source:
             } else {
                 $API = "win32";
             }
-        - >-
-            if($env:build_system -eq "cmake") {
-              cd build;
-              cpack -C $env:configuration
-              cd ..;
-            }
-            elseif($env:build_system -eq "msbuild") {
-              if($env:configuration -eq "Release") {
-                rm Release\Graphviz\bin\*.lastcodeanalysissucceeded;
-                rm Release\Graphviz\bin\*.iobj;
-                rm Release\Graphviz\bin\*.ipdb;
-                rm Release\Graphviz\bin\*.ilk;
-              }
-            }
         # Test
         # Set up VCTools variables and import into PowerShell environment
         - cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat`" $TARGET_ARCH && set > %temp%\vcvars.txt";