From ca92c77b0c043001322932431dac907f9ecb6bec Mon Sep 17 00:00:00 2001 From: Adam Sapek Date: Tue, 7 Jul 2015 12:09:37 -0700 Subject: [PATCH] Build documentation as part of Appveyor CI build --- appveyor.yml | 42 ++++++++++++++++++++++++++++++++++-------- doc/CMakeLists.txt | 10 ++++++++++ 2 files changed, 44 insertions(+), 8 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 52f8a27b..c62eee40 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,17 +20,30 @@ environment: matrix: - BOND_BUILD: C++ + - BOND_BUILD: Doc - BOND_BUILD: C# - BOND_PROJECT: cs\cs.sln BOND_OUTPUT: Properties BOND_CONFIG: Debug - BOND_BUILD: C# - BOND_PROJECT: cs\cs.sln BOND_OUTPUT: Fields BOND_CONFIG: Fields install: - ps: >- + choco install haskellplatform -version 2014.2.0.0 -y + + $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + + cabal update + + if ($env:BOND_BUILD -eq "Doc") { + + cabal install --verbose=0 pandoc + + choco install doxygen.install -y + + } + if ($env:BOND_BUILD -eq "C++") { git submodule update --init @@ -51,11 +64,8 @@ } - choco install haskellplatform -version 2014.2.0.0 -y - $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") - cabal update cache: - cs\packages -> cs\test\core\packages.config - compiler\.cabal-sandbox -> compiler\bond.cabal @@ -65,7 +75,7 @@ - ps: >- if ($env:BOND_BUILD -eq "C#") { - nuget restore $env:BOND_PROJECT + nuget restore cs\cs.sln } @@ -77,12 +87,28 @@ cmake -G "Visual Studio 14 2015 Win64" .. - $env:PreferredToolArchitecture = "x64" + } + + if ($env:BOND_BUILD -eq "Doc") { + + mkdir build + + cd build + + cmake ../doc } + $env:PreferredToolArchitecture = "x64" + build_script: - ps: >- + if ($env:BOND_BUILD -eq "Doc") { + + cmake --build . --target documentation -- /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" + + } + if ($env:BOND_BUILD -eq "C++") { cmake --build . --target check -- /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" @@ -91,7 +117,7 @@ if ($env:BOND_BUILD -eq "C#") { - msbuild ${env:BOND_PROJECT} /verbosity:minimal /p:Configuration=${env:BOND_CONFIG} /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" + msbuild cs\cs.sln /verbosity:minimal /p:Configuration=${env:BOND_CONFIG} /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" } diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 23d1d4dd..8bb0d2e3 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,6 +1,16 @@ +cmake_minimum_required (VERSION 2.8.12) + +set (CMAKE_MODULE_PATH + ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) + include (CMakeParseArguments) include (HaskellUtil) +# build the compiler when doc directory is build by itself +if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) + add_subdirectory (../compiler ${CMAKE_CURRENT_BINARY_DIR}/compiler) +endif() + # # add_pandoc_markdown (file.md [file2.md ...] # [CODE code]