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
9 changes: 9 additions & 0 deletions cpp/src/arrow/sparse_tensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,18 @@ std::string SparseCSFIndex::ToString() const { return std::string("SparseCSFInde

bool SparseCSFIndex::Equals(const SparseCSFIndex& other) const {
auto eq = [](const auto& a, const auto& b) { return a->Equals(*b); };
// TODO: remove the use of std::equal when we no longer have partial C++20 support with CRAN.
#if defined(__cpp_lib_ranges) && __cpp_lib_ranges >= 201911L
return axis_order() == other.axis_order() &&
std::ranges::equal(indices(), other.indices(), eq) &&
std::ranges::equal(indptr(), other.indptr(), eq);
#else
return axis_order() == other.axis_order() &&
std::equal(indices().begin(), indices().end(), other.indices().begin(),
other.indices().end(), eq) &&
std::equal(indptr().begin(), indptr().end(), other.indptr().begin(),
other.indptr().end(), eq);
#endif
}

// ----------------------------------------------------------------------
Expand Down
24 changes: 22 additions & 2 deletions dev/tasks/r/github.macos.cran.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@

jobs:
macos-cran:
name: "macOS similar to CRAN"
name: "macOS {{ '${{ matrix.config }}' }}"
runs-on: macOS-latest
strategy:
fail-fast: false
matrix:
config: ["cran-m1", "cran-release"]

steps:
{{ macros.github_checkout_arrow()|indent }}
Expand Down Expand Up @@ -58,7 +60,25 @@ jobs:
extra-packages: |
any::rcmdcheck
any::sys
- name: Install
- name: Install MacOSX 11.3 SDK
if: matrix.config == 'cran-release'
run: |
curl -fsSL https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.3.sdk.tar.xz -o /tmp/MacOSX11.3.sdk.tar.xz
sudo tar -xf /tmp/MacOSX11.3.sdk.tar.xz -C /Library/Developer/CommandLineTools/SDKs/
echo "Installed MacOSX11.3.sdk to /Library/Developer/CommandLineTools/SDKs/"
ls -la /Library/Developer/CommandLineTools/SDKs/
- name: Install (cran-release)
if: matrix.config == 'cran-release'
env:
_R_CHECK_CRAN_INCOMING_: false
SDKROOT: '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk'
NOT_CRAN: false
run: |
sccache --start-server || echo 'sccache not found'
cd arrow/r
R CMD INSTALL . --install-tests
- name: Install (cran-m1)
if: matrix.config == 'cran-m1'
env:
_R_CHECK_CRAN_INCOMING_: false
CXX: "clang++ -mmacos-version-min=14.6"
Expand Down