OLD | NEW |
1 setlocal | 1 setlocal |
2 | 2 |
3 IF %language%==cpp GOTO build_cpp | 3 IF %language%==cpp GOTO build_cpp |
4 IF %language%==csharp GOTO build_csharp | 4 IF %language%==csharp GOTO build_csharp |
5 | 5 |
6 echo Unsupported language %language%. Exiting. | 6 echo Unsupported language %language%. Exiting. |
7 goto :error | 7 goto :error |
8 | 8 |
9 :build_cpp | 9 :build_cpp |
10 echo Building C++ | 10 echo Building C++ |
11 mkdir build_msvc | 11 mkdir build_msvc |
12 cd build_msvc | 12 cd build_msvc |
13 cmake -G "%generator%" -Dprotobuf_BUILD_SHARED_LIBS=%BUILD_DLL% ../cmake | 13 cmake -G "%generator%" -Dprotobuf_BUILD_SHARED_LIBS=%BUILD_DLL% -Dprotobuf_UNICO
DE=%UNICODE% ../cmake |
14 msbuild protobuf.sln /p:Platform=%vcplatform% /logger:"C:\Program Files\AppVeyor
\BuildAgent\Appveyor.MSBuildLogger.dll" || goto error | 14 msbuild protobuf.sln /p:Platform=%vcplatform% /logger:"C:\Program Files\AppVeyor
\BuildAgent\Appveyor.MSBuildLogger.dll" || goto error |
15 cd %configuration% | 15 cd %configuration% |
16 tests.exe || goto error | 16 tests.exe || goto error |
17 goto :EOF | 17 goto :EOF |
18 | 18 |
19 :build_csharp | 19 :build_csharp |
20 echo Building C# | 20 echo Building C# |
21 cd csharp\src | 21 cd csharp\src |
22 nuget restore | 22 dotnet restore |
23 msbuild Google.Protobuf.sln /p:Platform="Any CPU" /logger:"C:\Program Files\AppV
eyor\BuildAgent\Appveyor.MSBuildLogger.dll" || goto error | 23 dotnet build -c %configuration% Google.Protobuf Google.Protobuf.Test Google.Prot
obuf.Conformance || goto error |
24 nunit-console Google.Protobuf.Test\bin\%configuration%\Google.Protobuf.Test.dll
|| goto error | 24 |
| 25 echo Testing C# |
| 26 dotnet test -c %configuration% Google.Protobuf.Test || goto error |
| 27 |
25 goto :EOF | 28 goto :EOF |
26 | 29 |
27 :error | 30 :error |
28 echo Failed! | 31 echo Failed! |
29 EXIT /b %ERRORLEVEL% | 32 EXIT /b %ERRORLEVEL% |
OLD | NEW |