add C# build and tests to appveyor
This commit is contained in:
parent
19cf9d1e00
commit
d4794c56b5
29
appveyor.bat
Normal file
29
appveyor.bat
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
setlocal
|
||||||
|
|
||||||
|
IF %language%==cpp GOTO build_cpp
|
||||||
|
IF %language%==csharp GOTO build_csharp
|
||||||
|
|
||||||
|
echo Unsupported language %language%. Exiting.
|
||||||
|
goto :error
|
||||||
|
|
||||||
|
:build_cpp
|
||||||
|
echo Building C++
|
||||||
|
mkdir build_msvc
|
||||||
|
cd build_msvc
|
||||||
|
cmake -G "%generator%" -DBUILD_SHARED_LIBS=%BUILD_DLL% ../cmake
|
||||||
|
msbuild protobuf.sln /p:Platform=%vcplatform% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" || goto error
|
||||||
|
cd %configuration%
|
||||||
|
tests.exe || goto error
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:build_csharp
|
||||||
|
echo Building C#
|
||||||
|
cd csharp\src
|
||||||
|
nuget restore
|
||||||
|
msbuild ProtocolBuffers.sln /p:Platform="Any CPU" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" || goto error
|
||||||
|
nunit-console ProtocolBuffers.Test\bin\%configuration%\Google.Protobuf.Test.dll || goto error
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:error
|
||||||
|
echo Failed!
|
||||||
|
EXIT /b %ERRORLEVEL%
|
12
appveyor.yml
12
appveyor.yml
@ -9,7 +9,10 @@ configuration:
|
|||||||
|
|
||||||
environment:
|
environment:
|
||||||
matrix:
|
matrix:
|
||||||
- BUILD_DLL: ON
|
- language: cpp
|
||||||
|
BUILD_DLL: ON
|
||||||
|
|
||||||
|
- language: csharp
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- ps: Start-FileDownload https://googlemock.googlecode.com/files/gmock-1.7.0.zip
|
- ps: Start-FileDownload https://googlemock.googlecode.com/files/gmock-1.7.0.zip
|
||||||
@ -23,12 +26,7 @@ before_build:
|
|||||||
- if %platform%==Win64 set vcplatform=x64
|
- if %platform%==Win64 set vcplatform=x64
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- mkdir build_msvc
|
- CALL appveyor.bat
|
||||||
- cd build_msvc
|
|
||||||
- cmake -G "%generator%" -DBUILD_SHARED_LIBS=%BUILD_DLL% ../cmake
|
|
||||||
- msbuild protobuf.sln /p:Platform=%vcplatform% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
|
||||||
- cd %configuration%
|
|
||||||
- tests.exe
|
|
||||||
|
|
||||||
skip_commits:
|
skip_commits:
|
||||||
message: /.*\[skip appveyor\].*/
|
message: /.*\[skip appveyor\].*/
|
||||||
|
Loading…
Reference in New Issue
Block a user