File: appveyor.bat

package info (click to toggle)
protobuf 3.0.0-9
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 28,164 kB
  • ctags: 46,419
  • sloc: cpp: 157,575; java: 65,779; objc: 58,982; ansic: 34,738; python: 15,927; cs: 13,062; makefile: 2,235; ruby: 1,796; sh: 1,658; xml: 1,585; lisp: 89; php: 10
file content (32 lines) | stat: -rw-r--r-- 773 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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%" -Dprotobuf_BUILD_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
dotnet restore
dotnet build -c %configuration% Google.Protobuf Google.Protobuf.Test Google.Protobuf.Conformance || goto error

echo Testing C#
dotnet test -c %configuration% Google.Protobuf.Test || goto error

goto :EOF

:error
echo Failed!
EXIT /b %ERRORLEVEL%