appveyor.bat 802 B

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