From: Erwin Janssen <erwinjanssen@outlook.com> Date: Mon, 27 Mar 2017 09:12:12 +0000 (+0200) Subject: Restructure appveyor.yml X-Git-Tag: 2.42.0~189^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=282a23cd72a5b2b2305c3c4cd14b3c5d1ab53d09;p=graphviz Restructure appveyor.yml Split the script into three parts, instead of one large block. Because of the block structure, errors didn't show up because only the last command was evaluated when determining whether the build was successful. These errors should now be visible. --- diff --git a/appveyor.yml b/appveyor.yml index c2b52e4f4..cc5330511 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,19 +21,41 @@ before_build: - del "C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets" build_script: + - cd %APPVEYOR_BUILD_FOLDER% + - set PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%\windows\dependencies\graphviz-build-utilities + + # Build - ps: >- - cd $env:APPVEYOR_BUILD_FOLDER + if($env:build_system -eq "cmake") { + mkdir build; + cd build; + cmake ..; + cmake --build . --config $env:configuration; + } + elseif($env:build_system -eq "msbuild") { + msbuild /p:Configuration=$env:configuration + } - if($env:build_system -eq "msbuild") { - $env:Path += ";" + $env:APPVEYOR_BUILD_FOLDER + "\windows\dependencies\graphviz-build-utilities"; - msbuild /p:Configuration=$env:configuration; - if($env:configuration -eq "Release") { + # Package + - ps: >- + if($env:configuration -eq "Release") { + if($env:build_system -eq "cmake") { + cpack + } + elseif($env:build_system -eq "msbuild") { rm Release\Graphviz\bin\*.lastcodeanalysissucceeded; rm Release\Graphviz\bin\*.iobj; rm Release\Graphviz\bin\*.ipdb; rm Release\Graphviz\bin\*.ilk; } + } + # Test + - ps: >- + if($env:build_system -eq "cmake") { + # No tests yet + } + elseif($env:build_system -eq "msbuild") { # Append build destination to the PATH, configure dot and execute regression tests $env:Path += ";" + $env:APPVEYOR_BUILD_FOLDER + "\" + $env:configuration + "\Graphviz\bin"; dot -c; @@ -41,17 +63,6 @@ build_script: ./regression_tests.bat; } - if($env:build_system -eq "cmake") { - $env:Path += ";" + $env:APPVEYOR_BUILD_FOLDER + "\windows\dependencies\graphviz-build-utilities"; - mkdir build; - cd build; - cmake ..; - cmake --build . --config $env:configuration; - if($env:configuration -eq "Release") { - cpack; - } - } - artifacts: - path: Release name: graphviz-windows