Skip to content

Commit

Permalink
Merge pull request #7 from sum01/appveyor_fix
Browse files Browse the repository at this point in the history
Appveyor fix
  • Loading branch information
sago007 authored Apr 20, 2018
2 parents d7909cd + 3a8426e commit b31160a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# PlatformFolders [![Build Status](https://travis-ci.org/sago007/PlatformFolders.svg?branch=master)](https://travis-ci.org/sago007/PlatformFolders) [![license](https://img.shields.io/github/license/sago007/PlatformFolders.svg)](https://raw.githubusercontent.com/sago007/PlatformFolders/master/LICENSE)
# PlatformFolders [![Build Status](https://travis-ci.org/sago007/PlatformFolders.svg?branch=master)](https://travis-ci.org/sago007/PlatformFolders) [![AppVeyor](https://img.shields.io/appveyor/ci/sago007/PlatformFolders.svg?label=Windows)](https://ci.appveyor.com/project/sago007/platformfolders) [![license](https://img.shields.io/github/license/sago007/PlatformFolders.svg)](https://raw.githubusercontent.com/sago007/PlatformFolders/master/LICENSE)

A C++ library to look for special directories like "My Documents" and "%APPDATA%" so that you do not need to write Linux, Windows and Mac OS X specific code

Can be found at: https://github.com/sago007/PlatformFolders
Expand Down
22 changes: 9 additions & 13 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,15 @@ clone_depth: 1

# Generate the .sln file with Cmake before running MSBuild
before_build:
- cmd: mkdir c:\projects\platform_folders\build
- cmd: cd c:\projects\platform_folders\build
- cmd: mkdir "%APPVEYOR_BUILD_FOLDER%"\build
- cmd: cd "%APPVEYOR_BUILD_FOLDER%"\build
# I know this is ugly, but the matrix didn't work, and newlines seem to not be supported
- cmd: IF %APPVEYOR_BUILD_WORKER_IMAGE%=="Visual Studio 2015" (IF %PLATFORM%=="x86" (cmake -G "Visual Studio 14 2015" ..) ELSE (cmake -G "Visual Studio 14 2015 Win64" -T host=x64 ..)) ELSE (IF %PLATFORM%=="x86" (cmake -G "Visual Studio 15 2017" ..) ELSE (cmake -G "Visual Studio 15 2017 Win64" -T host=x64 ..))
- cmd: IF "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" (IF "%PLATFORM%"=="x86" (cmake -G "Visual Studio 14 2015" ..) ELSE (cmake -G "Visual Studio 14 2015 Win64" -T host=x64 ..)) ELSE (IF "%PLATFORM%"=="x86" (cmake -G "Visual Studio 15 2017" ..) ELSE (cmake -G "Visual Studio 15 2017 Win64" -T host=x64 ..))

# Runs MSBuild.exe with logging & some options
build:
# Allows for faster builds
parallel: true
# The solution file is the name of the project() given to Cmake
project: platform_folders.sln
# Trust me, you don't want higher than minimal. Even this is spammy
verbosity: minimal
# CMake generates the platform as "Win32" instead of "x86" when building 32-bit
# but 64-bit is "x64"
build_script:
- cmd: IF "%PLATFORM%"=="x86" (MSBuild.exe "%APPVEYOR_BUILD_FOLDER%"\build\platform_folders.sln /p:Configuration="%CONFIGURATION%" /p:Platform="Win32" /v:minimal /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll") ELSE (MSBuild.exe "%APPVEYOR_BUILD_FOLDER%"\build\platform_folders.sln /p:Configuration="%CONFIGURATION%" /p:Platform="%PLATFORM%" /v:minimal /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll")

#---------------------------------#
# tests configuration #
Expand All @@ -67,12 +63,12 @@ build:
# to run your custom scripts instead of automatic tests
# The %CONFIGURATION% and %PLATFORM% variables are set from Appveyor as env-vars
test_script:
- cmd: MSBuild.exe /p:Configuration=%CONFIGURATION% /p:Platform=%PLATFORM% /v:minimal RUN_TESTS.vcxproj
- cmd: MSBuild.exe /p:Configuration="%CONFIGURATION%" /p:Platform="%PLATFORM%" /v:minimal "%APPVEYOR_BUILD_FOLDER%"\build\RUN_TESTS.vcxproj

#---------------------------------#
# global handlers #
#---------------------------------#

# on build failure dump cmake err log
on_failure:
- cmd: type c:\projects\platform_folders\build\CMakeFiles\CMakeError.log
- cmd: IF exist "%APPVEYOR_BUILD_FOLDER%"\build\CMakeFiles\CMakeError.log (type "%APPVEYOR_BUILD_FOLDER%"\build\CMakeFiles\CMakeError.log)

0 comments on commit b31160a

Please sign in to comment.