Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,30 @@ repos:
?^ci/scripts/c_glib_build\.sh$|
?^ci/scripts/c_glib_test\.sh$|
?^ci/scripts/conan_setup\.sh$|
?^ci/scripts/csharp_build\.sh$|
?^ci/scripts/csharp_pack\.sh$|
?^ci/scripts/download_tz_database\.sh$|
?^ci/scripts/install_azurite\.sh$|
?^ci/scripts/install_ccache\.sh$|
?^ci/scripts/install_ceph\.sh$|
?^ci/scripts/install_chromedriver\.sh$|
?^ci/scripts/install_cmake\.sh$|
?^ci/scripts/install_emscripten\.sh$|
?^ci/scripts/install_iwyu\.sh$|
?^ci/scripts/install_ninja\.sh$|
?^ci/scripts/install_numpy\.sh$|
?^ci/scripts/install_pandas\.sh$|
?^ci/scripts/install_python\.sh$|
?^ci/scripts/install_spark\.sh$|
?^ci/scripts/install_vcpkg\.sh$|
?^ci/scripts/integration_dask\.sh$|
?^ci/scripts/matlab_build\.sh$|
?^ci/scripts/msys2_system_clean\.sh$|
?^ci/scripts/msys2_system_upgrade\.sh$|
?^ci/scripts/python_sdist_build\.sh$|
?^ci/scripts/release_test\.sh$|
?^ci/scripts/ruby_test\.sh$|
?^ci/scripts/rust_build\.sh$|
?^ci/scripts/util_free_space\.sh$|
?^cpp/build-support/build-lz4-lib\.sh$|
?^cpp/build-support/build-zstd-lib\.sh$|
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/csharp_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ set -ex

source_dir=${1}/csharp

pushd ${source_dir}
pushd "${source_dir}"
dotnet build
popd
2 changes: 1 addition & 1 deletion ci/scripts/csharp_pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ set -eux

source_dir=${1}/csharp

pushd ${source_dir}
pushd "${source_dir}"
dotnet pack -c Release
popd
2 changes: 1 addition & 1 deletion ci/scripts/install_chromedriver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set -e

chrome_version=$1

if [ $chrome_version = "latest" ]; then
if [ "$chrome_version" = "latest" ]; then
latest_release_path=LATEST_RELEASE_STABLE
else
latest_release_path=LATEST_RELEASE_${chrome_version}
Expand Down
22 changes: 11 additions & 11 deletions ci/scripts/install_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ archs=([x86_64]=x86_64
[aarch64]=aarch64)

arch=$(uname -m)
if [ -z ${archs[$arch]} ]; then
if [ -z "${archs[$arch]}" ]; then
echo "Unsupported architecture: ${arch}"
exit 0
fi
Expand All @@ -56,25 +56,25 @@ case ${platform} in
;;
esac

mkdir -p ${prefix}
mkdir -p "${prefix}"
url="https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}-${platform}-"
case ${platform} in
macos)
url+="universal.tar.gz"
curl -L ${url} | tar -xzf - --directory ${prefix} --strip-components=1
ln -s CMake.app/Contents/bin ${prefix}/bin
curl -L "${url}" | tar -xzf - --directory "${prefix}" --strip-components=1
ln -s CMake.app/Contents/bin "${prefix}/bin"
;;
windows)
url+="${arch}.zip"
archive_name=$(basename ${url})
curl -L -o ${archive_name} ${url}
unzip ${archive_name}
base_name=$(basename ${archive_name} .zip)
mv ${base_name}/* ${prefix}
rm -rf ${base_name} ${archive_name}
archive_name=$(basename "${url}")
curl -L -o "${archive_name}" "${url}"
unzip "${archive_name}"
base_name=$(basename "${archive_name}" .zip)
mv "${base_name}"/* "${prefix}"
rm -rf "${base_name}" "${archive_name}"
;;
*)
url+="${arch}.tar.gz"
curl -L ${url} | tar -xzf - --directory ${prefix} --strip-components=1
curl -L "${url}" | tar -xzf - --directory "${prefix}" --strip-components=1
;;
esac
10 changes: 5 additions & 5 deletions ci/scripts/install_emscripten.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ set -e
target_path=$1
pyodide_path=$2

emscripten_version=$(${pyodide_path}/python -c "import sys;print(*sys._emscripten_info.emscripten_version,sep='.')")
emscripten_version=$("${pyodide_path}/python" -c "import sys;print(*sys._emscripten_info.emscripten_version,sep='.')")

cd ${target_path}
cd "${target_path}"
if [ ! -d emsdk ]; then
git clone https://github.com/emscripten-core/emsdk.git
fi
cd emsdk
./emsdk install ${emscripten_version}
./emsdk activate ${emscripten_version}
echo "Installed emsdk to: ${target_path}"
./emsdk install "${emscripten_version}"
./emsdk activate "${emscripten_version}"
echo "Installed emsdk to: ${target_path}"
18 changes: 9 additions & 9 deletions ci/scripts/install_iwyu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,26 @@ install_prefix=${2:-/usr/local}
clang_tools_version=${3:-8}

iwyu_branch_name="clang_${clang_tools_version}"
if [ ${clang_tools_version} -lt 10 ]; then
if [ "${clang_tools_version}" -lt 10 ]; then
iwyu_branch_name="${iwyu_branch_name}.0"
fi

git clone --single-branch --branch ${iwyu_branch_name} \
https://github.com/include-what-you-use/include-what-you-use.git ${source_dir}
git clone --single-branch --branch "${iwyu_branch_name}" \
https://github.com/include-what-you-use/include-what-you-use.git "${source_dir}"

mkdir -p ${source_dir}/build
pushd ${source_dir}/build
mkdir -p "${source_dir}/build"
pushd "${source_dir}/build"

# Build IWYU for current Clang
export CC=clang-${clang_tools_version}
export CXX=clang++-${clang_tools_version}

cmake -DCMAKE_PREFIX_PATH=/usr/lib/llvm-${clang_tools_version} \
-DCMAKE_INSTALL_PREFIX=${install_prefix} \
${source_dir}
cmake -DCMAKE_PREFIX_PATH="/usr/lib/llvm-${clang_tools_version}" \
-DCMAKE_INSTALL_PREFIX="${install_prefix}" \
"${source_dir}"
make -j4
make install

popd

rm -rf ${source_dir}
rm -rf "${source_dir}"
4 changes: 2 additions & 2 deletions ci/scripts/install_ninja.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ prefix=$2
url="https://github.com/ninja-build/ninja/archive/v${version}.tar.gz"

mkdir /tmp/ninja
wget -q ${url} -O - | tar -xzf - --directory /tmp/ninja --strip-components=1
wget -q "${url}" -O - | tar -xzf - --directory /tmp/ninja --strip-components=1

pushd /tmp/ninja
./configure.py --bootstrap
mv ninja ${prefix}/bin
mv ninja "${prefix}/bin"
popd

rm -rf /tmp/ninja
2 changes: 1 addition & 1 deletion ci/scripts/install_numpy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ numpy=${1:-"latest"}
if [ "${numpy}" = "latest" ]; then
pip install numpy
else
pip install numpy==${numpy}
pip install numpy=="${numpy}"
fi
4 changes: 2 additions & 2 deletions ci/scripts/install_pandas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if [ "${numpy}" = "nightly" ]; then
elif [ "${numpy}" = "latest" ]; then
pip install numpy
else
pip install numpy==${numpy}
pip install numpy=="${numpy}"
fi

if [ "${pandas}" = "upstream_devel" ]; then
Expand All @@ -42,5 +42,5 @@ elif [ "${pandas}" = "nightly" ]; then
elif [ "${pandas}" = "latest" ]; then
pip install pandas
else
pip install pandas==${pandas}
pip install pandas=="${pandas}"
fi
8 changes: 4 additions & 4 deletions ci/scripts/install_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ platform=${platforms[$1]}
version=$2
full_version=${versions[$2]}

if [ $platform = "macOS" ]; then
if [ "$platform" = "macOS" ]; then
echo "Downloading Python installer..."

if [ "$(uname -m)" = "x86_64" ] && [ "$version" = "3.9" ];
Expand Down Expand Up @@ -74,12 +74,12 @@ if [ $platform = "macOS" ]; then
</array>
</plist>
EOF
installer -pkg $fname -applyChoiceChangesXML ./choicechanges.plist -target /
installer -pkg "$fname" -applyChoiceChangesXML ./choicechanges.plist -target /
rm ./choicechanges.plist
else
installer -pkg $fname -target /
installer -pkg "$fname" -target /
fi
rm $fname
rm "$fname"

python="/Library/Frameworks/Python.framework/Versions/${version}/bin/python${version}"
if [[ $2 == "3.13t" ]]; then
Expand Down
6 changes: 3 additions & 3 deletions ci/scripts/install_vcpkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ if [ -z "${vcpkg_version}" ]; then
fi

# reduce the fetched data using a shallow clone
git clone --shallow-since=2021-04-01 https://github.com/microsoft/vcpkg ${vcpkg_destination}
git clone --shallow-since=2021-04-01 https://github.com/microsoft/vcpkg "${vcpkg_destination}"

pushd ${vcpkg_destination}
pushd "${vcpkg_destination}"

git checkout "${vcpkg_version}"

Expand All @@ -49,7 +49,7 @@ else
fi

if [ -f "${vcpkg_ports_patch}" ]; then
git apply --verbose --ignore-whitespace ${vcpkg_ports_patch}
git apply --verbose --ignore-whitespace "${vcpkg_ports_patch}"
echo "Patch successfully applied to the VCPKG port files!"
fi

Expand Down
8 changes: 4 additions & 4 deletions ci/scripts/matlab_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ build_dir=${base_dir}/matlab/build
install_dir=${base_dir}/matlab/install

cmake \
-S ${source_dir} \
-B ${build_dir} \
-S "${source_dir}" \
-B "${build_dir}" \
-G Ninja \
-D CMAKE_INSTALL_PREFIX=${install_dir} \
-D CMAKE_INSTALL_PREFIX="${install_dir}" \
-D MATLAB_ADD_INSTALL_DIR_TO_SEARCH_PATH=OFF
cmake --build ${build_dir} --config Release --target install
cmake --build "${build_dir}" --config Release --target install
12 changes: 6 additions & 6 deletions ci/scripts/msys2_system_clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ case "${MINGW_PACKAGE_PREFIX}" in
--nosave \
--recursive \
--remove \
${MINGW_PACKAGE_PREFIX}-clang-tools-extra \
${MINGW_PACKAGE_PREFIX}-gcc-ada \
${MINGW_PACKAGE_PREFIX}-gcc-fortran \
${MINGW_PACKAGE_PREFIX}-gcc-libgfortran \
${MINGW_PACKAGE_PREFIX}-gcc-objc \
${MINGW_PACKAGE_PREFIX}-libgccjit
"${MINGW_PACKAGE_PREFIX}-clang-tools-extra" \
"${MINGW_PACKAGE_PREFIX}-gcc-ada" \
"${MINGW_PACKAGE_PREFIX}-gcc-fortran" \
"${MINGW_PACKAGE_PREFIX}-gcc-libgfortran" \
"${MINGW_PACKAGE_PREFIX}-gcc-objc" \
"${MINGW_PACKAGE_PREFIX}-libgccjit"
;;
esac
2 changes: 1 addition & 1 deletion ci/scripts/python_sdist_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set -eux

source_dir=${1}/python

pushd ${source_dir}
pushd "${source_dir}"
export SETUPTOOLS_SCM_PRETEND_VERSION=${PYARROW_VERSION:-}
${PYTHON:-python} setup.py sdist
popd
2 changes: 1 addition & 1 deletion ci/scripts/release_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set -eux

arrow_dir=${1}

pushd ${arrow_dir}
pushd "${arrow_dir}"

dev/release/run-test.rb -vv

Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/ruby_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ if [ -z "${ARROW_DEBUG_MEMORY_POOL}" ]; then
export ARROW_DEBUG_MEMORY_POOL=trap
fi

rake -f ${source_dir}/Rakefile BUILD_DIR=${build_dir} USE_BUNDLER=yes
rake -f "${source_dir}/Rakefile" BUILD_DIR="${build_dir}" USE_BUNDLER=yes
4 changes: 2 additions & 2 deletions ci/scripts/rust_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ set -x
# show activated toolchain
rustup show

pushd ${source_dir}
pushd "${source_dir}"

# build only the integration testing binaries
cargo build -p arrow-integration-testing --target-dir ${build_dir}
cargo build -p arrow-integration-testing --target-dir "${build_dir}"

# Save disk space by removing large temporary build products
rm -rf target/debug/deps
Expand Down
Loading