Apache DataFusion SQL Query Engine
ARROW-8662: [CI] Consolidate appveyor scripts
Krisztián Szűcs1abba299c16c
diff --git a/appveyor.yml b/appveyor.ymlindex 5172ce40b0..ace5bb97f0 100644--- a/appveyor.yml+++ b/appveyor.yml@@ -23,7 +23,6 @@ only_commits:files:- appveyor.yml- ci/appveyor*- - ci/*.bat- ci/conda*- cpp/- format/@@ -31,9 +30,6 @@ only_commits:cache:- C:\Users\Appveyor\clcache1- - C:\msys64\home\appveyor\.ccache- - C:\Users\Appveyor\.cargo\registry- - '%LocalAppData%\\go-build'matrix:fast_finish: true@@ -41,7 +37,8 @@ matrix:environment:global:# Make these variables visible in all jobs and build steps- USE_CLCACHE: true+ MSVC_DEFAULT_OPTIONS: ON+ APPVEYOR_SAVE_CACHE_ON_ERROR: true# Change the clcache dir to reset caches everywhere when a setting# is changed incompatibly (e.g. CLCACHE_COMPRESS).CLCACHE_DIR: C:\Users\Appveyor\clcache1@@ -60,39 +57,23 @@ environment:# (as generated by cmake)- JOB: "Build"GENERATOR: Ninja- CONFIGURATION: "Release"APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015- JOB: "Toolchain"GENERATOR: Ninja- CONFIGURATION: "Release"ARROW_S3: "ON"ARROW_BUILD_FLIGHT: "ON"ARROW_BUILD_GANDIVA: "ON"- JOB: "Build_Debug"GENERATOR: Ninja- CONFIGURATION: "Debug"- # NOTE: Since ARROW-5403 we have disabled the static CRT build- # - JOB: "Static_Crt_Build"- # GENERATOR: Ninja-- MSVC_DEFAULT_OPTIONS: ON- APPVEYOR_SAVE_CACHE_ON_ERROR: true--install:- - python ci\detect-changes.py > generated_changes.bat- # Populate ARROW_CI_* variables- - call generated_changes.bat- # Decide to exit if current job doesn't exercise affected topics- - call ci\appveyor-filter-changes.batbefore_build:- - call ci\appveyor-install.bat+ - call ci\appveyor-cpp-setup.batbuild_script:- - call ci\appveyor-build.bat+ - call ci\appveyor-cpp-build.bat# Disable test discoverytest: offafter_build:- - if "%USE_CLCACHE%" == "true" clcache -s+ - clcache -sdiff --git a/ci/appveyor-build.bat b/ci/appveyor-build.batdeleted file mode 100644index 7a80dab7df..0000000000--- a/ci/appveyor-build.bat+++ /dev/null@@ -1,22 +0,0 @@-@rem Licensed to the Apache Software Foundation (ASF) under one-@rem or more contributor license agreements. See the NOTICE file-@rem distributed with this work for additional information-@rem regarding copyright ownership. The ASF licenses this file-@rem to you under the Apache License, Version 2.0 (the-@rem "License"); you may not use this file except in compliance-@rem with the License. You may obtain a copy of the License at-@rem-@rem http://www.apache.org/licenses/LICENSE-2.0-@rem-@rem Unless required by applicable law or agreed to in writing,-@rem software distributed under the License is distributed on an-@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY-@rem KIND, either express or implied. See the License for the-@rem specific language governing permissions and limitations-@rem under the License.--@echo on--git config core.symlinks true-git reset --hard-call ci\appveyor-cpp-build.batdiff --git a/ci/appveyor-cpp-build.bat b/ci/appveyor-cpp-build.batindex 11567d92d6..a2ce076561 100644--- a/ci/appveyor-cpp-build.bat+++ b/ci/appveyor-cpp-build.bat@@ -17,87 +17,38 @@@echo on-@rem In release mode, disable optimizations (/Od) for faster compiling-set CMAKE_CXX_FLAGS_RELEASE=/Od--if "%JOB%" == "Static_Crt_Build" (- @rem Since we link the CRT statically, we should also disable building- @rem the Arrow shared library to link the tests statically, otherwise- @rem the Arrow DLL and the tests end up using a different instance of- @rem the CRT, which wreaks havoc.-- @rem ARROW-5403(wesm): Since changing to using gtest DLLs we can no- @rem longer run the unit tests because gtest.dll and the unit test- @rem executables have different static copies of the CRT-- mkdir cpp\build-debug- pushd cpp\build-debug-- cmake -G "%GENERATOR%" ^- -DARROW_VERBOSE_THIRDPARTY_BUILD=OFF ^- -DARROW_USE_STATIC_CRT=ON ^- -DARROW_BOOST_USE_SHARED=OFF ^- -DARROW_BUILD_SHARED=OFF ^- -DARROW_BUILD_TESTS=ON ^- -DARROW_BUILD_EXAMPLES=ON ^- -DCMAKE_BUILD_TYPE=Debug ^- -DARROW_ENABLE_TIMING_TESTS=OFF ^- -DARROW_TEST_LINKAGE=static ^- -DARROW_CXXFLAGS="/MP" ^- .. || exit /B+git config core.symlinks true+git reset --hard- cmake --build . --config Debug || exit /B- ctest --output-on-failure -j2 || exit /B- popd- rmdir /S /Q cpp\build-debug+@rem Retrieve git submodules, configure env var for Parquet unit tests+git submodule update --init || exit /B- mkdir cpp\build-release- pushd cpp\build-release-- cmake -G "%GENERATOR%" ^- -DARROW_VERBOSE_THIRDPARTY_BUILD=OFF ^- -DARROW_USE_STATIC_CRT=ON ^- -DARROW_BOOST_USE_SHARED=OFF ^- -DARROW_BUILD_SHARED=OFF ^- -DARROW_BUILD_TESTS=ON ^- -DARROW_BUILD_EXAMPLES=ON ^- -DCMAKE_BUILD_TYPE=Release ^- -DARROW_ENABLE_TIMING_TESTS=OFF ^- -DARROW_TEST_LINKAGE=static ^- -DCMAKE_CXX_FLAGS_RELEASE="/MT %CMAKE_CXX_FLAGS_RELEASE%" ^- -DARROW_CXXFLAGS="/WX /MP" ^- .. || exit /B-- cmake --build . --config Release || exit /B- ctest --output-on-failure -j2 || exit /B- popd-- @rem Finish Static_Crt_Build build successfully- exit /B 0-)+set ARROW_TEST_DATA=%CD%\testing\data+set PARQUET_TEST_DATA=%CD%\cpp\submodules\parquet-testing\data+@rem@rem In the configurations below we disable building the Arrow static library@rem to save some time. Unfortunately this will still build the Parquet static@rem library because of PARQUET-1420 (Thrift-generated symbols not exported in DLL).-+@remif "%JOB%" == "Build_Debug" (mkdir cpp\build-debugpushd cpp\build-debugcmake -G "%GENERATOR%" ^- -DARROW_USE_PRECOMPILED_HEADERS=OFF ^- -DARROW_VERBOSE_THIRDPARTY_BUILD=OFF ^-DARROW_BOOST_USE_SHARED=OFF ^- -DARROW_BUILD_TESTS=ON ^-DARROW_BUILD_EXAMPLES=ON ^- -DCMAKE_BUILD_TYPE=%CONFIGURATION% ^- -DCMAKE_UNITY_BUILD=ON ^-DARROW_BUILD_STATIC=OFF ^+ -DARROW_BUILD_TESTS=ON ^-DARROW_CXXFLAGS="/MP" ^-DARROW_ENABLE_TIMING_TESTS=OFF ^- .. || exit /B+ -DARROW_USE_PRECOMPILED_HEADERS=OFF ^+ -DARROW_VERBOSE_THIRDPARTY_BUILD=OFF ^+ -DCMAKE_BUILD_TYPE="Debug" ^+ -DCMAKE_UNITY_BUILD=ON ^+ .. || exit /B- cmake --build . --config %CONFIGURATION% || exit /B+ cmake --build . --config Debug || exit /Bctest --output-on-failure -j2 || exit /Bpopd@@ -105,26 +56,107 @@ if "%JOB%" == "Build_Debug" (exit /B 0)-@rem Avoid Boost 1.70 because of https://github.com/boostorg/process/issues/85-set CONDA_PACKAGES=--file=ci\conda_env_python.yml ^- python=%PYTHON% numpy=1.14 "boost-cpp<1.70"+call activate arrow-if "%ARROW_BUILD_GANDIVA%" == "ON" (- @rem Install llvmdev in the toolchain if building gandiva.dll- set CONDA_PACKAGES=%CONDA_PACKAGES% --file=ci\conda_env_gandiva.yml-)+@rem Use Boost from Anaconda+set BOOST_ROOT=%CONDA_PREFIX%\Library+set BOOST_LIBRARYDIR=%CONDA_PREFIX%\Library\lib++@rem The "main" C++ build script for Windows CI+@rem (i.e. for usual configurations)if "%JOB%" == "Toolchain" (- @rem Install pre-built "toolchain" packages for faster builds- set CONDA_PACKAGES=%CONDA_PACKAGES% --file=ci\conda_env_cpp.yml+ set CMAKE_ARGS=-DARROW_DEPENDENCY_SOURCE=CONDA -DARROW_WITH_BZ2=ON+) else (+ @rem We're in a conda environment but don't want to use it for the dependencies+ set CMAKE_ARGS=-DARROW_DEPENDENCY_SOURCE=AUTO)-conda create -n arrow -q -y %CONDA_PACKAGES% -c conda-forge || exit /B+@rem Enable warnings-as-errors+set ARROW_CXXFLAGS=/WX /MP-call activate arrow+@rem+@rem Build and test Arrow C++ libraries (including Parquet)+@rem-@rem Use Boost from Anaconda-set BOOST_ROOT=%CONDA_PREFIX%\Library-set BOOST_LIBRARYDIR=%CONDA_PREFIX%\Library\lib+mkdir cpp\build+pushd cpp\build++@rem XXX Without forcing CMAKE_CXX_COMPILER, CMake can re-run itself and+@rem unfortunately switch from Release to Debug mode...+@rem+@rem In release mode, disable optimizations (/Od) for faster compiling+@rem and enable runtime assertions.++cmake -G "%GENERATOR%" %CMAKE_ARGS% ^+ -DARROW_BOOST_USE_SHARED=OFF ^+ -DARROW_BUILD_EXAMPLES=ON ^+ -DARROW_BUILD_STATIC=OFF ^+ -DARROW_BUILD_TESTS=ON ^+ -DARROW_CSV=ON ^+ -DARROW_CXXFLAGS="%ARROW_CXXFLAGS%" ^+ -DARROW_DATASET=ON ^+ -DARROW_ENABLE_TIMING_TESTS=OFF ^+ -DARROW_FLIGHT=%ARROW_BUILD_FLIGHT% ^+ -DARROW_GANDIVA=%ARROW_BUILD_GANDIVA% ^+ -DARROW_MIMALLOC=ON ^+ -DARROW_PARQUET=ON ^+ -DARROW_PYTHON=ON ^+ -DARROW_S3=%ARROW_S3% ^+ -DARROW_VERBOSE_THIRDPARTY_BUILD=OFF ^+ -DARROW_WITH_BROTLI=ON ^+ -DARROW_WITH_LZ4=ON ^+ -DARROW_WITH_SNAPPY=ON ^+ -DARROW_WITH_ZLIB=ON ^+ -DARROW_WITH_ZSTD=ON ^+ -DCMAKE_BUILD_TYPE="Release" ^+ -DCMAKE_CXX_COMPILER=clcache ^+ -DCMAKE_CXX_FLAGS_RELEASE="/MD /Od /UNDEBUG" ^+ -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^+ -DCMAKE_UNITY_BUILD=ON ^+ -DCMAKE_VERBOSE_MAKEFILE=OFF ^+ -DPARQUET_BUILD_EXECUTABLES=ON ^+ -DPARQUET_REQUIRE_ENCRYPTION=ON ^+ .. || exit /B+cmake --build . --target install --config %CONFIGURATION% || exit /B++@rem Needed so arrow-python-test.exe works+set OLD_PYTHONHOME=%PYTHONHOME%+set PYTHONHOME=%CONDA_PREFIX%++ctest --output-on-failure -j2 || exit /B++set PYTHONHOME=%OLD_PYTHONHOME%+popd++@rem+@rem Build and install pyarrow+@rem++pushd python++set PYARROW_BUNDLE_BOOST=OFF+set PYARROW_CMAKE_GENERATOR=%GENERATOR%+set PYARROW_CXXFLAGS=%ARROW_CXXFLAGS%+set PYARROW_PARALLEL=2+set PYARROW_WITH_DATASET=ON+set PYARROW_WITH_FLIGHT=%ARROW_BUILD_FLIGHT%+set PYARROW_WITH_GANDIVA=%ARROW_BUILD_GANDIVA%+set PYARROW_WITH_PARQUET=ON+set PYARROW_WITH_S3=%ARROW_S3%+set PYARROW_WITH_STATIC_BOOST=ON++set ARROW_HOME=%CONDA_PREFIX%\Library+@rem ARROW-3075; pkgconfig is broken for Parquet for now+set PARQUET_HOME=%CONDA_PREFIX%\Library++python setup.py develop -q || exit /B++set PYTHONDEVMODE=1++py.test -r sxX --durations=15 --pyargs pyarrow.tests || exit /B++@rem+@rem Wheels are built and tested separately (see ARROW-5142).+@rem-call ci\cpp-msvc-build-main.batdiff --git a/ci/appveyor-cpp-setup.bat b/ci/appveyor-cpp-setup.batindex 90b0e24572..6ae431f89b 100644--- a/ci/appveyor-cpp-setup.bat+++ b/ci/appveyor-cpp-setup.bat@@ -17,8 +17,14 @@@echo on+set "PATH=C:\Miniconda37-x64;C:\Miniconda37-x64\Scripts;C:\Miniconda37-x64\Library\bin;%PATH%"+set BOOST_ROOT=C:\Libraries\boost_1_67_0+set BOOST_LIBRARYDIR=C:\Libraries\boost_1_67_0\lib64-msvc-14.0++@rem@rem Avoid picking up AppVeyor-installed OpenSSL (linker errors with gRPC)@rem XXX Perhaps there is a smarter way of solving this issue?+@remrd /s /q C:\OpenSSL-Win32rd /s /q C:\OpenSSL-Win64rd /s /q C:\OpenSSL-v11-Win32@@ -26,18 +32,47 @@ rd /s /q C:\OpenSSL-v11-Win64rd /s /q C:\OpenSSL-v111-Win32rd /s /q C:\OpenSSL-v111-Win64+@rem+@rem Configure miniconda+@remconda config --set auto_update_conda false-conda info -a-conda config --set show_channel_urls True-@rem Help with SSL timeouts to S3conda config --set remote_connect_timeout_secs 12-conda info -a-if "%GENERATOR%"=="Ninja" set need_vcvarsall=1+@rem+@rem Create conda environment for Build and Toolchain jobs+@rem+@rem Avoid Boost 1.70 because of https://github.com/boostorg/process/issues/85++set CONDA_PACKAGES=+if "%ARROW_BUILD_GANDIVA%" == "ON" (+ @rem Install llvmdev in the toolchain if building gandiva.dll+ set CONDA_PACKAGES=%CONDA_PACKAGES% --file=ci\conda_env_gandiva.yml+)+if "%JOB%" == "Toolchain" (+ @rem Install pre-built "toolchain" packages for faster builds+ set CONDA_PACKAGES=%CONDA_PACKAGES% --file=ci\conda_env_cpp.yml+)+if "%JOB%" NEQ "Build_Debug" (+ @rem Arrow conda environment is only required for the Build and Toolchain jobs+ conda create -n arrow -q -y -c conda-forge ^+ --file=ci\conda_env_python.yml ^+ %CONDA_PACKAGES% ^+ "boost-cpp<1.70" ^+ "ninja" ^+ "nomkl" ^+ "pandas" ^+ "python=%PYTHON%" ^+ || exit /B+)++@rem+@rem Configure compiler+@rem+if "%GENERATOR%"=="Ninja" set need_vcvarsall=1if defined need_vcvarsall (@rem Select desired compiler versionif "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" (@@ -47,19 +82,19 @@ if defined need_vcvarsall ())-if "%GENERATOR%"=="Ninja" conda install -y -q ninja--if "%USE_CLCACHE%" == "true" (- @rem Use clcache for faster builds- pip install -q git+https://github.com/frerich/clcache.git- @rem Limit cache size to 500 MB- clcache -M 500000000- clcache -c- clcache -s- powershell.exe -Command "Start-Process clcache-server"-)+@rem+@rem Use clcache for faster builds+@rem+pip install -q git+https://github.com/frerich/clcache.git+@rem Limit cache size to 500 MB+clcache -M 500000000+clcache -c+clcache -s+powershell.exe -Command "Start-Process clcache-server"+@rem+@rem Download Minio somewhere on PATH, for unit tests+@remif "%ARROW_S3%" == "ON" (- @rem Download Minio somewhere on PATH, for unit testsappveyor DownloadFile https://dl.min.io/server/minio/release/windows-amd64/minio.exe -FileName C:\Windows\Minio.exe || exit /B)diff --git a/ci/appveyor-filter-changes.bat b/ci/appveyor-filter-changes.batdeleted file mode 100644index 31f18ccf74..0000000000--- a/ci/appveyor-filter-changes.bat+++ /dev/null@@ -1,32 +0,0 @@-@rem Licensed to the Apache Software Foundation (ASF) under one-@rem or more contributor license agreements. See the NOTICE file-@rem distributed with this work for additional information-@rem regarding copyright ownership. The ASF licenses this file-@rem to you under the Apache License, Version 2.0 (the-@rem "License"); you may not use this file except in compliance-@rem with the License. You may obtain a copy of the License at-@rem-@rem http://www.apache.org/licenses/LICENSE-2.0-@rem-@rem Unless required by applicable law or agreed to in writing,-@rem software distributed under the License is distributed on an-@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY-@rem KIND, either express or implied. See the License for the-@rem specific language governing permissions and limitations-@rem under the License.--if "%JOB:~,2%" == "R " (- if "%ARROW_CI_R_AFFECTED%" == "0" (- echo ===- echo === No C++ or R changes, exiting job- echo ===- appveyor exit- )-) else (- if "%ARROW_CI_PYTHON_AFFECTED%" == "0" (- echo ===- echo === No C++ or Python changes, exiting job- echo ===- appveyor exit- )-)diff --git a/ci/appveyor-install.bat b/ci/appveyor-install.batdeleted file mode 100644index 7e829b5a82..0000000000--- a/ci/appveyor-install.bat+++ /dev/null@@ -1,23 +0,0 @@-@rem Licensed to the Apache Software Foundation (ASF) under one-@rem or more contributor license agreements. See the NOTICE file-@rem distributed with this work for additional information-@rem regarding copyright ownership. The ASF licenses this file-@rem to you under the Apache License, Version 2.0 (the-@rem "License"); you may not use this file except in compliance-@rem with the License. You may obtain a copy of the License at-@rem-@rem http://www.apache.org/licenses/LICENSE-2.0-@rem-@rem Unless required by applicable law or agreed to in writing,-@rem software distributed under the License is distributed on an-@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY-@rem KIND, either express or implied. See the License for the-@rem specific language governing permissions and limitations-@rem under the License.--@echo on--set "PATH=C:\Miniconda37-x64;C:\Miniconda37-x64\Scripts;C:\Miniconda37-x64\Library\bin;%PATH%"-set BOOST_ROOT=C:\Libraries\boost_1_67_0-set BOOST_LIBRARYDIR=C:\Libraries\boost_1_67_0\lib64-msvc-14.0-call ci\appveyor-cpp-setup.batdiff --git a/ci/cpp-msvc-build-main.bat b/ci/cpp-msvc-build-main.batdeleted file mode 100644index 735073c49c..0000000000--- a/ci/cpp-msvc-build-main.bat+++ /dev/null@@ -1,139 +0,0 @@-@rem Licensed to the Apache Software Foundation (ASF) under one-@rem or more contributor license agreements. See the NOTICE file-@rem distributed with this work for additional information-@rem regarding copyright ownership. The ASF licenses this file-@rem to you under the Apache License, Version 2.0 (the-@rem "License"); you may not use this file except in compliance-@rem with the License. You may obtain a copy of the License at-@rem-@rem http://www.apache.org/licenses/LICENSE-2.0-@rem-@rem Unless required by applicable law or agreed to in writing,-@rem software distributed under the License is distributed on an-@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY-@rem KIND, either express or implied. See the License for the-@rem specific language governing permissions and limitations-@rem under the License.--@rem The "main" C++ build script for Windows CI-@rem (i.e. for usual configurations)--set ARROW_HOME=%CONDA_PREFIX%\Library-set CMAKE_ARGS=-DARROW_VERBOSE_THIRDPARTY_BUILD=OFF -DARROW_ENABLE_TIMING_TESTS=OFF--if "%JOB%" == "Toolchain" (- set CMAKE_ARGS=^- %CMAKE_ARGS% ^- -DARROW_WITH_BZ2=ON ^- -DARROW_DEPENDENCY_SOURCE=CONDA-) else (- @rem We're in a conda environment but don't want to use it for the dependencies- set CMAKE_ARGS=%CMAKE_ARGS% -DARROW_DEPENDENCY_SOURCE=AUTO-)--if "%USE_CLCACHE%" == "true" (- @rem XXX Without forcing CMAKE_CXX_COMPILER, CMake can re-run itself and- @rem unfortunately switch from Release to Debug mode...- set CMAKE_ARGS=%CMAKE_ARGS% ^- -DARROW_USE_CLCACHE=ON ^- -DCMAKE_CXX_COMPILER=clcache-)--@rem Retrieve git submodules, configure env var for Parquet unit tests-git submodule update --init || exit /B-set ARROW_TEST_DATA=%CD%\testing\data-set PARQUET_TEST_DATA=%CD%\cpp\submodules\parquet-testing\data--@rem Enable warnings-as-errors-set ARROW_CXXFLAGS=/WX /MP--@rem In release mode, disable optimizations (/Od) for faster compiling-@rem and enable runtime assertions-set CMAKE_CXX_FLAGS_RELEASE=/Od /UNDEBUG--@rem-@rem Build and test Arrow C++ libraries (including Parquet)-@rem--mkdir cpp\build-pushd cpp\build--cmake -G "%GENERATOR%" %CMAKE_ARGS% ^- -DCMAKE_BUILD_TYPE=%CONFIGURATION% ^- -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^- -DCMAKE_VERBOSE_MAKEFILE=OFF ^- -DCMAKE_UNITY_BUILD=ON ^- -DARROW_VERBOSE_THIRDPARTY_BUILD=OFF ^- -DARROW_BOOST_USE_SHARED=OFF ^- -DARROW_BUILD_STATIC=OFF ^- -DARROW_BUILD_TESTS=ON ^- -DARROW_BUILD_EXAMPLES=ON ^- -DARROW_WITH_ZLIB=ON ^- -DARROW_WITH_ZSTD=ON ^- -DARROW_WITH_LZ4=ON ^- -DARROW_WITH_SNAPPY=ON ^- -DARROW_WITH_BROTLI=ON ^- -DARROW_CXXFLAGS="%ARROW_CXXFLAGS%" ^- -DCMAKE_CXX_FLAGS_RELEASE="/MD %CMAKE_CXX_FLAGS_RELEASE%" ^- -DARROW_FLIGHT=%ARROW_BUILD_FLIGHT% ^- -DARROW_GANDIVA=%ARROW_BUILD_GANDIVA% ^- -DARROW_DATASET=ON ^- -DARROW_S3=%ARROW_S3% ^- -DARROW_MIMALLOC=ON ^- -DARROW_PARQUET=ON ^- -DARROW_CSV=ON ^- -DPARQUET_REQUIRE_ENCRYPTION=ON ^- -DPARQUET_BUILD_EXECUTABLES=ON ^- -DARROW_PYTHON=ON ^- .. || exit /B-cmake --build . --target install --config %CONFIGURATION% || exit /B--@rem Needed so arrow-python-test.exe works-set OLD_PYTHONHOME=%PYTHONHOME%-set PYTHONHOME=%CONDA_PREFIX%--ctest --output-on-failure -j2 || exit /B--set PYTHONHOME=%OLD_PYTHONHOME%-popd--@rem-@rem Build and install pyarrow-@rem--pushd python--call conda install -y --file=..\ci\conda_env_python.yml ^- pandas -c conda-forge--set PYARROW_CXXFLAGS=%ARROW_CXXFLAGS%-set PYARROW_CMAKE_GENERATOR=%GENERATOR%-if "%ARROW_S3%" == "ON" (- set PYARROW_WITH_S3=ON-)-if "%ARROW_BUILD_FLIGHT%" == "ON" (- @rem ARROW-5441: bundling Arrow Flight libraries not implemented- set PYARROW_BUNDLE_ARROW_CPP=OFF-) else (- set PYARROW_BUNDLE_ARROW_CPP=ON-)-set PYARROW_BUNDLE_BOOST=OFF-set PYARROW_WITH_STATIC_BOOST=ON-set PYARROW_WITH_PARQUET=ON-set PYARROW_WITH_DATASET=ON-set PYARROW_WITH_FLIGHT=%ARROW_BUILD_FLIGHT%-set PYARROW_WITH_GANDIVA=%ARROW_BUILD_GANDIVA%-set PYARROW_PARALLEL=2--@rem ARROW-3075; pkgconfig is broken for Parquet for now-set PARQUET_HOME=%CONDA_PREFIX%\Library--python setup.py develop -q || exit /B--set PYTHONDEVMODE=1--py.test -r sxX --durations=15 --pyargs pyarrow.tests || exit /B--@rem-@rem Wheels are built and tested separately (see ARROW-5142).-@remdiff --git a/ci/detect-changes.py b/ci/detect-changes.pydeleted file mode 100644index c32f6e040d..0000000000--- a/ci/detect-changes.py+++ /dev/null@@ -1,365 +0,0 @@-# 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.--from __future__ import print_function--import functools-import os-import pprint-import re-import sys-import subprocess---perr = functools.partial(print, file=sys.stderr)---def dump_env_vars(prefix, pattern=None):- if pattern is not None:- match = lambda s: re.search(pattern, s)- else:- match = lambda s: True- for name in sorted(os.environ):- if name.startswith(prefix) and match(name):- perr("- {0}: {1!r}".format(name, os.environ[name]))---def run_cmd(cmdline):- proc = subprocess.Popen(cmdline,- stdout=subprocess.PIPE, stderr=subprocess.PIPE)- out, err = proc.communicate()- if proc.returncode != 0:- raise RuntimeError("Command {cmdline} failed with code {returncode}, "- "stderr was:\n{stderr}\n"- .format(cmdline=cmdline, returncode=proc.returncode,- stderr=err.decode()))- return out---def get_commit_description(commit):- """- Return the textual description (title + body) of the given git commit.- """- out = run_cmd(["git", "show", "--no-patch", "--pretty=format:%B",- commit])- return out.decode('utf-8', 'ignore')---def list_affected_files(commit_range):- """- Return a list of files changed by the given git commit range.- """- perr("Getting affected files from", repr(commit_range))- out = run_cmd(["git", "diff", "--name-only", commit_range])- return list(filter(None, (s.strip() for s in out.decode().splitlines())))---def get_travis_head_commit():- return os.environ['TRAVIS_COMMIT']---def get_travis_commit_range():- if os.environ['TRAVIS_EVENT_TYPE'] == 'pull_request':- # TRAVIS_COMMIT_RANGE is too pessimistic for PRs, as it may contain- # unrelated changes. Instead, use the same strategy as on AppVeyor- # below.- run_cmd(["git", "fetch", "-q", "origin",- "+refs/heads/{0}".format(os.environ['TRAVIS_BRANCH'])])- merge_base = run_cmd(["git", "merge-base",- "HEAD", "FETCH_HEAD"]).decode().strip()- return "{0}..HEAD".format(merge_base)- else:- cr = os.environ['TRAVIS_COMMIT_RANGE']- # See- # https://github.com/travis-ci/travis-ci/issues/4596#issuecomment-139811122- return cr.replace('...', '..')---def get_travis_commit_description():- # Prefer this to get_commit_description(get_travis_head_commit()),- # as rebasing or other repository events may make TRAVIS_COMMIT invalid- # at the time we inspect it- return os.environ['TRAVIS_COMMIT_MESSAGE']---def list_travis_affected_files():- """- Return a list of files affected in the current Travis build.- """- commit_range = get_travis_commit_range()- try:- return list_affected_files(commit_range)- except RuntimeError:- # TRAVIS_COMMIT_RANGE can contain invalid revisions when- # building a branch (not a PR) after rebasing:- # https://github.com/travis-ci/travis-ci/issues/2668- if os.environ['TRAVIS_EVENT_TYPE'] == 'pull_request':- raise- # If it's a rebase, it's probably enough to use the last commit only- commit_range = '{0}^..'.format(get_travis_head_commit())- return list_affected_files(commit_range)---def list_appveyor_affected_files():- """- Return a list of files affected in the current AppVeyor build.- This only works for PR builds.- """- # Re-fetch PR base branch (e.g. origin/master), pointing FETCH_HEAD to it- run_cmd(["git", "fetch", "-q", "origin",- "+refs/heads/{0}".format(os.environ['APPVEYOR_REPO_BRANCH'])])- # Compute base changeset between FETCH_HEAD (PR base) and HEAD (PR head)- merge_base = run_cmd(["git", "merge-base",- "HEAD", "FETCH_HEAD"]).decode().strip()- # Compute changes files between base changeset and HEAD- return list_affected_files("{0}..HEAD".format(merge_base))---def list_github_actions_affected_files():- """- Return a list of files affected in the current GitHub Actions build.- """- # GitHub Actions checkout `refs/remotes/pull/$PR/merge` where `HEAD` points- # to the merge commit while `HEAD^` points to the commit before. Hence,- # `..HEAD^` points to all commit between master and the PR.- return list_affected_files("HEAD^..")---LANGUAGE_TOPICS = ['c_glib', 'cpp', 'docs', 'go', 'java', 'js', 'python',- 'r', 'ruby', 'rust', 'csharp']--ALL_TOPICS = LANGUAGE_TOPICS + ['integration', 'dev']---AFFECTED_DEPENDENCIES = {- 'java': ['integration', 'python'],- 'js': ['integration'],- 'ci': ALL_TOPICS,- 'cpp': ['python', 'c_glib', 'r', 'ruby', 'integration'],- 'format': LANGUAGE_TOPICS,- 'go': ['integration'],- '.travis.yml': ALL_TOPICS,- 'appveyor.yml': ALL_TOPICS,- # In theory, it should ignore CONTRIBUTING.md and ISSUE_TEMPLATE.md, but in- # practice it's going to be CI- '.github': ALL_TOPICS,- 'c_glib': ['ruby']-}--COMPONENTS = {'cpp', 'java', 'c_glib', 'r', 'ruby', 'integration', 'js',- 'rust', 'csharp', 'go', 'docs', 'python', 'dev'}---def get_affected_topics(affected_files):- """- Return a dict of topics affected by the given files.- Each dict value is True if affected, False otherwise.- """- affected = dict.fromkeys(ALL_TOPICS, False)-- for path in affected_files:- parts = []- head = path- while head:- head, tail = os.path.split(head)- parts.append(tail)- parts.reverse()- assert parts- p = parts[0]- fn = parts[-1]- if fn.startswith('README'):- continue-- if p in COMPONENTS:- affected[p] = True-- _path_already_affected = {}-- def _affect_dependencies(component):- if component in _path_already_affected:- # For circular dependencies, terminate- return- for topic in AFFECTED_DEPENDENCIES.get(component, ()):- affected[topic] = True- _affect_dependencies(topic)- _path_already_affected[topic] = True-- _affect_dependencies(p)-- return affected---def make_env_for_topics(affected):- return {'ARROW_CI_{0}_AFFECTED'.format(k.upper()): '1' if v else '0'- for k, v in affected.items()}---def get_unix_shell_eval(env):- """- Return a shell-evalable string to setup some environment variables.- """- return "; ".join(("export {0}='{1}'".format(k, v)- for k, v in env.items()))---def get_windows_shell_eval(env):- """- Return a shell-evalable string to setup some environment variables.- """- return "\n".join(('set "{0}={1}"'.format(k, v)- for k, v in env.items()))---def run_from_travis():- perr("Environment variables (excerpt):")- dump_env_vars('TRAVIS_', '(BRANCH|COMMIT|PULL)')- if (os.environ['TRAVIS_REPO_SLUG'] == 'apache/arrow' and- os.environ['TRAVIS_BRANCH'] == 'master' and- os.environ['TRAVIS_EVENT_TYPE'] != 'pull_request'):- # Never skip anything on master builds in the official repository- affected = dict.fromkeys(ALL_TOPICS, True)- else:- desc = get_travis_commit_description()- if '[skip travis]' in desc:- # Skip everything- affected = dict.fromkeys(ALL_TOPICS, False)- elif '[force ci]' in desc or '[force travis]' in desc:- # Test everything- affected = dict.fromkeys(ALL_TOPICS, True)- else:- # Test affected topics- affected_files = list_travis_affected_files()- perr("Affected files:", affected_files)- affected = get_affected_topics(affected_files)- assert set(affected) <= set(ALL_TOPICS), affected-- perr("Affected topics:")- perr(pprint.pformat(affected))- return get_unix_shell_eval(make_env_for_topics(affected))---def run_from_appveyor():- perr("Environment variables (excerpt):")- dump_env_vars('APPVEYOR_', '(PULL|REPO)')- if not os.environ.get('APPVEYOR_PULL_REQUEST_HEAD_COMMIT'):- # Not a PR build, test everything- affected = dict.fromkeys(ALL_TOPICS, True)- else:- affected_files = list_appveyor_affected_files()- perr("Affected files:", affected_files)- affected = get_affected_topics(affected_files)- assert set(affected) <= set(ALL_TOPICS), affected-- perr("Affected topics:")- perr(pprint.pformat(affected))- return get_windows_shell_eval(make_env_for_topics(affected))---def run_from_github():- perr("Environment variables (excerpt):")- dump_env_vars('GITHUB_', '(REPOSITORY|ACTOR|SHA|REF|HEAD_REF|BASE_REF|EVENT_NAME)')- if os.environ['GITHUB_EVENT_NAME'] != 'pull_request':- # Not a PR build, test everything- affected = dict.fromkeys(ALL_TOPICS, True)- else:- affected_files = list_github_actions_affected_files()- perr("Affected files:", affected_files)- affected = get_affected_topics(affected_files)- assert set(affected) <= set(ALL_TOPICS), affected-- perr("Affected topics:")- perr(pprint.pformat(affected))- return get_unix_shell_eval(make_env_for_topics(affected))---def test_get_affected_topics():- affected_topics = get_affected_topics(['cpp/CMakeLists.txt'])- assert affected_topics == {- 'c_glib': True,- 'cpp': True,- 'docs': False,- 'go': False,- 'java': False,- 'js': False,- 'python': True,- 'r': True,- 'ruby': True,- 'rust': False,- 'csharp': False,- 'integration': True,- 'dev': False- }-- affected_topics = get_affected_topics(['format/Schema.fbs'])- assert affected_topics == {- 'c_glib': True,- 'cpp': True,- 'docs': True,- 'go': True,- 'java': True,- 'js': True,- 'python': True,- 'r': True,- 'ruby': True,- 'rust': True,- 'csharp': True,- 'integration': True,- 'dev': False- }-- affected_topics = get_affected_topics(['.github/workflows'])- assert affected_topics == {- 'c_glib': True,- 'cpp': True,- 'docs': True,- 'go': True,- 'java': True,- 'js': True,- 'python': True,- 'r': True,- 'ruby': True,- 'rust': True,- 'csharp': True,- 'integration': True,- 'dev': True,- }---if __name__ == "__main__":- # This script should have its output evaluated by a shell,- # e.g. "eval `python ci/detect-changes.py`"- if os.environ.get('TRAVIS'):- try:- print(run_from_travis())- except Exception:- # Make sure the enclosing eval will return an error- print("exit 1")- raise- elif os.environ.get('APPVEYOR'):- try:- print(run_from_appveyor())- except Exception:- print("exit 1")- raise- elif os.environ.get('GITHUB_WORKFLOW'):- try:- print(run_from_github())- except Exception:- print("exit 1")- raise- else:- sys.exit("Script must be run under Travis-CI, AppVeyor or GitHub Actions")