Skip to content
Draft
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
33 changes: 11 additions & 22 deletions .github/workflows/r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ on:
- "ci/scripts/cpp_*.sh"
- "ci/scripts/install_minio.sh"
- "ci/scripts/r_*.sh"
- "ci/scripts/r_windows_bcrypt_compat.h"
- "cpp/**"
- "compose.yaml"
- "r/**"
Expand All @@ -46,6 +47,7 @@ on:
- "ci/scripts/cpp_*.sh"
- "ci/scripts/install_minio.sh"
- "ci/scripts/r_*.sh"
- "ci/scripts/r_windows_bcrypt_compat.h"
- "cpp/**"
- "compose.yaml"
- "r/**"
Expand Down Expand Up @@ -205,38 +207,24 @@ jobs:
fail-fast: false
matrix:
config:
- { rtools: 40, arch: 'ucrt64' }
- { rtools: 45, arch: 'ucrt64' }
steps:
- run: git config --global core.autocrlf false
- name: Checkout Arrow
uses: actions/checkout@v7
with:
persist-credentials: false
fetch-depth: 0
- name: Setup ccache
shell: bash
run: |
ci/scripts/ccache_setup.sh
echo "CCACHE_DIR=$(cygpath --absolute --windows ccache)" >> $GITHUB_ENV
- name: Cache ccache
uses: actions/cache@v6
with:
path: ccache
key: r-${{ matrix.config.rtools }}-ccache-mingw-${{ matrix.config.arch }}-${{ hashFiles('cpp/src/**/*.cc','cpp/src/**/*.h)') }}-${{ github.run_id }}
restore-keys: |
r-${{ matrix.config.rtools }}-ccache-mingw-${{ matrix.config.arch }}-${{ hashFiles('cpp/src/**/*.cc','cpp/src/**/*.h)') }}-
r-${{ matrix.config.rtools }}-ccache-mingw-${{ matrix.config.arch }}-
- uses: r-lib/actions/setup-r@v2
with:
# Note: we need Rtools40 here because Rtools40 + ucrt is how we build the Arrow C++
# static library. R itself is not used, but setup-r picks the Rtools version from
# r-version, and R 4.1 was the last R to use Rtools40, so this must stay at 4.1.
r-version: "4.1"
# R itself is not used here, but setup-r picks the Rtools version
# from r-version. R 4.5 gets Rtools45, which is what builds the
# Arrow C++ static library, so this must stay at 4.5.
r-version: "4.5"
Ncpus: 2
- name: Build Arrow C++
shell: bash
env:
MINGW_ARCH: ${{ matrix.config.arch }}
RTOOLS_VERSION: ${{ matrix.config.rtools }}
run: ci/scripts/r_windows_build.sh
- name: Rename libarrow.zip
Expand Down Expand Up @@ -283,14 +271,15 @@ jobs:
- name: Download Timezone Database
shell: bash
run: |
# RTools 40 uses GCC 8.x which does not support C++20 chrono timezones,
# so Arrow uses the vendored date library which requires tzdata
# The R libarrow is built with ARROW_USE_STD_CHRONO=0 (see
# ci/scripts/r_windows_build.sh), so Arrow uses the vendored date
# library, which requires tzdata
ci/scripts/download_tz_database.sh
- run: mkdir r/windows
- name: Download artifacts
uses: actions/download-artifact@v8
with:
name: libarrow-rtools40-ucrt64.zip
name: libarrow-rtools45-ucrt64.zip
path: r/windows
- name: Unzip and rezip libarrows
shell: bash
Expand Down
36 changes: 36 additions & 0 deletions ci/scripts/r_windows_bcrypt_compat.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// 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.

// BCrypt algorithm pseudo-handles (available since Windows 10 1703). The
// mingw-w64 headers shipped with Rtools45 (mingw-w64 11.0) don't define them,
// but the bundled google-cloud-cpp uses them in google/cloud/internal/win32/.
// This file is force-included into every translation unit via CXXFLAGS by
// ci/scripts/r_windows_build.sh, so it deliberately includes nothing itself:
// BCRYPT_ALG_HANDLE is resolved at the point of use. Values match mingw-w64
// master include/bcrypt.h.
#ifndef BCRYPT_MD5_ALG_HANDLE
#define BCRYPT_MD5_ALG_HANDLE ((BCRYPT_ALG_HANDLE)0x00000021)
#endif
#ifndef BCRYPT_SHA256_ALG_HANDLE
#define BCRYPT_SHA256_ALG_HANDLE ((BCRYPT_ALG_HANDLE)0x00000041)
#endif
#ifndef BCRYPT_HMAC_SHA256_ALG_HANDLE
#define BCRYPT_HMAC_SHA256_ALG_HANDLE ((BCRYPT_ALG_HANDLE)0x000000b1)
#endif
#ifndef BCRYPT_RSA_ALG_HANDLE
#define BCRYPT_RSA_ALG_HANDLE ((BCRYPT_ALG_HANDLE)0x000000e1)
#endif
Loading
Loading