Browse Source

Install files on Appveyor

Shows that the installation in CMake works and what files are installed
Matt Clarkson 10 years ago
parent
commit
4a2e52bfdc
1 changed files with 16 additions and 3 deletions
  1. 16 3
      appveyor.yml

+ 16 - 3
appveyor.yml

@@ -76,9 +76,14 @@ before_build:
   - if not "%compiler_path%"=="" (set "PATH=%PATH%;%compiler_path%")
   - if not "%compiler_path%"=="" (set "PATH=%PATH%;%compiler_path%")
   # git bash conflicts with MinGW makefiles
   # git bash conflicts with MinGW makefiles
   - if "%generator%"=="MinGW Makefiles" (set "PATH=%PATH:C:\Program Files (x86)\Git\bin=%")
   - if "%generator%"=="MinGW Makefiles" (set "PATH=%PATH:C:\Program Files (x86)\Git\bin=%")
+  # Useful locations
+  - set "source_path=%cd%"
+  - set "output_path=%source_path%\output"
+  - set "build_path=%output_path%\build"
+  - set "install_path=%output_path%\install"
   # Generate the build files
   # Generate the build files
-  - mkdir output
-  - cd output
+  - mkdir "%build_path%"
+  - cd "%build_path%"
   - cmake --version
   - cmake --version
   - appveyor AddMessage -Category Information "Generating '%generator%'"
   - appveyor AddMessage -Category Information "Generating '%generator%'"
   - cmake
   - cmake
@@ -93,16 +98,24 @@ before_build:
     -DCIVETWEB_ENABLE_LUA_SHARED=%enable_lua_shared%
     -DCIVETWEB_ENABLE_LUA_SHARED=%enable_lua_shared%
     -DCIVETWEB_C_STANDARD=%c_standard%
     -DCIVETWEB_C_STANDARD=%c_standard%
     -DCIVETWEB_CXX_STANDARD=%cxx_standard%
     -DCIVETWEB_CXX_STANDARD=%cxx_standard%
-    ..
+    "%source_path%"
   - appveyor PushArtifact CMakeCache.txt
   - appveyor PushArtifact CMakeCache.txt
+  - cd "%source_path%"
 
 
 build_script:
 build_script:
+  - cd "%build_path%"
   - appveyor AddMessage -Category Information "Build command '%build%'"
   - appveyor AddMessage -Category Information "Build command '%build%'"
   - cmd /c "%build%"
   - cmd /c "%build%"
+  - cd "%source_path%"
 
 
 test_script:
 test_script:
+  - cd "%build_path%"
   - appveyor AddMessage -Category Information "Test command '%build%'"
   - appveyor AddMessage -Category Information "Test command '%build%'"
   - cmd /c "%test%"
   - cmd /c "%test%"
+  - cd "%source_path%"
+
+after_test:
+  - cmake "-DCMAKE_INSTALL_PREFIX=%install_path%" -P "%build_path%/cmake_install.cmake"
 
 
 matrix:
 matrix:
   fast_finish: true
   fast_finish: true