Merge pull request #4766 from jtattermusch/artifact_builder_win_fix

Fix C# artifact building on windows.
pull/4784/merge
Jan Tattermusch 9 years ago
commit 5dd0d1d4fe
  1. 3
      .gitignore
  2. 12
      tools/run_tests/build_artifact_csharp.bat
  3. 5
      tools/run_tests/build_artifacts.py

3
.gitignore vendored

@ -82,3 +82,6 @@ DerivedData
# Podfile.lock and the workspace file are tracked, to ease deleting them. That's # Podfile.lock and the workspace file are tracked, to ease deleting them. That's
# needed to trigger "pod install" to rerun the preinstall commands. # needed to trigger "pod install" to rerun the preinstall commands.
Pods/ Pods/
# Artifacts directory
artifacts/

@ -0,0 +1,12 @@
@rem Builds C# artifacts on Windows
@call vsprojects\build_vs2013.bat %* || goto :error
mkdir artifacts
copy /Y vsprojects\Release\grpc_csharp_ext.dll artifacts || copy /Y vsprojects\x64\Release\grpc_csharp_ext.dll artifacts || goto :error
goto :EOF
:error
echo Failed!
exit /b %errorlevel%

@ -45,7 +45,8 @@ import time
import uuid import uuid
# Docker doesn't clean up after itself, so we do it on exit. # Docker doesn't clean up after itself, so we do it on exit.
atexit.register(lambda: subprocess.call(['stty', 'echo'])) if jobset.platform_string() == 'linux':
atexit.register(lambda: subprocess.call(['stty', 'echo']))
ROOT = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '../..')) ROOT = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '../..'))
os.chdir(ROOT) os.chdir(ROOT)
@ -122,7 +123,7 @@ class CSharpExtArtifact:
if self.platform == 'windows': if self.platform == 'windows':
msbuild_platform = 'Win32' if self.arch == 'x86' else self.arch msbuild_platform = 'Win32' if self.arch == 'x86' else self.arch
return create_jobspec(self.name, return create_jobspec(self.name,
['vsprojects\\build_vs2013.bat', ['tools\\run_tests\\build_artifact_csharp.bat',
'vsprojects\\grpc_csharp_ext.sln', 'vsprojects\\grpc_csharp_ext.sln',
'/p:Configuration=Release', '/p:Configuration=Release',
'/p:PlatformToolset=v120', '/p:PlatformToolset=v120',

Loading…
Cancel
Save