appveyor.bat 809 B

1234567891011121314151617181920212223242526272829
  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% ../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. nuget restore
  19. msbuild Google.Protobuf.sln /p:Platform="Any CPU" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" || goto error
  20. nunit-console Google.Protobuf.Test\bin\%configuration%\Google.Protobuf.Test.dll || goto error
  21. goto :EOF
  22. :error
  23. echo Failed!
  24. EXIT /b %ERRORLEVEL%