You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2019/06/28 08:11:46 UTC
[arrow] branch master updated: ARROW-5695: [C#][Release] Run
sourcelink test in verify-release-candidate.sh
This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 9a788df ARROW-5695: [C#][Release] Run sourcelink test in verify-release-candidate.sh
9a788df is described below
commit 9a788dfc976035cabb0d4ab15f0f6fa306a5428d
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Fri Jun 28 17:10:40 2019 +0900
ARROW-5695: [C#][Release] Run sourcelink test in verify-release-candidate.sh
This is the follow up of https://github.com/apache/arrow/pull/4488#pullrequestreview-253110667.
Author: Sutou Kouhei <ko...@clear-code.com>
Author: Yosuke Shiro <yo...@gmail.com>
Closes #4708 from shiro615/release-run-sourcelink-test-in-verify-release-candidate and squashes the following commits:
b5c899fa5 <Sutou Kouhei> Add missing ARROW_BUILD_INTEGRATION=ON
11add5de6 <Sutou Kouhei> Ensure initializing variables
9997db171 <Sutou Kouhei> Ensure initializing variables
6b92ce2a0 <Sutou Kouhei> Detect download URL automatically
5a85db6dd <Sutou Kouhei> Set DOTNET_ROOT only when sourcelink doesn't work
325c31da9 <Sutou Kouhei> Use variable for $PWD/bin
d7b358977 <Sutou Kouhei> Check not initialized variable
b2c7e814a <Sutou Kouhei> Add ~/.dotnet/tools to PATH with system dotnet
34a30467c <Yosuke Shiro> Run sourcelink test in verify-release-candidate.sh
---
dev/release/verify-release-candidate.sh | 69 +++++++++++++++++++++++++++++++--
1 file changed, 65 insertions(+), 4 deletions(-)
diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh
index 7d984a8..159d7dd 100755
--- a/dev/release/verify-release-candidate.sh
+++ b/dev/release/verify-release-candidate.sh
@@ -45,7 +45,9 @@ case $# in
;;
esac
-set -ex
+set -e
+set -u
+set -x
set -o pipefail
SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
@@ -255,7 +257,7 @@ test_and_install_cpp() {
pushd cpp/build
ARROW_CMAKE_OPTIONS="
-${ARROW_CMAKE_OPTIONS}
+${ARROW_CMAKE_OPTIONS:-}
-DCMAKE_INSTALL_PREFIX=$ARROW_HOME
-DCMAKE_INSTALL_LIBDIR=lib
-DARROW_FLIGHT=${ARROW_FLIGHT}
@@ -267,6 +269,7 @@ ${ARROW_CMAKE_OPTIONS}
-DARROW_BOOST_USE_SHARED=ON
-DCMAKE_BUILD_TYPE=release
-DARROW_BUILD_TESTS=ON
+-DARROW_BUILD_INTEGRATION=ON
-DARROW_CUDA=${ARROW_CUDA}
-DARROW_DEPENDENCY_SOURCE=AUTO
"
@@ -284,6 +287,60 @@ ${ARROW_CMAKE_OPTIONS}
popd
}
+test_csharp() {
+ pushd csharp
+
+ local csharp_bin=${PWD}/bin
+ mkdir -p ${csharp_bin}
+
+ if which dotnet > /dev/null 2>&1; then
+ if ! which sourcelink > /dev/null 2>&1; then
+ local dotnet_tools_dir=$HOME/.dotnet/tools
+ if [ -d "${dotnet_tools_dir}" ]; then
+ PATH="${dotnet_tools_dir}:$PATH"
+ fi
+ fi
+ else
+ local dotnet_version=2.2.300
+ local dotnet_platform=
+ case "$(uname)" in
+ Linux)
+ dotnet_platform=linux
+ ;;
+ Darwin)
+ dotnet_platform=macos
+ ;;
+ esac
+ local dotnet_download_thank_you_url=https://dotnet.microsoft.com/download/thank-you/dotnet-sdk-${dotnet_version}-${dotnet_platform}-x64-binaries
+ local dotnet_download_url=$( \
+ curl ${dotnet_download_thank_you_url} | \
+ grep 'window\.open' | \
+ grep -E -o '[^"]+' | \
+ sed -n 2p)
+ curl ${dotnet_download_url} | \
+ tar xzf - -C ${csharp_bin}
+ PATH=${csharp_bin}:${PATH}
+ fi
+
+ dotnet test
+ mv dummy.git ../.git
+ dotnet pack -c Release
+ mv ../.git dummy.git
+
+ if ! which sourcelink > /dev/null 2>&1; then
+ dotnet tool install --tool-path ${csharp_bin} sourcelink
+ PATH=${csharp_bin}:${PATH}
+ if ! sourcelink --help > /dev/null 2>&1; then
+ export DOTNET_ROOT=${csharp_bin}
+ fi
+ fi
+
+ sourcelink test artifacts/Apache.Arrow/Release/netstandard1.3/Apache.Arrow.pdb
+ sourcelink test artifacts/Apache.Arrow/Release/netcoreapp2.1/Apache.Arrow.pdb
+
+ popd
+}
+
# Build and test Python
test_python() {
@@ -432,8 +489,8 @@ test_integration() {
test_source_distribution() {
export ARROW_HOME=$TMPDIR/install
export PARQUET_HOME=$TMPDIR/install
- export LD_LIBRARY_PATH=$ARROW_HOME/lib:$LD_LIBRARY_PATH
- export PKG_CONFIG_PATH=$ARROW_HOME/lib/pkgconfig:$PKG_CONFIG_PATH
+ export LD_LIBRARY_PATH=$ARROW_HOME/lib:${LD_LIBRARY_PATH:-}
+ export PKG_CONFIG_PATH=$ARROW_HOME/lib/pkgconfig:${PKG_CONFIG_PATH:-}
if [ "$(uname)" == "Darwin" ]; then
NPROC=$(sysctl -n hw.ncpu)
@@ -454,6 +511,9 @@ test_source_distribution() {
setup_miniconda
test_and_install_cpp
fi
+ if [ ${TEST_CSHARP} -gt 0 ]; then
+ test_csharp
+ fi
if [ ${TEST_PYTHON} -gt 0 ]; then
test_python
fi
@@ -498,6 +558,7 @@ test_binary_distribution() {
: ${TEST_SOURCE:=${TEST_DEFAULT}}
: ${TEST_JAVA:=${TEST_DEFAULT}}
: ${TEST_CPP:=${TEST_DEFAULT}}
+: ${TEST_CSHARP:=${TEST_DEFAULT}}
: ${TEST_GLIB:=${TEST_DEFAULT}}
: ${TEST_RUBY:=${TEST_DEFAULT}}
: ${TEST_PYTHON:=${TEST_DEFAULT}}