]> granicus.if.org Git - graphviz/commitdiff
Restructure appveyor.yml
authorErwin Janssen <erwinjanssen@outlook.com>
Mon, 27 Mar 2017 09:12:12 +0000 (11:12 +0200)
committerErwin Janssen <erwinjanssen@outlook.com>
Mon, 27 Mar 2017 09:17:56 +0000 (11:17 +0200)
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.

appveyor.yml

index c2b52e4f43224e3f93a48e0b6d49e297e00b4658..cc533051106fe9b275247b0805713e3f573ff2b4 100644 (file)
@@ -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