diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2018-10-02 15:26:44 +0200 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2018-10-04 11:21:36 +0200 |
commit | 409def0d7394d4582c4f2e9aaa62460feeac39b7 (patch) | |
tree | 458391558816c4391a767cfbce0ad99a3bc16a4d /tools/run_tests/artifacts | |
parent | 05c23458ab66afda7177df474b8ab138a4a548d1 (diff) |
build C# artifact using cmake
Diffstat (limited to 'tools/run_tests/artifacts')
-rw-r--r-- | tools/run_tests/artifacts/artifact_targets.py | 20 | ||||
-rwxr-xr-x | tools/run_tests/artifacts/build_artifact_csharp.sh | 8 |
2 files changed, 12 insertions, 16 deletions
diff --git a/tools/run_tests/artifacts/artifact_targets.py b/tools/run_tests/artifacts/artifact_targets.py index bdeb258e1f..b2e9f4cc9f 100644 --- a/tools/run_tests/artifacts/artifact_targets.py +++ b/tools/run_tests/artifacts/artifact_targets.py @@ -248,29 +248,19 @@ class CSharpExtArtifact: ], use_workspace=True) else: - environ = { - 'CONFIG': 'opt', - 'EMBED_OPENSSL': 'true', - 'EMBED_ZLIB': 'true', - 'CFLAGS': '-DGPR_BACKWARDS_COMPATIBILITY_MODE', - 'CXXFLAGS': '-DGPR_BACKWARDS_COMPATIBILITY_MODE', - 'LDFLAGS': '' - } if self.platform == 'linux': return create_docker_jobspec( self.name, 'tools/dockerfile/grpc_artifact_linux_%s' % self.arch, - 'tools/run_tests/artifacts/build_artifact_csharp.sh', - environ=environ) + 'tools/run_tests/artifacts/build_artifact_csharp.sh') else: - archflag = _ARCH_FLAG_MAP[self.arch] - environ['CFLAGS'] += ' %s %s' % (archflag, _MACOS_COMPAT_FLAG) - environ['CXXFLAGS'] += ' %s %s' % (archflag, _MACOS_COMPAT_FLAG) - environ['LDFLAGS'] += ' %s' % archflag + cmake_arch_option = '' # x64 is the default architecture + if self.arch == 'x86': + cmake_arch_option = '-DCMAKE_OSX_ARCHITECTURES=i386' return create_jobspec( self.name, ['tools/run_tests/artifacts/build_artifact_csharp.sh'], - environ=environ, + environ={'CMAKE_ARCH_OPTION': cmake_arch_option}, use_workspace=True) def __str__(self): diff --git a/tools/run_tests/artifacts/build_artifact_csharp.sh b/tools/run_tests/artifacts/build_artifact_csharp.sh index d65340261d..6c946d7a22 100755 --- a/tools/run_tests/artifacts/build_artifact_csharp.sh +++ b/tools/run_tests/artifacts/build_artifact_csharp.sh @@ -17,7 +17,13 @@ set -ex cd "$(dirname "$0")/../../.." +mkdir -p cmake/build +cd cmake/build + +# -DgRPC_BACKWARDS_COMPATIBILITY_MODE=ON +cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DgRPC_BUILD_TESTS=OFF "${CMAKE_ARCH_OPTION}" ../.. make grpc_csharp_ext +cd ../.. mkdir -p "${ARTIFACTS_OUT}" -cp libs/opt/libgrpc_csharp_ext.so "${ARTIFACTS_OUT}" || cp libs/opt/libgrpc_csharp_ext.dylib "${ARTIFACTS_OUT}" +cp cmake/build/libgrpc_csharp_ext.so "${ARTIFACTS_OUT}" || cp cmake/build/libgrpc_csharp_ext.dylib "${ARTIFACTS_OUT}" |