Skip to content

Apache DataFusion SQL Query Engine

Add test pipeline for Mac aarch64 (#9191)

Liang-Chi Hsiehd7dcb121a55c
diff --git a/.github/actions/setup-macos-aarch64-builder/action.yaml b/.github/actions/setup-macos-aarch64-builder/action.yaml
new file mode 100644
index 0000000000..c4e14906ed
--- /dev/null
+++ b/.github/actions/setup-macos-aarch64-builder/action.yaml
@@ -0,0 +1,47 @@
+# 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.
+
+name: Prepare Rust Builder for MacOS
+description: 'Prepare Rust Build Environment for MacOS'
+inputs:
+ rust-version:
+ description: 'version of rust to install (e.g. stable)'
+ required: true
+ default: 'stable'
+runs:
+ using: "composite"
+ steps:
+ - name: Install protobuf compiler
+ shell: bash
+ run: |
+ mkdir -p $HOME/d/protoc
+ cd $HOME/d/protoc
+ export PROTO_ZIP="protoc-21.4-osx-aarch_64.zip"
+ curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v21.4/$PROTO_ZIP
+ unzip $PROTO_ZIP
+ echo "$HOME/d/protoc/bin" >> $GITHUB_PATH
+ export PATH=$PATH:$HOME/d/protoc/bin
+ protoc --version
+ - name: Setup Rust toolchain
+ shell: bash
+ run: |
+ rustup update stable
+ rustup toolchain install stable
+ rustup default stable
+ rustup component add rustfmt
+ - name: Configure rust runtime env
+ uses: ./.github/actions/setup-rust-runtime
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index c94137ebd1..adcfcc27d3 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -308,6 +308,22 @@ jobs:
cd datafusion-cli
cargo test --lib --tests --bins --all-features
+ macos-aarch64:
+ name: cargo test (macos-aarch64)
+ runs-on: macos-14
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: true
+ - name: Setup Rust toolchain
+ uses: ./.github/actions/setup-macos-builder
+ - name: Run tests (excluding doctests)
+ shell: bash
+ run: |
+ cargo test --lib --tests --bins --features avro,json,backtrace
+ cd datafusion-cli
+ cargo test --lib --tests --bins --all-features
+
test-datafusion-pyarrow:
name: cargo test pyarrow (amd64)
needs: [ linux-build-lib ]