Skip to content

Apache DataFusion SQL Query Engine

ARROW-7994: [CI][C++][GLib][Ruby] Move MinGW CI to GitHub Actions from AppVeyor

Sutou Kouhei95af148314fd
diff --git a/.dir-locals.el b/.dir-locals.el
index 304c13573f..06090cfe9c 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -18,4 +18,5 @@
((sh-mode . ((indent-tabs-mode . nil)
(sh-indentation . 2)
(sh-basic-offset . 2)))
- (cmake-mode . ((indent-tabs-mode . nil))))
+ (cmake-mode . ((indent-tabs-mode . nil)))
+ (powershell-mode . ((indent-tabs-mode . nil))))
diff --git a/.dockerignore b/.dockerignore
index 4157ecb129..26ff244917 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -31,3 +31,19 @@
!python/manylinux1/**
!python/manylinux2010/**
!r/DESCRIPTION
+!ruby/Gemfile
+!ruby/red-arrow/Gemfile
+!ruby/red-arrow/lib/arrow/version.rb
+!ruby/red-arrow/red-arrow.gemspec
+!ruby/red-arrow-cuda/Gemfile
+!ruby/red-arrow-cuda/lib/arrow-cuda/version.rb
+!ruby/red-arrow-cuda/red-arrow-cuda.gemspec
+!ruby/red-gandiva/Gemfile
+!ruby/red-gandiva/lib/gandiva/version.rb
+!ruby/red-gandiva/red-gandiva.gemspec
+!ruby/red-parquet/Gemfile
+!ruby/red-parquet/lib/parquet/version.rb
+!ruby/red-parquet/red-parquet.gemspec
+!ruby/red-plasma/Gemfile
+!ruby/red-plasma/lib/plasma/version.rb
+!ruby/red-plasma/red-plasma.gemspec
diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml
index ae694c1e35..58d179b364 100644
--- a/.github/workflows/cpp.yml
+++ b/.github/workflows/cpp.yml
@@ -186,7 +186,13 @@ jobs:
BOOST_LIBRARYDIR: C:\local\boost_1_67_0\lib64-msvc-14.1\
steps:
- name: Disable Crash Dialogs
- run: reg add "HKCU\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v DontShowUI /t REG_DWORD /d 1 /f
+ run: |
+ reg add `
+ "HKCU\SOFTWARE\Microsoft\Windows\Windows Error Reporting" `
+ /v DontShowUI `
+ /t REG_DWORD `
+ /d 1 `
+ /f
- name: Installed Packages
run: choco list -l
- name: Install Dependencies
@@ -201,3 +207,83 @@ jobs:
- name: Test
shell: bash
run: ci/scripts/cpp_test.sh $(pwd) $(pwd)/build
+
+ windows-mingw:
+ name: AMD64 Windows MinGW ${{ matrix.mingw-n-bits }} C++
+ runs-on: windows-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ mingw-n-bits:
+ - 32
+ - 64
+ env:
+ ARROW_BUILD_SHARED: ON
+ ARROW_BUILD_STATIC: OFF
+ ARROW_BUILD_TYPE: release
+ ARROW_BUILD_TESTS: ON
+ ARROW_DATASET: ON
+ ARROW_FLIGHT: ON
+ ARROW_HDFS: OFF
+ ARROW_HOME: /mingw{{ matrix.mingw-n-bits }}
+ ARROW_JEMALLOC: OFF
+ ARROW_PARQUET: ON
+ ARROW_PYTHON: ON
+ ARROW_USE_GLOG: OFF
+ ARROW_VERBOSE_THIRDPARTY_BUILD: OFF
+ ARROW_WITH_BROTLI: ON
+ ARROW_WITH_BZ2: ON
+ ARROW_WITH_LZ4: ON
+ ARROW_WITH_SNAPPY: ON
+ ARROW_WITH_ZLIB: ON
+ ARROW_WITH_ZSTD: ON
+ # Don't use preinstalled Boost by empty BOOST_ROOT and
+ # -DBoost_NO_BOOST_CMAKE=ON
+ BOOST_ROOT: ""
+ CMAKE_ARGS: >-
+ -DARROW_PACKAGE_PREFIX=/mingw${{ matrix.mingw-n-bits }}
+ -DBoost_NO_BOOST_CMAKE=ON
+ CMAKE_GENERATOR: MSYS Makefiles
+ CMAKE_UNITY_BUILD: ON
+ steps:
+ - name: Disable Crash Dialogs
+ run: |
+ reg add `
+ "HKCU\SOFTWARE\Microsoft\Windows\Windows Error Reporting" `
+ /v DontShowUI `
+ /t REG_DWORD `
+ /d 1 `
+ /f
+ - name: Checkout Arrow
+ uses: actions/checkout@v2
+ - name: Checkout submodules
+ run: |
+ git submodule update --init --force --recursive --depth 1
+ - name: Bootstrap MSYS2
+ run: |
+ ci\scripts\msys2_bootstrap.ps1 ${{ matrix.mingw-n-bits }}
+ - name: Setup MSYS2
+ run: |
+ . ..\env.ps1
+ bash ci\scripts\msys2_system_upgrade.sh
+ bash ci\scripts\msys2_setup.sh cpp
+ - name: Build
+ run: |
+ . ..\env.ps1
+ $Env:CMAKE_BUILD_PARALLEL_LEVEL = $Env:NUMBER_OF_PROCESSORS
+ $source_dir = "$(cygpath --unix "$(Get-Location)")"
+ $build_dir = "$(cygpath --unix "$(Get-Location)\build")"
+ $ErrorActionPreference = "Continue"
+ bash ci\scripts\cpp_build.sh "${source_dir}" "${build_dir}"
+ - name: Test
+ run: |
+ . ..\env.ps1
+ $python_version = $(python -c "import sys; print('.'.join(map(str, sys.version_info[0:2])))")
+ $Env:PYTHONHOME = "${Env:MINGW_PREFIX_WINDOWS}\lib\python${python_version}"
+ $Env:PYTHONPATH = "${Env:PYTHONHOME}"
+ $Env:PYTHONPATH += ";${Env:PYTHONHOME}\lib-dynload"
+ $Env:PYTHONPATH += ";${Env:PYTHONHOME}\site-packages"
+ $source_dir = "$(cygpath --unix "$(Get-Location)")"
+ $build_dir = "$(cygpath --unix "$(Get-Location)\build")"
+ $ErrorActionPreference = "Continue"
+ bash ci\scripts\cpp_test.sh "${source_dir}" "${build_dir}"
diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml
index d5e3e5958a..b2e31f16c0 100644
--- a/.github/workflows/ruby.yml
+++ b/.github/workflows/ruby.yml
@@ -82,7 +82,7 @@ jobs:
strategy:
fail-fast: false
env:
- ARROW_BUILD_TESTS: ON
+ ARROW_BUILD_TESTS: OFF
ARROW_GANDIVA: ON
ARROW_GLIB_DEVELOPMENT_MODE: true
ARROW_GLIB_GTK_DOC: true
@@ -105,7 +105,11 @@ jobs:
run: |
brew bundle --file=cpp/Brewfile
brew bundle --file=c_glib/Brewfile
- bundle install --gemfile ruby/red-arrow/Gemfile
+ bundle install --gemfile c_glib/Gemfile
+ bundle install --gemfile ruby/Gemfile
+ for ruby_package_gemfile in ruby/*/Gemfile; do \
+ bundle install --gemfile ${ruby_package_gemfile}
+ done
- name: Build
shell: bash
run: |
@@ -116,4 +120,100 @@ jobs:
run: ci/scripts/c_glib_test.sh $(pwd) $(pwd)/build
- name: Test Ruby
shell: bash
- run: ci/scripts/ruby_test.sh $(pwd)
+ run: ci/scripts/ruby_test.sh $(pwd) $(pwd)/build
+
+ windows:
+ name: AMD64 Windows MinGW ${{ matrix.mingw-n-bits }} GLib & Ruby
+ runs-on: windows-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ mingw-n-bits:
+ - 64
+ ruby-version:
+ - 2.6
+ env:
+ ARROW_BUILD_SHARED: ON
+ ARROW_BUILD_STATIC: OFF
+ ARROW_BUILD_TYPE: release
+ ARROW_BUILD_TESTS: OFF
+ ARROW_DATASET: ON
+ ARROW_FLIGHT: ON
+ ARROW_HDFS: OFF
+ ARROW_HOME: /mingw${{ matrix.mingw-n-bits }}
+ ARROW_JEMALLOC: OFF
+ ARROW_PARQUET: ON
+ ARROW_PYTHON: OFF
+ ARROW_USE_GLOG: OFF
+ ARROW_WITH_BROTLI: ON
+ ARROW_WITH_BZ2: ON
+ ARROW_WITH_LZ4: ON
+ ARROW_WITH_SNAPPY: ON
+ ARROW_WITH_ZLIB: ON
+ ARROW_WITH_ZSTD: ON
+ # Don't use preinstalled Boost by empty BOOST_ROOT and
+ # -DBoost_NO_BOOST_CMAKE=ON
+ BOOST_ROOT: ""
+ CMAKE_ARGS: >-
+ -DARROW_PACKAGE_PREFIX=/mingw${{ matrix.mingw-n-bits }}
+ -DBoost_NO_BOOST_CMAKE=ON
+ CMAKE_GENERATOR: MSYS Makefiles
+ CMAKE_UNITY_BUILD: ON
+ steps:
+ - name: Disable Crash Dialogs
+ run: |
+ reg add `
+ "HKCU\SOFTWARE\Microsoft\Windows\Windows Error Reporting" `
+ /v DontShowUI `
+ /t REG_DWORD `
+ /d 1 `
+ /f
+ - name: Checkout Arrow
+ uses: actions/checkout@v2
+ - name: Checkout submodules
+ run: |
+ git submodule update --init --force --recursive --depth 1
+ - name: Setup Ruby
+ uses: actions/setup-ruby@v1
+ with:
+ ruby-version: ${{ matrix.ruby-version }}
+ - name: Setup MSYS2
+ run: |
+ ridk exec bash ci\scripts\msys2_system_upgrade.sh
+ ridk exec bash ci\scripts\msys2_setup.sh ruby
+ - name: Build C++
+ run: |
+ $Env:CMAKE_BUILD_PARALLEL_LEVEL = $Env:NUMBER_OF_PROCESSORS
+ $source_dir = "$(ridk exec cygpath --unix "$(Get-Location)")"
+ $build_dir = "$(ridk exec cygpath --unix "$(Get-Location)\build")"
+ $ErrorActionPreference = "Continue"
+ ridk exec bash ci\scripts\cpp_build.sh "${source_dir}" "${build_dir}"
+ - name: Build GLib
+ run: |
+ $Env:CMAKE_BUILD_PARALLEL_LEVEL = $Env:NUMBER_OF_PROCESSORS
+ $source_dir = "$(ridk exec cygpath --unix "$(Get-Location)")"
+ $build_dir = "$(ridk exec cygpath --unix "$(Get-Location)\build")"
+ $ErrorActionPreference = "Continue"
+ ridk exec bash ci\scripts\c_glib_build.sh "${source_dir}" "${build_dir}"
+ - name: Install test dependencies
+ run: |
+ bundle install --gemfile c_glib\Gemfile
+ bundle install --gemfile ruby\Gemfile
+ Get-ChildItem ruby\*\Gemfile | `
+ ForEach-Object {bundle install --gemfile $_}
+ - name: Test GLib
+ run: |
+ $source_dir = "$(ridk exec cygpath --unix "$(Get-Location)")"
+ $build_dir = "$(ridk exec cygpath --unix "$(Get-Location)\build")"
+ $ErrorActionPreference = "Continue"
+ ridk exec bash ci\scripts\c_glib_test.sh "${source_dir}" "${build_dir}"
+ - name: Test Ruby
+ run: |
+ $Env:PKG_CONFIG_PATH = `
+ "$(ridk exec cygpath --absolute --windows "${Env:ARROW_HOME}/lib/pkgconfig")"
+ $Env:GI_TYPELIB_PATH = `
+ "$(ridk exec cygpath --absolute --windows "${Env:ARROW_HOME}/lib/girepository-1.0")"
+ $Env:RUBYOPTS = "-rdevkit"
+ $Env:MAKE = "ridk exec make"
+ $ErrorActionPreference = "Continue"
+ rake -f ruby\Rakefile
diff --git a/appveyor.yml b/appveyor.yml
index 51550fa25a..9dcb9d542f 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -22,13 +22,11 @@ only_commits:
# Skip commits not related to Python, C++, R, or Ruby
files:
- appveyor.yml
- - c_glib/
- ci/
- cpp/
- format/
- python/
- r/
- - ruby/
cache:
- C:\Users\Appveyor\clcache1
@@ -75,18 +73,6 @@ environment:
# NOTE: Since ARROW-5403 we have disabled the static CRT build
# - JOB: "Static_Crt_Build"
# GENERATOR: Ninja
- - JOB: "MinGW32"
- MINGW_ARCH: i686
- MINGW_PACKAGE_PREFIX: mingw-w64-i686
- MINGW_PREFIX: c:\msys64\mingw32
- MSYSTEM: MINGW32
- USE_CLCACHE: false
- - JOB: "MinGW64"
- MINGW_ARCH: x86_64
- MINGW_PACKAGE_PREFIX: mingw-w64-x86_64
- MINGW_PREFIX: c:\msys64\mingw64
- MSYSTEM: MINGW64
- USE_CLCACHE: false
- JOB: "R with libarrow"
USE_CLCACHE: false
TEST_R_WITH_ARROW: "TRUE"
diff --git a/ci/appveyor-build.bat b/ci/appveyor-build.bat
index 2047eca43e..7a80dab7df 100644
--- a/ci/appveyor-build.bat
+++ b/ci/appveyor-build.bat
@@ -19,8 +19,4 @@
git config core.symlinks true
git reset --hard
-if "%JOB:~,5%" == "MinGW" (
- call ci\appveyor-cpp-build-mingw.bat
-) else (
- call ci\appveyor-cpp-build.bat
-)
+call ci\appveyor-cpp-build.bat
diff --git a/ci/appveyor-cpp-build-mingw.bat b/ci/appveyor-cpp-build-mingw.bat
deleted file mode 100644
index 36895bbb8e..0000000000
--- a/ci/appveyor-cpp-build-mingw.bat
+++ /dev/null
@@ -1,103 +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 CMAKE_BUILD_TYPE=release
-set MESON_BUILD_TYPE=release
-
-set INSTALL_DIR=%HOMEDRIVE%%HOMEPATH%\install
-set PATH=%INSTALL_DIR%\bin;%PATH%
-set PKG_CONFIG_PATH=%INSTALL_DIR%\lib\pkgconfig
-set GI_TYPELIB_PATH=%INSTALL_DIR%\lib\girepository-1.0
-set ARROW_DLL_PATH=%MINGW_PREFIX%\bin
-set ARROW_DLL_PATH=%INSTALL_DIR%\bin;%ARROW_DLL_PATH%
-set ARROW_PKG_CONFIG_PATH=%PKG_CONFIG_PATH%
-
-for /f "usebackq" %%v in (`python3 -c "import sys; print('.'.join(map(str, sys.version_info[0:2])))"`) do (
- set PYTHON_VERSION=%%v
-)
-
-git submodule update --init || exit /B
-set ARROW_TEST_DATA=%CD%\testing\data
-set PARQUET_TEST_DATA=%CD%\cpp\submodules\parquet-testing\data
-
-set CPP_BUILD_DIR=cpp\build
-mkdir %CPP_BUILD_DIR%
-pushd %CPP_BUILD_DIR%
-
-cmake ^
- -G "MSYS Makefiles" ^
- -DARROW_BUILD_STATIC=OFF ^
- -DARROW_BUILD_TESTS=ON ^
- -DARROW_FLIGHT=ON ^
- -DARROW_PACKAGE_PREFIX=%MINGW_PREFIX% ^
- -DARROW_PARQUET=ON ^
- -DARROW_PYTHON=ON ^
- -DARROW_USE_GLOG=OFF ^
- -DARROW_VERBOSE_THIRDPARTY_BUILD=OFF ^
- -DARROW_WITH_BROTLI=ON ^
- -DARROW_WITH_BZ2=ON ^
- -DARROW_WITH_LZ4=ON ^
- -DARROW_WITH_SNAPPY=ON ^
- -DARROW_WITH_ZLIB=ON ^
- -DARROW_WITH_ZSTD=ON ^
- -DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
- -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% ^
- -DPARQUET_REQUIRE_ENCRYPTION=ON ^
- -DPythonInterp_FIND_VERSION=ON ^
- -DPythonInterp_FIND_VERSION_MAJOR=3 ^
- .. || exit /B
-make -j4 || exit /B
-setlocal
-set PYTHONHOME=%MINGW_PREFIX%\lib\python%PYTHON_VERSION%
-set PYTHONPATH=%PYTHONHOME%
-set PYTHONPATH=%PYTHONPATH%;%MINGW_PREFIX%\lib\python%PYTHON_VERSION%\lib-dynload
-set PYTHONPATH=%PYTHONPATH%;%MINGW_PREFIX%\lib\python%PYTHON_VERSION%\site-packages
-@rem TODO(ARROW-4784): Run all tests
-ctest ^
- --exclude-regex "arrow-array-test|arrow-thread-pool-test" ^
- --output-on-failure ^
- --parallel 2 || exit /B
-endlocal
-make install || exit /B
-popd
-
-set C_GLIB_BUILD_DIR=c_glib\build
-meson ^
- setup ^
- --prefix=%INSTALL_DIR% ^
- --buildtype=%MESON_BUILD_TYPE% ^
- -Ddevelopment_mode=true ^
- %C_GLIB_BUILD_DIR% ^
- c_glib || exit /B
-sed -i'' -s 's/\r//g' %C_GLIB_BUILD_DIR%/arrow-glib/version.h || exit /B
-ninja -C %C_GLIB_BUILD_DIR% || exit /B
-ninja -C %C_GLIB_BUILD_DIR% install || exit /B
-ruby c_glib\test\run-test.rb || exit /B
-
-pushd ruby\red-arrow
-ruby -S bundle install || exit /B
-pacman --remove --noconfirm "%MINGW_PACKAGE_PREFIX%-arrow"
-ruby -rdevkit test\run-test.rb || exit /B
-popd
-
-pushd ruby\red-parquet
-ruby -S bundle install || exit /B
-pacman --remove --noconfirm "%MINGW_PACKAGE_PREFIX%-arrow"
-ruby test\run-test.rb || exit /B
-popd
diff --git a/ci/appveyor-cpp-setup-mingw.bat b/ci/appveyor-cpp-setup-mingw.bat
deleted file mode 100644
index 88e619f660..0000000000
--- a/ci/appveyor-cpp-setup-mingw.bat
+++ /dev/null
@@ -1,59 +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
-
-if "%MSYSTEM%" == "MINGW32" (
- set "PATH=c:\Ruby26\bin;%PATH%"
-) else (
- set "PATH=c:\Ruby26-x64\bin;%PATH%"
-)
-set PATH=%MINGW_PREFIX%\bin;C:\msys64\usr\bin;%PATH%
-
-pacman --remove --noconfirm ^
- %MINGW_PACKAGE_PREFIX%-gcc-ada ^
- %MINGW_PACKAGE_PREFIX%-gcc-objc || exit /B
-pacman --sync --refresh --sysupgrade --noconfirm || exit /B
-pacman --sync --noconfirm ^
- %MINGW_PACKAGE_PREFIX%-gcc ^
- %MINGW_PACKAGE_PREFIX%-gcc-fortran ^
- %MINGW_PACKAGE_PREFIX%-python3 ^
- %MINGW_PACKAGE_PREFIX%-readline ^
- %MINGW_PACKAGE_PREFIX%-sqlite3 || exit /B
-pacman --sync --noconfirm ^
- ccache ^
- %MINGW_PACKAGE_PREFIX%-boost ^
- %MINGW_PACKAGE_PREFIX%-brotli ^
- %MINGW_PACKAGE_PREFIX%-cmake ^
- %MINGW_PACKAGE_PREFIX%-gflags ^
- %MINGW_PACKAGE_PREFIX%-gobject-introspection ^
- %MINGW_PACKAGE_PREFIX%-grpc ^
- %MINGW_PACKAGE_PREFIX%-gtest ^
- %MINGW_PACKAGE_PREFIX%-gtk-doc ^
- %MINGW_PACKAGE_PREFIX%-lz4 ^
- %MINGW_PACKAGE_PREFIX%-meson ^
- %MINGW_PACKAGE_PREFIX%-protobuf ^
- %MINGW_PACKAGE_PREFIX%-python3-numpy ^
- %MINGW_PACKAGE_PREFIX%-rapidjson ^
- %MINGW_PACKAGE_PREFIX%-snappy ^
- %MINGW_PACKAGE_PREFIX%-thrift ^
- %MINGW_PACKAGE_PREFIX%-zlib ^
- %MINGW_PACKAGE_PREFIX%-zstd || exit /B
-
-pushd c_glib
-ruby -S bundle install || exit /B
-popd
diff --git a/ci/appveyor-filter-changes.bat b/ci/appveyor-filter-changes.bat
index f78917097f..31f18ccf74 100644
--- a/ci/appveyor-filter-changes.bat
+++ b/ci/appveyor-filter-changes.bat
@@ -15,14 +15,7 @@
@rem specific language governing permissions and limitations
@rem under the License.
-if "%JOB:~,5%" == "MinGW" (
- if "%ARROW_CI_RUBY_AFFECTED%" == "0" (
- echo ===
- echo === No C++, GLib or Ruby changes, exiting job
- echo ===
- appveyor exit
- )
-) else if "%JOB:~,2%" == "R " (
+if "%JOB:~,2%" == "R " (
if "%ARROW_CI_R_AFFECTED%" == "0" (
echo ===
echo === No C++ or R changes, exiting job
diff --git a/ci/appveyor-install.bat b/ci/appveyor-install.bat
index 94cc22ddfd..7e829b5a82 100644
--- a/ci/appveyor-install.bat
+++ b/ci/appveyor-install.bat
@@ -17,19 +17,7 @@
@echo on
-IF "%JOB:~,5%" == "MinGW" goto mingw
-@rem all else are C++
-goto cpp
-
-:cpp
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.bat
-goto scriptexit
-
-:mingw
-call ci\appveyor-cpp-setup-mingw.bat
-goto scriptexit
-
-:scriptexit
diff --git a/ci/docker/linux-apt-ruby.dockerfile b/ci/docker/linux-apt-ruby.dockerfile
index 188c9711cf..58fd65bd57 100644
--- a/ci/docker/linux-apt-ruby.dockerfile
+++ b/ci/docker/linux-apt-ruby.dockerfile
@@ -15,10 +15,13 @@
# specific language governing permissions and limitations
# under the License.
-# depends on a C Glib image
+# depends on a C GLib image
ARG base
FROM ${base}
-# TODO(kszucs): we should install the required dependencies here
-# COPY ruby/ /arrow/
-# RUN bundle install --gemfile /arrow/ruby/red-arrow/Gemfile
+COPY ruby/ /arrow/ruby/
+RUN bundle install --gemfile /arrow/ruby/Gemfile
+RUN \
+ for package in /arrow/ruby/*; do \
+ bundle install --gemfile ${package}/Gemfile; \
+ done
diff --git a/ci/scripts/c_glib_build.sh b/ci/scripts/c_glib_build.sh
index a0f7b0c96a..ce3cea18e7 100755
--- a/ci/scripts/c_glib_build.sh
+++ b/ci/scripts/c_glib_build.sh
@@ -24,6 +24,8 @@ build_dir=${2}/c_glib
: ${ARROW_GLIB_GTK_DOC:=false}
: ${ARROW_GLIB_DEVELOPMENT_MODE:=false}
+export PKG_CONFIG_PATH=${ARROW_HOME}/lib/pkgconfig
+
export CFLAGS="-DARROW_NO_DEPRECATED_API"
export CXXFLAGS="-DARROW_NO_DEPRECATED_API"
diff --git a/ci/scripts/c_glib_test.sh b/ci/scripts/c_glib_test.sh
index 227c283f5c..8be22c6d89 100755
--- a/ci/scripts/c_glib_test.sh
+++ b/ci/scripts/c_glib_test.sh
@@ -25,7 +25,6 @@ build_dir=${2}/c_glib
export LD_LIBRARY_PATH=${ARROW_HOME}/lib:${LD_LIBRARY_PATH}
export PKG_CONFIG_PATH=${ARROW_HOME}/lib/pkgconfig
export GI_TYPELIB_PATH=${ARROW_HOME}/lib/girepository-1.0
-export PKG_CONFIG=/usr/bin/pkg-config
pushd ${source_dir}
diff --git a/ci/scripts/msys2_bootstrap.ps1 b/ci/scripts/msys2_bootstrap.ps1
new file mode 100755
index 0000000000..e287620093
--- /dev/null
+++ b/ci/scripts/msys2_bootstrap.ps1
@@ -0,0 +1,59 @@
+# 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.
+
+Param([Parameter(Mandatory=$true)][int32]$n_bits)
+
+git clone `
+ --depth 1 `
+ --quiet `
+ https://github.com/msys2/msys2-ci-base.git `
+ ..\msys64
+
+echo "" > env.ps1
+
+If (${n_bits} -eq 32) {
+ $carch = "i686"
+} Else {
+ $carch = "x86_64"
+}
+echo "`$Env:MINGW_CHOST = `"${carch}-w64-mingw32`"" `
+ >> ../env.ps1
+echo "`$Env:MINGW_PACKAGE_PREFIX = `"mingw-w64-${carch}`"" `
+ >> ../env.ps1
+echo "`$Env:MINGW_PREFIX = `"/mingw${n_bits}`"" `
+ >> ../env.ps1
+echo "`$Env:MSYSTEM_CARCH = `"${carch}`"" `
+ >> ../env.ps1
+echo "`$Env:MSYSTEM_CHOST = `"${carch}-w64-mingw32`"" `
+ >> ../env.ps1
+echo "`$Env:MSYSTEM_PREFIX = `"/mingw${n_bits}`"" `
+ >> ../env.ps1
+echo "`$Env:MSYSTEM = `"MINGW${n_bits}`"" `
+ >> ../env.ps1
+
+$MSYS_ROOT_WINDOWS = "$(Get-Location)\..\msys64"
+echo "`$Env:MSYS_ROOT_WINDOWS = `"${MSYS_ROOT_WINDOWS}`"" `
+ >> ../env.ps1
+
+$MINGW_PREFIX_WINDOWS = "${MSYS_ROOT_WINDOWS}\mingw${n_bits}"
+echo "`$Env:MINGW_PREFIX_WINDOWS = `"${MINGW_PREFIX_WINDOWS}`"" `
+ >> ../env.ps1
+
+echo "`$Env:PATH = `"${MSYS_ROOT_WINDOWS}\usr\bin;`${Env:PATH}`"" `
+ >> ../env.ps1
+echo "`$Env:PATH = `"${MINGW_PREFIX_WINDOWS}\bin;`${Env:PATH}`"" `
+ >> ../env.ps1
diff --git a/ci/scripts/msys2_setup.sh b/ci/scripts/msys2_setup.sh
new file mode 100755
index 0000000000..b02dde1803
--- /dev/null
+++ b/ci/scripts/msys2_setup.sh
@@ -0,0 +1,57 @@
+#!/usr/bin/env bash
+#
+# 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.
+
+set -eux
+
+target=$1
+
+packages=()
+case "${target}" in
+ cpp|c_glib|ruby)
+ packages+=(ccache)
+ packages+=(${MINGW_PACKAGE_PREFIX}-boost)
+ packages+=(${MINGW_PACKAGE_PREFIX}-brotli)
+ packages+=(${MINGW_PACKAGE_PREFIX}-cmake)
+ packages+=(${MINGW_PACKAGE_PREFIX}-gcc)
+ packages+=(${MINGW_PACKAGE_PREFIX}-gflags)
+ packages+=(${MINGW_PACKAGE_PREFIX}-grpc)
+ packages+=(${MINGW_PACKAGE_PREFIX}-gtest)
+ packages+=(${MINGW_PACKAGE_PREFIX}-lz4)
+ packages+=(${MINGW_PACKAGE_PREFIX}-protobuf)
+ packages+=(${MINGW_PACKAGE_PREFIX}-python3-numpy)
+ packages+=(${MINGW_PACKAGE_PREFIX}-rapidjson)
+ packages+=(${MINGW_PACKAGE_PREFIX}-snappy)
+ packages+=(${MINGW_PACKAGE_PREFIX}-thrift)
+ packages+=(${MINGW_PACKAGE_PREFIX}-zlib)
+ packages+=(${MINGW_PACKAGE_PREFIX}-zstd)
+ ;;
+esac
+
+case "${target}" in
+ c_glib|ruby)
+ packages+=(${MINGW_PACKAGE_PREFIX}-gobject-introspection)
+ packages+=(${MINGW_PACKAGE_PREFIX}-gtk-doc)
+ packages+=(${MINGW_PACKAGE_PREFIX}-meson)
+ ;;
+esac
+
+pacman \
+ --noconfirm \
+ --sync \
+ "${packages[@]}"
diff --git a/ci/scripts/msys2_system_upgrade.sh b/ci/scripts/msys2_system_upgrade.sh
new file mode 100755
index 0000000000..2d7b1538b5
--- /dev/null
+++ b/ci/scripts/msys2_system_upgrade.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+#
+# 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.
+
+set -eux
+
+pacman \
+ --noconfirm \
+ --sync \
+ -uu \
+ -yy
diff --git a/ci/scripts/ruby_test.sh b/ci/scripts/ruby_test.sh
index 28d7de9e88..fe7910a022 100755
--- a/ci/scripts/ruby_test.sh
+++ b/ci/scripts/ruby_test.sh
@@ -20,25 +20,10 @@
set -ex
source_dir=${1}/ruby
+build_dir=${2}/ruby
export LD_LIBRARY_PATH=${ARROW_HOME}/lib:${LD_LIBRARY_PATH}
export PKG_CONFIG_PATH=${ARROW_HOME}/lib/pkgconfig
export GI_TYPELIB_PATH=${ARROW_HOME}/lib/girepository-1.0
-# TODO(kszucs): this should be moved into the dockerfile
-bundle install --gemfile ${source_dir}/red-arrow/Gemfile
-
-${source_dir}/red-arrow/test/run-test.rb
-
-if [ ${ARROW_GANDIVA:-OFF} == "ON" ]; then
- ${source_dir}/red-gandiva/test/run-test.rb
-fi
-if [ ${ARROW_PARQUET:-OFF} == "ON" ]; then
- ${source_dir}/red-parquet/test/run-test.rb
-fi
-if [ ${ARROW_PLASMA:-OFF} == "ON" ]; then
- ${source_dir}/red-plasma/test/run-test.rb
-fi
-if [ ${ARROW_CUDA:-OFF} == "ON" ]; then
- ${source_dir}/red-arrow-cuda/test/run-test.rb
-fi
+rake -f ${source_dir}/Rakefile BUILD_DIR=${build_dir}
diff --git a/docker-compose.yml b/docker-compose.yml
index 7be07cf6bd..8e33a61b0c 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -341,7 +341,6 @@ services:
environment:
<<: *ccache
ARROW_GLIB_GTK_DOC: "true"
- shm_size: *shm-size
volumes: *ubuntu-volumes
command: *c-glib-command
@@ -369,6 +368,7 @@ services:
args:
base: ${REPO}:${ARCH}-debian-${DEBIAN}-c-glib
shm_size: *shm-size
+ ulimits: *ulimits
environment:
<<: *ccache
volumes: *debian-volumes
@@ -377,7 +377,7 @@ services:
/arrow/ci/scripts/cpp_build.sh /arrow /build &&
/arrow/ci/scripts/c_glib_build.sh /arrow /build &&
/arrow/ci/scripts/c_glib_test.sh /arrow /build &&
- /arrow/ci/scripts/ruby_test.sh /arrow"
+ /arrow/ci/scripts/ruby_test.sh /arrow /build"
ubuntu-ruby:
# Usage:
@@ -397,6 +397,7 @@ services:
args:
base: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-c-glib
shm_size: *shm-size
+ ulimits: *ulimits
environment:
<<: *ccache
volumes: *ubuntu-volumes