From 2773f0cb06c4d98cd5862922e15bf1a4d904d035 Mon Sep 17 00:00:00 2001 From: Liang-Chi Hsieh Date: Sat, 10 Feb 2024 11:53:14 -0800 Subject: [PATCH] Add test pipeline for Mac aarch64 --- .../setup-macos-aarch64-builder/action.yaml | 47 +++++++++++++++++++ .github/workflows/rust.yml | 16 +++++++ 2 files changed, 63 insertions(+) create mode 100644 .github/actions/setup-macos-aarch64-builder/action.yaml 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 000000000000..c4e14906ed10 --- /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 c94137ebd1f9..adcfcc27d383 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 ]