Skip to content

Crossbow Cache

Crossbow Cache #4

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.
name: Crossbow Cache
on:
workflow_dispatch:
inputs:
vcpkg-version:
description: 'VCPKG Version to use in building the cache.'
required: true
default: ''
arrow-repo:
description: 'Repository to checkout arrow from.'
required: true
default: 'apache/arrow'
arrow-ref:
description: 'Ref to checkout from arrow-repo.'
required: true
default: 'main'
# perhaps daily one for keeping the cache warm
push:
paths:
- '.github/workflows/cache_vcpkg.yml'
schedule:
- cron: |
0 12 * * *
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}/arrow/ci/vcpkg
VCPKG_DEFAULT_TRIPLET: amd64-osx-static-release
VCPKG_FEATURE_FLAGS: "manifests"
jobs:
vcpkg:
name: Cache Vcpkg Packages
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
macos_version:
- "10.9"
- "10.13"
env:
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos_version }}
steps:
- name: Checkout Arrow
uses: actions/checkout@v3
with:
repository: ${{ github.event.inputs.arrow-repo || 'apache/arrow'}}
path: arrow
ref: ${{ github.event.inputs.arrow-ref || 'main'}}
- name: Retrieve VCPKG version from arrow/.env
shell: bash
run: |
if [ -z "${{ github.event.inputs.vcpkg-version }}" ]; then
vcpkg_version=$(cat "arrow/.env" | grep "VCPKG" | cut -d "=" -f2 | tr -d '"')
else
vcpkg_version="${{ github.event.inputs.vcpkg-version }}"
fi
echo "VCPKG_VERSION=$vcpkg_version" >> $GITHUB_ENV
- name: Install System Dependencies
run: brew install bison coreutils ninja cmake
- uses: actions/cache@v2
id: vcpkg-cache
with:
path: vcpkg
key: vcpkg-${{ matrix.macos_version }}-${{ env.VCPKG_VERSION }}-${{ hashFiles('arrow/ci/vcpkg/vcpkg.json', 'arrow/ci/vcpkg/*.patch', 'arrow/ci/vcpkg/*osx*.cmake') }}-1
- name: Install Vcpkg
shell: bash
run: |
[ -d "vcpkg" ] || arrow/ci/scripts/install_vcpkg.sh $VCPKG_ROOT $VCPKG_VERSION
- name: Add Vcpkg to PATH
shell: bash
run: echo ${VCPKG_ROOT} >> $GITHUB_PATH
# workaround for https://github.com/apache/arrow/pull/11569#issuecomment-979592053
- name: Install OpenSSL
run: vcpkg install openssl
- name: Install Packages
run: |
vcpkg install \
--x-manifest-root=arrow/ci/vcpkg/ \
--x-install-root=$VCPKG_ROOT/installed \
--x-no-default-features \
--x-feature=flight \
--x-feature=gcs \
--x-feature=parquet \
--x-feature=json