# 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 )
- >-
} 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";