Skip to content

Crossbow

Crossbow #284916

Workflow file for this run

# 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.
# NOTE: must set "Crossbow" as name to have the badge links working in the
# github comment reports!
name: Crossbow
on:
push:
branches:
- "*-github-*"
env:
ARCHERY_DEBUG: 1
jobs:
homebrew:
name: "Homebrew"
runs-on: macos-latest
steps:
- name: Checkout Arrow
uses: actions/checkout@v4
with:
fetch-depth: 1
path: arrow
repository: apache/arrow
ref: 95b7181307fe133e8c84a0c0be2856ee15348b8e
submodules: recursive
- name: Configure Homebrew formula for testing
env:
ARROW_FORMULA: ./arrow/dev/tasks/homebrew-formulae/apache-arrow.rb
run: |
brew update || echo "brew update did not finish successfully"
brew --version
brew unlink python@2 || true
brew config
brew doctor || true
# The GHA runners install of python > 3.10 is incompatible with brew so we
# have to force overwriting of the symlinks
# see https://github.com/actions/runner-images/issues/6868
brew install --overwrite python@3.12 python@3.11 python@3.10
set -x
ARROW_GLIB_FORMULA=$(echo ${ARROW_FORMULA} | sed -e 's/\.rb/-glib.rb/')
echo "ARROW_GLIB_FORMULA=${ARROW_GLIB_FORMULA}" >> ${GITHUB_ENV}
for formula in ${ARROW_FORMULA} ${ARROW_GLIB_FORMULA}; do
if [ ! -f ${formula} ]; then
continue
fi
# Pin the current commit in the formula to test so that
# we're not always pulling from the tip of the default branch
sed -i '' -E \
-e 's@https://github.com/apache/arrow.git", branch: "main"$@https://github.com/apache/arrow.git", revision: "95b7181307fe133e8c84a0c0be2856ee15348b8e"@' \
${formula}
# Sometimes crossbow gives a remote URL with .git and sometimes not.
# Make sure there's only one
sed -i '' -E -e 's@.git.git@.git@' ${formula}
cat ${formula}
cp ${formula} $(brew --repository homebrew/core)/Formula/
done
- name: Test formula
run: |
brew install -v --HEAD apache-arrow
brew test apache-arrow
brew audit --strict apache-arrow
if [ -f ${ARROW_GLIB_FORMULA} ]; then
brew install -v --HEAD apache-arrow-glib
brew test apache-arrow-glib
brew audit --strict apache-arrow-glib
fi