kszucs commented on a change in pull request #12320:
URL: https://github.com/apache/arrow/pull/12320#discussion_r808168591



##########
File path: dev/release/verify-release-candidate.sh
##########
@@ -378,22 +342,253 @@ test_csharp() {
     fi
   fi
 
-  sourcelink test 
artifacts/Apache.Arrow/Release/netstandard1.3/Apache.Arrow.pdb
-  sourcelink test artifacts/Apache.Arrow/Release/netcoreapp2.1/Apache.Arrow.pdb
+  CSHARP_ALREADY_INSTALLED=1
+}
+
+install_go() {
+  # Install go
+  if [ "${GO_ALREADY_INSTALLED:-0}" -gt 0 ]; then
+    return 0
+  fi
 
+  local version=1.16.12
+
+  local arch="$(uname -m)"
+  if [ "$arch" == "x86_64" ]; then
+    arch=amd64
+  elif [ "$arch" == "aarch64" ]; then
+    arch=arm64
+  fi
+
+  if [ "$(uname)" == "Darwin" ]; then
+    local os=darwin
+  else
+    local os=linux
+  fi
+
+  local archive="go${version}.${os}-${arch}.tar.gz"
+  curl -sLO https://dl.google.com/go/$archive
+
+  local prefix=${ARROW_TMPDIR}/go
+  mkdir -p $prefix
+  tar -xzf $archive -C $prefix
+  rm -f $archive
+
+  export GOROOT=${prefix}/go
+  export GOPATH=${prefix}/gopath
+  export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
+
+  GO_ALREADY_INSTALLED=1
+}
+
+mamba() {
+  # Helper to access mamba directly instead after activating base conda 
environment
+  $ARROW_TMPDIR/mambaforge/bin/mamba "$@"
+}
+
+install_conda() {
+  # Setup short-lived miniconda for Python and integration tests
+  if [ "${CONDA_ALREADY_INSTALLED:-0}" -gt 0 ]; then
+    return 0
+  fi
+
+  local arch=$(uname -m)
+  local platform=$(uname)
+  local 
url="https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-${platform}-${arch}.sh";
+  local prefix=$ARROW_TMPDIR/mambaforge
+
+  # Setup miniconda only if the directory doesn't exist yet
+  if [ ! -d "${prefix}" ]; then
+    curl -sL -o miniconda.sh $url
+    bash miniconda.sh -b -p $prefix
+    rm -f miniconda.sh
+    echo "Installed miniconda at ${prefix}"
+  else
+    echo "Miniconda already installed at ${prefix}"
+  fi
+
+  # Creating a separate conda environment
+  . $prefix/etc/profile.d/conda.sh
+  conda activate base
+
+  CONDA_ALREADY_INSTALLED=1
+}
+
+setup_conda() {
+  # Optionally setup conda environment with the passed dependencies
+  local env="conda-${ENV:-source}"
+  local pyver=${PYTHON_VERSION:-3}
+
+  if [ "${USE_CONDA}" -gt 0 ]; then
+    # Deactivate previous env
+    if [ ! -z ${CONDA_PREFIX} ]; then
+      conda deactivate || :
+    fi
+    # Ensure that conda is installed
+    install_conda
+    # Create environment
+    if ! conda env list | grep $env; then
+      mamba create -y -n $env python=${pyver}

Review comment:
       Yes, at least it should.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to