Skip to content

Commit

Permalink
Merge pull request BOINC#1886 from AenBleidd/AppVeyorSupport-for-pr
Browse files Browse the repository at this point in the history
Build Windows: Add AppVeyor support for Windows CI builds.
  • Loading branch information
ChristianBeer authored Aug 10, 2017
2 parents 92d87fb + f3facce commit fd68b1c
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 0 deletions.
34 changes: 34 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
image: Visual Studio 2013

matrix:
fast_finish: true

platform:
# - Win32
- x64

configuration:
- Debug
# - Release

environment:
matrix:
- TOOLCHAIN_VERSION: 12.0
solution_name: win_build\boinc_vs2013.sln
depends_git_path: http://boinc.berkeley.edu/git/boinc_depends_win_vs2013.git
depends_path: C:\projects\boinc_depends_win_vs2013

cache:
- C:\projects\boinc_depends_win_vs2013

before_build:
- call win_build\load_dependencies.bat %depends_git_path% %depends_path% %platform% %configuration%
- if %TOOLCHAIN_VERSION%==12.0 call "%VS120COMNTOOLS%\vsvars32.bat"

build_script:
- devenv %solution_name% /Build "%configuration%|%platform%"

build:
parallel: true

test: off
70 changes: 70 additions & 0 deletions win_build/load_dependencies.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
@echo off
set dependencies_git_path=%1
set dependencies_path=%2
set revision_lst_path=%dependencies_path%\revision.lst
set platform=%3
set configuration=%4

if exist %revision_lst_path% (
set /p temp_saved_revision=<%dependencies_path%\revision.lst
set saved_revision=%temp_saved_revision%

for /f %%i in ('git ls-remote %dependencies_git_path% HEAD') do (
set last_revision=%%i
if "%last_revision%" == "%saved_revision%" (
echo Dependencies are up-to-date
goto :EOF
)
goto :PROCESS
)
)

:PROCESS

if exist %dependencies_path% (
rd /s /q %dependencies_path%
)

git clone -q --branch=master %dependencies_git_path% %dependencies_path%

rd /s /q %dependencies_path%\.git

if "%platform%" == "Win32" (
rd /s /q %dependencies_path%\curl\mswin\x64
rd /s /q %dependencies_path%\freetype\mswin\x64
rd /s /q %dependencies_path%\ftgl\mswin\x64
rd /s /q %dependencies_path%\openssl\mswin\x64
rd /s /q %dependencies_path%\sqlite3\mswin\x64
rd /s /q %dependencies_path%\wxwidgets\mswin\x64
rd /s /q %dependencies_path%\zlib\mswin\x64
) else (
rd /s /q %dependencies_path%\curl\mswin\Win32
rd /s /q %dependencies_path%\freetype\mswin\Win32
rd /s /q %dependencies_path%\ftgl\mswin\Win32
rd /s /q %dependencies_path%\openssl\mswin\Win32
rd /s /q %dependencies_path%\sqlite3\mswin\Win32
rd /s /q %dependencies_path%\wxwidgets\mswin\Win32
rd /s /q %dependencies_path%\zlib\mswin\Win32
)

if "%configuration%" == "Debug" (
rd /s /q %dependencies_path%\curl\mswin\%platform%\Release
rd /s /q %dependencies_path%\freetype\mswin\%platform%\Release
rd /s /q %dependencies_path%\ftgl\mswin\%platform%\Release
rd /s /q %dependencies_path%\openssl\mswin\%platform%\Release
rd /s /q %dependencies_path%\sqlite3\mswin\%platform%\Release
rd /s /q %dependencies_path%\wxwidgets\mswin\%platform%\Release
rd /s /q %dependencies_path%\zlib\mswin\%platform%\Release
) else (
rd /s /q %dependencies_path%\curl\mswin\%platform%\Debug
rd /s /q %dependencies_path%\freetype\mswin\%platform%\Debug
rd /s /q %dependencies_path%\ftgl\mswin\%platform%\Debug
rd /s /q %dependencies_path%\openssl\mswin\%platform%\Debug
rd /s /q %dependencies_path%\sqlite3\mswin\%platform%\Debug
rd /s /q %dependencies_path%\wxwidgets\mswin\%platform%\Debug
rd /s /q %dependencies_path%\zlib\mswin\%platform%\Debug
)

echo | set /p dummy="%last_revision%" > %revision_lst_path%

goto :EOF

0 comments on commit fd68b1c

Please sign in to comment.