Skip to content

Commit

Permalink
Add convenient functions
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Sep 11, 2024
1 parent 6d7b428 commit 7b3d964
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 36 deletions.
14 changes: 6 additions & 8 deletions ci/scripts/integration_arrow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,21 @@ gold_dir=$arrow_dir/testing/data/arrow-ipc-stream/integration
: ${ARROW_INTEGRATION_JAVA:=ON}
: ${ARROW_INTEGRATION_JS:=ON}

echo "::group::Integration: Prepare: Archery"
set -x
. ${arrow_dir}/ci/scripts/util_log.sh

github_actions_group_begin "Integration: Prepare: Archery"
pip install -e $arrow_dir/dev/archery[integration]
set +x
echo "::endgroup::"
github_actions_group_ehd

echo "::group::Integration: Prepare: Dependencies"
set -x
github_actions_group_begin "Integration: Prepare: Dependencies"
# For C Data Interface testing
if [ "${ARROW_INTEGRATION_CSHARP}" == "ON" ]; then
pip install pythonnet
fi
if [ "${ARROW_INTEGRATION_JAVA}" == "ON" ]; then
pip install jpype1
fi
set +x
echo "::endgroup::"
github_actions_group_ehd

export ARROW_BUILD_ROOT=${build_dir}

Expand Down
44 changes: 16 additions & 28 deletions ci/scripts/integration_arrow_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,58 +28,46 @@ build_dir=${2}
: ${ARROW_INTEGRATION_JAVA:=ON}
: ${ARROW_INTEGRATION_JS:=ON}

echo "::group::Integration: Build: Rust"
set -x
. ${arrow_dir}/ci/scripts/util_log.sh

github_actions_group_begin "Integration: Build: Rust"
${arrow_dir}/ci/scripts/rust_build.sh ${arrow_dir} ${build_dir}
set +x
echo "::endgroup::"
github_actions_group_end

echo "::group::Integration: Build: nanoarrow"
set -x
github_actions_group_begin "Integration: Build: nanoarrow"
${arrow_dir}/ci/scripts/nanoarrow_build.sh ${arrow_dir} ${build_dir}
set +x
echo "::endgroup::"
github_actions_group_end

echo "::group::Integration: Build: C++"
set -x
github_actions_group_begin "Integration: Build: C++"
if [ "${ARROW_INTEGRATION_CPP}" == "ON" ]; then
${arrow_dir}/ci/scripts/cpp_build.sh ${arrow_dir} ${build_dir}
fi
set +x
echo "::endgroup::"
github_actions_group_end

echo "::group::Integration: Build: C#"
set -x
github_actions_group_begin "Integration: Build: C#"
if [ "${ARROW_INTEGRATION_CSHARP}" == "ON" ]; then
${arrow_dir}/ci/scripts/csharp_build.sh ${arrow_dir} ${build_dir}
fi
set +x
echo "::endgroup::"
github_actions_group_end

echo "::group::Integration: Build: Go"
set -x
github_actions_group_begin "Integration: Build: Go"
if [ "${ARROW_INTEGRATION_GO}" == "ON" ]; then
${arrow_dir}/ci/scripts/go_build.sh ${arrow_dir} ${build_dir}
fi
set +x
echo "::endgroup::"
github_actions_group_end

echo "::group::Integration: Build: Java"
set -x
github_actions_group_begin "Integration: Build: Java"
if [ "${ARROW_INTEGRATION_JAVA}" == "ON" ]; then
export ARROW_JAVA_CDATA="ON"
export JAVA_JNI_CMAKE_ARGS="-DARROW_JAVA_JNI_ENABLE_DEFAULT=OFF -DARROW_JAVA_JNI_ENABLE_C=ON"

${arrow_dir}/ci/scripts/java_jni_build.sh ${arrow_dir} ${ARROW_HOME} ${build_dir} /tmp/dist/java
${arrow_dir}/ci/scripts/java_build.sh ${arrow_dir} ${build_dir} /tmp/dist/java
fi
set +x
echo "::endgroup::"
github_actions_group_end

echo "::group::Integration: Build: JavaScript"
set -x
github_actions_group_begin "Integration: Build: JavaScript"
if [ "${ARROW_INTEGRATION_JS}" == "ON" ]; then
${arrow_dir}/ci/scripts/js_build.sh ${arrow_dir} ${build_dir}
fi
set +x
echo "::endgroup::"
github_actions_group_end
26 changes: 26 additions & 0 deletions ci/scripts/util_log.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

github_actions_group_begin() {
echo "::group::$1"
set -x
}

github_actions_group_end() {
set +x
echo "::endgroup::"
}

0 comments on commit 7b3d964

Please sign in to comment.