From 13435a36cd1641876c256c45bd2dd2a3425dabcc Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sun, 10 Mar 2024 23:56:43 +0900 Subject: [PATCH] GH-40082: [CI][C++] Add a job on ARM64 macOS --- .github/workflows/cpp.yml | 22 +++++++++++++++------- ci/scripts/cpp_test.sh | 3 +++ ci/scripts/install_minio.sh | 1 + cpp/src/arrow/util/io_util_test.cc | 2 +- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml index e9409f1cd62..a48b5aafab4 100644 --- a/.github/workflows/cpp.yml +++ b/.github/workflows/cpp.yml @@ -181,10 +181,18 @@ jobs: docker-compose run --rm minimal macos: - name: AMD64 macOS 12 C++ - runs-on: macos-latest + name: ${{ matrix.architecture }} macOS ${{ matrix.macos-version }} C++ + runs-on: macos-${{ matrix.macos-version }} if: ${{ !contains(github.event.pull_request.title, 'WIP') }} timeout-minutes: 75 + strategy: + fail-fast: false + matrix: + include: + - architecture: AMD64 + macos-version: "12" + - architecture: ARM64 + macos-version: "14" env: ARROW_AZURE: ON ARROW_BUILD_TESTS: ON @@ -193,7 +201,7 @@ jobs: ARROW_GANDIVA: ON ARROW_GCS: ON ARROW_HDFS: ON - ARROW_HOME: /usr/local + ARROW_HOME: /tmp/local ARROW_JEMALLOC: ON ARROW_ORC: ON ARROW_PARQUET: ON @@ -225,11 +233,11 @@ jobs: - name: Install MinIO run: | $(brew --prefix bash)/bin/bash \ - ci/scripts/install_minio.sh latest /usr/local + ci/scripts/install_minio.sh latest ${ARROW_HOME} - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: 3.12 - name: Install Google Cloud Storage Testbench run: ci/scripts/install_gcs_testbench.sh default - name: Install Azurite Storage Emulator @@ -245,8 +253,8 @@ jobs: uses: actions/cache@v4 with: path: ${{ steps.ccache-info.outputs.cache-dir }} - key: cpp-ccache-macos-${{ hashFiles('cpp/**') }} - restore-keys: cpp-ccache-macos- + key: cpp-ccache-macos-${{ matrix.macos-version }}-${{ hashFiles('cpp/**') }} + restore-keys: cpp-ccache-macos-${{ matrix.macos-version }}- - name: Build run: | ci/scripts/cpp_build.sh $(pwd) $(pwd)/build diff --git a/ci/scripts/cpp_test.sh b/ci/scripts/cpp_test.sh index a23ea8eb1cd..f388825fd0a 100755 --- a/ci/scripts/cpp_test.sh +++ b/ci/scripts/cpp_test.sh @@ -49,6 +49,9 @@ case "$(uname)" in ;; Darwin) n_jobs=$(sysctl -n hw.ncpu) + # TODO: https://github.com/apache/arrow/issues/40410 + exclude_tests="arrow-s3fs-test" + ctest_options+=(--exclude-regex "${exclude_tests}") ;; MINGW*) n_jobs=${NUMBER_OF_PROCESSORS:-1} diff --git a/ci/scripts/install_minio.sh b/ci/scripts/install_minio.sh index e493a183b45..40762c9f32d 100755 --- a/ci/scripts/install_minio.sh +++ b/ci/scripts/install_minio.sh @@ -71,6 +71,7 @@ download() local output=$1 local url=$2 + mkdir -p $(dirname ${output}) if type wget > /dev/null 2>&1; then wget -nv --output-document ${output} ${url} else diff --git a/cpp/src/arrow/util/io_util_test.cc b/cpp/src/arrow/util/io_util_test.cc index 2599c92d821..d0569c79956 100644 --- a/cpp/src/arrow/util/io_util_test.cc +++ b/cpp/src/arrow/util/io_util_test.cc @@ -1065,7 +1065,7 @@ TEST(CpuInfo, Basic) { const auto l2 = ci->CacheSize(CpuInfo::CacheLevel::L2); const auto l3 = ci->CacheSize(CpuInfo::CacheLevel::L3); ASSERT_TRUE(l1 >= 4 * 1024 && l1 <= 512 * 1024) << "unexpected L1 size: " << l1; - ASSERT_TRUE(l2 >= 32 * 1024 && l2 <= 8 * 1024 * 1024) << "unexpected L2 size: " << l2; + ASSERT_TRUE(l2 >= 32 * 1024 && l2 <= 12 * 1024 * 1024) << "unexpected L2 size: " << l2; ASSERT_TRUE(l3 >= 256 * 1024 && l3 <= 1024 * 1024 * 1024) << "unexpected L3 size: " << l3; ASSERT_LE(l1, l2) << "L1 cache size " << l1 << " larger than L2 " << l2;