123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- version: '{build}'
- os: Visual Studio 2015 RC
- clone_folder: c:\projects\open62541
- clone_depth: 20
- environment:
- matrix:
- - Compiler: msvc
- Arch: x86
- - Compiler: msvc
- Arch: x64
- - Compiler: mingw
- Arch: x86
- - Compiler: mingw
- Arch: x64
- # cygwin cmake stopped working on 05.07.2016 -- commented out until a fix appears
- # - Compiler: cygwin
- # Arch: x86
- #
- # Initialisation prior to pulling the Mono repository
- # Attempt to ensure we don't try to convert line endings to Win32 CRLF as this will cause build to fail
- #
- init:
- - git config --global core.autocrlf input
- #
- # Install needed build dependencies
- #
- install:
- - git submodule update --init --recursive
- before_build:
- # Workaround for CMake not wanting sh.exe on PATH for MinGW
- - set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- build_script:
- - ps: |
- cd c:\projects\open62541
- md build
- cd build
- if ($env:Compiler -eq "mingw") {
- if ($env:Arch -eq "x64") {
- echo "Testing MinGW64"
- $env:Path = "C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin;" + $env:Path
- } else {
- echo "Testing MinGW32"
- $env:Path = "C:\MinGW\bin;" + $env:Path
- }
- cmake -DUA_BUILD_EXAMPLES:BOOL=ON -G"MinGW Makefiles" ..
- mingw32-make -j4
- } elseif ($env:Compiler -eq "cygwin") {
- echo "Testing cygwin"
- $env:Path = "C:\cygwin\bin;" + $env:Path
- C:\cygwin\bin\bash -lc "cygcheck -dc cygwin"
- C:\cygwin\bin\bash --login -lc "cmake.exe --version"
- C:\cygwin\bin\bash --login -lc "cd /cygdrive/c/projects/open62541/build; cmake -DUA_BUILD_EXAMPLES:BOOL=ON -G\"Unix Makefiles\" .."
- C:\cygwin\bin\bash --login -lc "cd /cygdrive/c/projects/open62541/build; make -j"
- } else {
- if ($env:Arch -eq "x64") {
- echo "Testing MSVC with amalgamation (x64)"
- cd ..
- md build64
- cd build64
- cmake -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_ENABLE_AMALGAMATION:BOOL=ON -G"Visual Studio 12 2013 Win64" ..
- msbuild open62541.sln /m
- copy C:\projects\open62541\build64\open62541.c C:\projects\open62541\build64\Debug\open62541.c
- copy C:\projects\open62541\build64\open62541.h C:\projects\open62541\build64\Debug\open62541.h
- copy C:\projects\open62541\build64\examples\server_cert.der C:\projects\open62541\build64\Debug\server_cert.der
- } else {
- echo "Testing MSVC without amalgamation (x86)"
- cmake -DUA_BUILD_EXAMPLES:BOOL=ON -G"Visual Studio 12 2013" ..
- msbuild open62541.sln /m
- cd ..
- Remove-Item .\build -Force -Recurse
- md build
- cd build
- echo "Testing MSVC with amalgamation (x86)"
- cmake -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_ENABLE_AMALGAMATION:BOOL=ON -G"Visual Studio 12 2013" ..
- msbuild open62541.sln /m
- copy C:\projects\open62541\build\open62541.c C:\projects\open62541\build\Debug\open62541.c
- copy C:\projects\open62541\build\open62541.h C:\projects\open62541\build\Debug\open62541.h
- copy C:\projects\open62541\build\examples\server_cert.der C:\projects\open62541\build\Debug\server_cert.der
- }
- }
- echo "Build done"
- after_build:
- - ps: |
- if ($env:Compiler -eq "msvc") {
- if ($env:Arch -eq "x64") {
- 7z a open62541-win64.zip C:\projects\open62541\build64\Debug\*
- appveyor PushArtifact open62541-win64.zip
- } else {
- 7z a open62541-win32.zip C:\projects\open62541\build\Debug\*
- appveyor PushArtifact open62541-win32.zip
- }
- }
|