aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/src
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2017-05-15 11:59:13 +0200
committerGravatar GitHub <noreply@github.com>2017-05-15 11:59:13 +0200
commit3e95a38bdfb584f1a1ba97114d536704f127a5cf (patch)
tree63ce4957d90b61f674bd6df518fe1122b1a1b280 /templates/src
parent44369698fdd615d43ecc9ddcd8e8ad9c075567bc (diff)
parent5227e1ea634e2d3bfa37bcf400daa70bae2a4385 (diff)
Merge pull request #11115 from jtattermusch/revamp_artifacts
Revamp artifacts, packages and distribtests
Diffstat (limited to 'templates/src')
-rwxr-xr-xtemplates/src/csharp/build_packages_dotnetcli.bat.template21
-rwxr-xr-xtemplates/src/csharp/build_packages_dotnetcli.sh.template28
2 files changed, 12 insertions, 37 deletions
diff --git a/templates/src/csharp/build_packages_dotnetcli.bat.template b/templates/src/csharp/build_packages_dotnetcli.bat.template
index 91808e0d26..3db1e0ac3d 100755
--- a/templates/src/csharp/build_packages_dotnetcli.bat.template
+++ b/templates/src/csharp/build_packages_dotnetcli.bat.template
@@ -38,29 +38,20 @@
set -ex
- mkdir -p ..\..\artifacts${"\\"}
+ mkdir ..\..\artifacts
@rem Collect the artifacts built by the previous build step if running on Jenkins
- @rem TODO(jtattermusch): is there a better way to do this?
- xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=windows\artifacts\* nativelibs\windows_x86${"\\"}
- xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=windows\artifacts\* nativelibs\windows_x64${"\\"}
- xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=linux\artifacts\* nativelibs\linux_x86${"\\"}
- xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=linux\artifacts\* nativelibs\linux_x64${"\\"}
- xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=macos\artifacts\* nativelibs\macosx_x86${"\\"}
- xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=macos\artifacts\* nativelibs\macosx_x64${"\\"}
+ mkdir nativelibs
+ powershell -Command "cp -r ..\..\platform=*\artifacts\csharp_ext_* nativelibs"
@rem Collect protoc artifacts built by the previous build step
- xcopy /Y /I ..\..\architecture=x86,language=protoc,platform=windows\artifacts\* protoc_plugins\windows_x86${"\\"}
- xcopy /Y /I ..\..\architecture=x64,language=protoc,platform=windows\artifacts\* protoc_plugins\windows_x64${"\\"}
- xcopy /Y /I ..\..\architecture=x86,language=protoc,platform=linux\artifacts\* protoc_plugins\linux_x86${"\\"}
- xcopy /Y /I ..\..\architecture=x64,language=protoc,platform=linux\artifacts\* protoc_plugins\linux_x64${"\\"}
- xcopy /Y /I ..\..\architecture=x86,language=protoc,platform=macos\artifacts\* protoc_plugins\macosx_x86${"\\"}
- xcopy /Y /I ..\..\architecture=x64,language=protoc,platform=macos\artifacts\* protoc_plugins\macosx_x64${"\\"}
+ mkdir protoc_plugins
+ powershell -Command "cp -r ..\..\platform=*\artifacts\protoc_* protoc_plugins"
%%DOTNET% restore Grpc.sln || goto :error
@rem To be able to build, we also need to put grpc_csharp_ext to its normal location
- xcopy /Y /I nativelibs\windows_x64\grpc_csharp_ext.dll ..\..\cmake\build\x64\Release${"\\"}
+ xcopy /Y /I nativelibs\csharp_ext_windows_x64\grpc_csharp_ext.dll ..\..\cmake\build\x64\Release${"\\"}
%%DOTNET% pack --configuration Release Grpc.Core --output ..\..\..\artifacts || goto :error
%%DOTNET% pack --configuration Release Grpc.Core.Testing --output ..\..\..\artifacts || goto :error
diff --git a/templates/src/csharp/build_packages_dotnetcli.sh.template b/templates/src/csharp/build_packages_dotnetcli.sh.template
index 374b236f93..65afec55c4 100755
--- a/templates/src/csharp/build_packages_dotnetcli.sh.template
+++ b/templates/src/csharp/build_packages_dotnetcli.sh.template
@@ -36,35 +36,19 @@
mkdir -p ../../artifacts/
- mkdir -p nativelibs/windows_x86 nativelibs/windows_x64 ${"\\"}
- nativelibs/linux_x86 nativelibs/linux_x64 ${"\\"}
- nativelibs/macosx_x86 nativelibs/macosx_x64
-
- mkdir -p protoc_plugins/windows_x86 protoc_plugins/windows_x64 ${"\\"}
- protoc_plugins/linux_x86 protoc_plugins/linux_x64 ${"\\"}
- protoc_plugins/macosx_x86 protoc_plugins/macosx_x64
-
- # Collect the artifacts built by the previous build step if running on Jenkins
- cp $EXTERNAL_GIT_ROOT/architecture=x86,language=csharp,platform=windows/artifacts/* nativelibs/windows_x86 || true
- cp $EXTERNAL_GIT_ROOT/architecture=x64,language=csharp,platform=windows/artifacts/* nativelibs/windows_x64 || true
- cp $EXTERNAL_GIT_ROOT/architecture=x86,language=csharp,platform=linux/artifacts/* nativelibs/linux_x86 || true
- cp $EXTERNAL_GIT_ROOT/architecture=x64,language=csharp,platform=linux/artifacts/* nativelibs/linux_x64 || true
- cp $EXTERNAL_GIT_ROOT/architecture=x86,language=csharp,platform=macos/artifacts/* nativelibs/macosx_x86 || true
- cp $EXTERNAL_GIT_ROOT/architecture=x64,language=csharp,platform=macos/artifacts/* nativelibs/macosx_x64 || true
+ # Collect the artifacts built by the previous build step
+ mkdir -p nativelibs
+ cp -r $EXTERNAL_GIT_ROOT/platform={windows,linux,macos}/artifacts/csharp_ext_* nativelibs || true
# Collect protoc artifacts built by the previous build step
- cp $EXTERNAL_GIT_ROOT/architecture=x86,language=protoc,platform=windows/artifacts/* protoc_plugins/windows_x86 || true
- cp $EXTERNAL_GIT_ROOT/architecture=x64,language=protoc,platform=windows/artifacts/* protoc_plugins/windows_x64 || true
- cp $EXTERNAL_GIT_ROOT/architecture=x86,language=protoc,platform=linux/artifacts/* protoc_plugins/linux_x86 || true
- cp $EXTERNAL_GIT_ROOT/architecture=x64,language=protoc,platform=linux/artifacts/* protoc_plugins/linux_x64 || true
- cp $EXTERNAL_GIT_ROOT/architecture=x86,language=protoc,platform=macos/artifacts/* protoc_plugins/macosx_x86 || true
- cp $EXTERNAL_GIT_ROOT/architecture=x64,language=protoc,platform=macos/artifacts/* protoc_plugins/macosx_x64 || true
+ mkdir -p protoc_plugins
+ cp -r $EXTERNAL_GIT_ROOT/platform={windows,linux,macos}/artifacts/protoc_* protoc_plugins || true
dotnet restore Grpc.sln
# To be able to build, we also need to put grpc_csharp_ext to its normal location
mkdir -p ../../libs/opt
- cp nativelibs/linux_x64/libgrpc_csharp_ext.so ../../libs/opt
+ cp nativelibs/csharp_ext_linux_x64/libgrpc_csharp_ext.so ../../libs/opt
dotnet pack --configuration Release Grpc.Core --output ../../../artifacts
dotnet pack --configuration Release Grpc.Core.Testing --output ../../../artifacts