kou commented on code in PR #47811:
URL: https://github.com/apache/arrow/pull/47811#discussion_r2438007650
##########
.github/workflows/cpp_extra.yml:
##########
@@ -313,6 +313,113 @@ jobs:
cd cpp/examples/minimal_build
../minimal_build.build/arrow-example
+ # This job should be kept up-to-date with the equivalent job in cpp.yml
+ windows:
+ needs: check-labels
+ name: ${{ matrix.title }}
+ runs-on: ${{ matrix.os }}
+ if: >-
+ needs.check-labels.outputs.force == 'true' ||
+ contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'),
'CI: Extra') ||
+ contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'),
'CI: Extra: C++')
+ timeout-minutes: 60
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - arch: arm64
+ os: windows-11-arm
+ simd-level: NONE # Currently set to NONE because xsimd does not
support MSVC ARM64 yet
+ title: ARM64 Windows 11 C++
Review Comment:
Can we use these values directly because we have only one pattern here?
##########
ci/scripts/install_cmake.sh:
##########
@@ -59,22 +68,20 @@ esac
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"
- ;;
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}"
+ cp -a "${base_name}"/* "${prefix}"
rm -rf "${base_name}" "${archive_name}"
;;
*)
url+="${arch}.tar.gz"
curl -L "${url}" | tar -xzf - --directory "${prefix}" --strip-components=1
+ ;;&
+ macos)
+ ln -s CMake.app/Contents/bin "${prefix}/bin"
Review Comment:
How about simplify this?
```suggestion
if [ "${platform}" = "macos" ]; then
ln -s CMake.app/Contents/bin "${prefix}/bin"
fi
```
##########
.github/workflows/cpp_extra.yml:
##########
@@ -313,6 +313,113 @@ jobs:
cd cpp/examples/minimal_build
../minimal_build.build/arrow-example
+ # This job should be kept up-to-date with the equivalent job in cpp.yml
+ windows:
+ needs: check-labels
+ name: ${{ matrix.title }}
+ runs-on: ${{ matrix.os }}
+ if: >-
+ needs.check-labels.outputs.force == 'true' ||
+ contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'),
'CI: Extra') ||
+ contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'),
'CI: Extra: C++')
+ timeout-minutes: 60
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - arch: arm64
+ os: windows-11-arm
+ simd-level: NONE # Currently set to NONE because xsimd does not
support MSVC ARM64 yet
+ title: ARM64 Windows 11 C++
+ env:
+ ARROW_BOOST_USE_SHARED: OFF
+ ARROW_BUILD_BENCHMARKS: ON
+ ARROW_BUILD_SHARED: ON
+ ARROW_BUILD_STATIC: OFF
+ ARROW_BUILD_TESTS: ON
+ ARROW_DATASET: ON
+ ARROW_FLIGHT: OFF
+ ARROW_HDFS: ON
+ ARROW_HOME: /usr
+ ARROW_JEMALLOC: OFF
+ ARROW_MIMALLOC: ON
+ ARROW_ORC: ON
+ ARROW_PARQUET: ON
+ ARROW_SIMD_LEVEL: ${{ matrix.simd-level }}
+ ARROW_SUBSTRAIT: ON
+ ARROW_USE_GLOG: OFF
+ ARROW_VERBOSE_THIRDPARTY_BUILD: OFF
+ ARROW_WITH_BROTLI: OFF
+ ARROW_WITH_BZ2: OFF
+ ARROW_WITH_LZ4: OFF
+ ARROW_WITH_OPENTELEMETRY: OFF
+ ARROW_WITH_SNAPPY: ON
+ ARROW_WITH_ZLIB: ON
+ ARROW_WITH_ZSTD: ON
+ BOOST_SOURCE: BUNDLED
+ CMAKE_CXX_STANDARD: "17"
+ CMAKE_GENERATOR: Ninja
+ CMAKE_INSTALL_PREFIX: /usr
+ 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@v5
+ with:
+ fetch-depth: 0
+ submodules: recursive
+ - name: Download Timezone Database
+ shell: bash
+ run: ci/scripts/download_tz_database.sh
+ - name: Install msys2 (for tzdata for ORC tests)
+ uses: msys2/setup-msys2@v2
+ id: setup-msys2
+ - name: Install cmake
+ shell: bash
+ run: |
+ ci/scripts/install_cmake.sh 4.1.2 /usr
+ - name: Install ccache
+ shell: bash
+ run: |
+ ci/scripts/install_ccache.sh 4.12.1 /usr
+ - name: Setup ccache
+ shell: bash
+ run: |
+ ci/scripts/ccache_setup.sh
+ - name: ccache info
+ id: ccache-info
+ shell: bash
+ run: |
+ echo "cache-dir=$(ccache --get-config cache_dir)" >> $GITHUB_OUTPUT
+ - name: Cache ccache
+ uses: actions/cache@v4
+ with:
+ path: ${{ steps.ccache-info.outputs.cache-dir }}
+ key: cpp-ccache-windows-${{ env.CACHE_VERSION }}-${{
hashFiles('cpp/**') }}
+ restore-keys: cpp-ccache-windows-${{ env.CACHE_VERSION }}-
+ env:
+ # We can invalidate the current cache by updating this.
+ CACHE_VERSION: "2022-09-13"
Review Comment:
```suggestion
key: cpp-ccache-windows-arm-${{ hashFiles('cpp/**') }}
restore-keys: cpp-ccache-windows-arm-
```
##########
cpp/cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -1118,6 +1118,11 @@ function(build_boost)
# This is for https://github.com/boostorg/container/issues/305
string(APPEND CMAKE_C_FLAGS " -Wno-strict-prototypes")
endif()
+ if(MSVC AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ARM64")
+ set(BOOST_CONTEXT_IMPLEMENTATION
+ winfib
+ CACHE STRING "" FORCE)
Review Comment:
Hmm. Could you try `CMP0126`
https://cmake.org/cmake/help/latest/policy/CMP0126.html and normal (not cache)
variable?
```diff
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index e805694f52..ca6b9e8746 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -71,6 +71,12 @@ cmake_policy(SET CMP0090 NEW)
# MSVC runtime library flags are selected by an abstraction.
cmake_policy(SET CMP0091 NEW)
+# https://cmake.org/cmake/help/latest/policy/CMP0126.html
+#
+# The set(CACHE) command does not remove any normal variable of the
+# same name from the current scope.
+cmake_policy(SET CMP0126 NEW)
+
# https://cmake.org/cmake/help/latest/policy/CMP0135.html
#
# CMP0135 is for solving re-building and re-downloading.
```
##########
.github/workflows/cpp.yml:
##########
Review Comment:
Can we revert changes for this file?
--
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]