summaryrefslogtreecommitdiff
path: root/appveyor.yml
diff options
context:
space:
mode:
Diffstat (limited to 'appveyor.yml')
-rw-r--r--appveyor.yml170
1 files changed, 80 insertions, 90 deletions
diff --git a/appveyor.yml b/appveyor.yml
index cbca569f..d75eff77 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,4 +1,4 @@
-version: 1.0.{build}-{branch}
+version: 0.12.{branch}.appveyor_{build}
clone_depth: 1
@@ -8,112 +8,102 @@ skip_tags: true
os: Windows Server 2012
platform:
-# - x86
-# - x64
- - Win32
+ - Win32 # CMake sucks
+ - x64
configuration:
- Debug
- Release
environment:
- VisualStudioVersion: 10.0
- Generator: Visual Studio 10
- OPENSSL_VERSION: 1.0.2f
+ VisualStudioVersion: 11.0
+ Generator_Base: Visual Studio 11 2012
+ OPENSSL_VERSION: 1.1.0f
PCRE_VERSION: 8.38
-
-cache:
- - '..\zlib-1.2.8'
- - '..\zlib-%PLATFORM%'
- - '..\openssl-%OPENSSL_VERSION%.tar.gz'
- - '..\openssl-%OPENSSL_VERSION%'
- - '..\openssl-%PLATFORM%'
- - '..\pcre-%PCRE_VERSION%.zip'
- - '..\pcre-%PCRE_VERSION%'
- - '..\pcre-%PLATFORM%'
- - 'infrastructure\cmake\build'
+ CMAKE_UNIBUILD_DIR: '%APPVEYOR_BUILD_FOLDER%\..\cmake'
+ BOXBACKUP_VERSION_BASE: 0.12
init:
# Uncomment the following two lines to enable RDP access to the virtual machine for debugging.
# - reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /t REG_DWORD /d 0 /f
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
+ - ps: $env:date_string = Get-Date -Format "yyMMdd"
+ - ps: $env:sane_platform = $($env:PLATFORM.replace("Win32", "x86"))
+ # http://help.appveyor.com/discussions/problems/2874-how-can-i-add-commit-id-to-build-version
+ - ps: $env:boxbackup_version_full="$env:BOXBACKUP_VERSION_BASE.$env:APPVEYOR_REPO_BRANCH.$env:date_string.$($env:APPVEYOR_REPO_COMMIT.substring(0,7))"
+ - ps: Update-AppveyorBuild -Version "$env:boxbackup_version_full"
+ - ps: $env:compiled_version="$($env:boxbackup_version_full)_Win_$($env:sane_platform)_$($env:CONFIGURATION)"
+ # The only way to switch between 32-bit and 64-bit compilers appears to be to append " Win64"
+ # to the generator name if you want a 64-bit build (x64 platform):
+ - ps: $env:generator_name="$($env:Generator_Base)$(if ($env:PLATFORM.equals('x64')) {' Win64'})"
+
+# scripts that run after cloning repository (before the build step, not after!)
+install:
+ # test_bbackupd needs 7zip (or cmake -E tar) to extract tar archives on Windows:
+ - cinst -y --limit-output 7zip.commandline nsis.portable
+ - dir "c:\Program Files"
+ - dir "c:\Program Files (x86)"
+ # We don't need strawberryperl on AppVeyor because there is already a Perl in c:\Perl.
+ # If you are doing this on a fresh box for development, you would probably want to
+ # install Chocolatey and then run:
+ # cinst -y cmake.portable strawberryperl git vim visualstudio2012wdx
+ # We install cmake.portable instead of cmake, to get it on the path again
+ # <http://disq.us/p/xdknrt>.
+
+ - '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86'
+ - if not exist %CMAKE_UNIBUILD_DIR% md %CMAKE_UNIBUILD_DIR%
+ - cd %CMAKE_UNIBUILD_DIR%
+ # We need to specify the generator here, in case the user has more than one installed.
+ # CMake always seems to default to the latest version of Visual Studio, not the one on
+ # the current PATH.
+ - echo cmake -G "%generator_name%"
+ -DBOXBACKUP_VERSION=%compiled_version%
+ -DSUB_CMAKE_EXTRA_ARGS="-- /verbosity:minimal"
+ %APPVEYOR_BUILD_FOLDER%\infrastructure\cmake\windows
+ - cmake -G "%generator_name%"
+ -DBOXBACKUP_VERSION=%compiled_version%
+ -DSUB_CMAKE_EXTRA_ARGS="-- /verbosity:minimal"
+ %APPVEYOR_BUILD_FOLDER%\infrastructure\cmake\windows
+
+ # Leave the current directory in the correct place to find the solution file using its relative path above.
+
+# Remove Xamarin to remove 500 lines of junk from build logs
+# http://help.appveyor.com/discussions/problems/4569-the-target-_convertpdbfiles-listed-in-a-beforetargets-attribute-at-c-does-not-exist-in-the-project-and-will-be-ignored
+before_build:
+ - del "C:\Program Files (x86)\MSBuild\4.0\Microsoft.Common.Targets\ImportAfter\Xamarin.Common.targets"
build:
parallel: true
- project: infrastructure/cmake/build/BoxBackup.sln
-
-install:
- # Show compiled files restored from cache
- - dir %APPVEYOR_BUILD_FOLDER%\infrastructure\cmake\build
- - dir %APPVEYOR_BUILD_FOLDER%\infrastructure\cmake\build\bin_bbackupd.dir
- - dir %APPVEYOR_BUILD_FOLDER%\infrastructure\cmake\build\bin_bbackupd.dir\%CONFIGURATION%
- - dir %APPVEYOR_BUILD_FOLDER%\infrastructure\cmake\build\%PLATFORM%
- - dir %APPVEYOR_BUILD_FOLDER%\infrastructure\cmake\build\%PLATFORM%\%CONFIGURATION%
- - dir %APPVEYOR_BUILD_FOLDER%\infrastructure\cmake\build\%PLATFORM%\%CONFIGURATION%\ALL_BUILD
+ project: ..\cmake\BoxBackup_Windows.sln
+ verbosity: minimal
- - cinst strawberryperl 7zip.commandline cmake
-
- # - dir "C:\Program Files\Microsoft SDKs\Windows"
- # - dir "C:\Program Files\Microsoft SDKs\Windows\v7.1"
- # - dir "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin"
+test_script:
+ - cd %CMAKE_UNIBUILD_DIR%\Build\boxbackup
+ # - dir
+ # - dir bin_bbackupd.dir
+ # - dir %PLATFORM%
+ # - dir %PLATFORM%\%CONFIGURATION%
+ - ctest -C %CONFIGURATION% -V --interactive-debug-mode 0
- - '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86'
+ # After running tests successfully, build the artifacts that we want to upload:
+ - cmake --build . --config %CONFIGURATION% --target package
- - cd %APPVEYOR_BUILD_FOLDER%\..
- - if not exist zlib128.zip appveyor DownloadFile "http://zlib.net/zlib128.zip"
- - 7za x -aoa zlib128.zip
- - cd zlib-1.2.8
- - cmake -G "%Generator%" -A %PLATFORM% -DCMAKE_INSTALL_PREFIX="..\zlib-%PLATFORM%" .
- # We need to build both versions, debug and release, because cmake requires both to be
- # present to generate its multi-configuration project files for Visual Studio/MSBuild.
- - msbuild INSTALL.vcxproj /m /p:Configuration=Debug /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- - msbuild INSTALL.vcxproj /m /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
-
- - cd %APPVEYOR_BUILD_FOLDER%\..
- - if not exist openssl-%OPENSSL_VERSION%.tar.gz appveyor DownloadFile "https://www.openssl.org/source/openssl-%OPENSSL_VERSION%.tar.gz"
- - 7za x -aoa openssl-%OPENSSL_VERSION%.tar.gz
- - 7za x -aoa openssl-%OPENSSL_VERSION%.tar
- - cd openssl-%OPENSSL_VERSION%
- - perl Configure debug-VC-WIN32 no-asm --prefix="%APPVEYOR_BUILD_FOLDER%\..\openssl-%PLATFORM%"
- - ms\do_ms
- - nmake /s /f ms\nt.mak
- - nmake /s /f ms\nt.mak install
-
- - cd %APPVEYOR_BUILD_FOLDER%\..
- - if not exist pcre-%PCRE_VERSION%.zip appveyor DownloadFile "http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-%PCRE_VERSION%.zip"
- - 7za x -aoa pcre-%PCRE_VERSION%.zip
- - cd %APPVEYOR_BUILD_FOLDER%\..
- - cd pcre-%PCRE_VERSION%
- - cmake -G "%Generator%" -A %PLATFORM% -DCMAKE_INSTALL_PREFIX="..\pcre-%PLATFORM%" .
+ # AppVeyor refuses to package files outside of the project directory, so we need to push them:
- dir
- # We need to build both versions, debug and release, because cmake requires both to be
- # present to generate its multi-configuration project files for Visual Studio/MSBuild.
- - msbuild INSTALL.vcxproj /m /p:Configuration=Debug /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- - msbuild INSTALL.vcxproj /m /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- - cd %APPVEYOR_BUILD_FOLDER%\..
- - dir
- - dir pcre-%PLATFORM%
- - dir pcre-%PLATFORM%\bin
- - dir pcre-%PLATFORM%\lib
-
- - cd %APPVEYOR_BUILD_FOLDER%
- - cd infrastructure\cmake\build
- - cmake -G "%Generator%" -A %PLATFORM% ..
- - cd %APPVEYOR_BUILD_FOLDER%
-
- # Show files after build
- - dir %APPVEYOR_BUILD_FOLDER%\..\zlib-1.2.8
- - dir %APPVEYOR_BUILD_FOLDER%\..\zlib-%PLATFORM%
- - dir %APPVEYOR_BUILD_FOLDER%\..\openssl-%OPENSSL_VERSION%
- - dir %APPVEYOR_BUILD_FOLDER%\..\openssl-%PLATFORM%
- - dir %APPVEYOR_BUILD_FOLDER%\..\pcre-%PCRE_VERSION%
- - dir %APPVEYOR_BUILD_FOLDER%\..\pcre-%PLATFORM%
- - dir %APPVEYOR_BUILD_FOLDER%\infrastructure\cmake\build
- - dir %APPVEYOR_BUILD_FOLDER%\infrastructure\cmake\build\bin_bbackupd.dir
- - dir %APPVEYOR_BUILD_FOLDER%\infrastructure\cmake\build\%PLATFORM%
- - dir %APPVEYOR_BUILD_FOLDER%\infrastructure\cmake\build\%PLATFORM%\%CONFIGURATION%
-
-test_script:
- - cd %APPVEYOR_BUILD_FOLDER%\infrastructure\cmake\build
- - ctest -C %CONFIGURATION% -V
+ - appveyor PushArtifact -path BoxBackup-%compiled_version%.zip -DeploymentName BoxBackup-%compiled_version%
+ - appveyor PushArtifact -path BoxBackup-%compiled_version%.exe -DeploymentName BoxBackup-%compiled_version%
+
+deploy:
+ - provider: GitHub
+ release: BoxBackup-$(boxbackup_version_full)
+ artifact: BoxBackup-$(compiled_version)
+ description: "Windows client binaries auto-built by AppVeyor"
+ draft: false
+ prerelease: true
+ auth_token:
+ secure: WZi3MJGA5zIIAAij0if4auYeltJlyWUOePTYlCGvrNrgEVjYRkqILHzvVKDnLn43
+ on:
+ branch:
+ - master
+ - windows_binary_packages