Skip to content

Crossbow

Crossbow #189276

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-*"
jobs:
source:
# This job will change the version to either the custom_version param or YMD format.
# The output allows other steps to use the exact version to prevent issues (e.g. date changes during run)
name: Source Package
runs-on: ubuntu-latest
outputs:
pkg_version: ${{ steps.save-version.outputs.pkg_version }}
steps:
- name: Checkout Arrow
uses: actions/checkout@v4
with:
fetch-depth: 1
path: arrow
repository: paleolimbot/arrow
ref: 735e0591a7210eef364a28112c506a877c664545
submodules: recursive
- name: Modify version
shell: bash
run: |
cd arrow/r
sed -i.bak -E -e \
's/(^Version: )([0-9]+\.[0-9]+\.[0-9]+).*$/\114.0.0.100000070/' \
DESCRIPTION
head DESCRIPTION
rm -f DESCRIPTION.bak
- name: Save Version
id: save-version
shell: bash
run: |
echo "pkg_version=$(grep ^Version arrow/r/DESCRIPTION | sed s/Version:\ //)" >> $GITHUB_OUTPUT
- uses: r-lib/actions/setup-r@v2
with:
install-r: false
- name: Build R source package
shell: bash
run: |
cd arrow/r
# Copy in the Arrow C++ source
make sync-cpp
R CMD build --no-build-vignettes .
- name: Upload package artifact
uses: actions/upload-artifact@v3
with:
name: r-pkg__src__contrib
path: arrow/r/arrow_*.tar.gz
macos-cpp:
name: C++ Binary macOS OpenSSL ${{ matrix.openssl }} ${{ matrix.platform.arch }}
runs-on: ${{ matrix.platform.runs_on }}
needs: source
strategy:
fail-fast: false
matrix:
platform:
- { runs_on: ["self-hosted", "macos-10.13"], arch: "x86_64" }
- { runs_on: ["self-hosted", "macOS", "arm64", "devops-managed"], arch: "arm64" }
openssl: ['3.0', '1.1']
steps:
- name: Checkout Arrow
uses: actions/checkout@v3
with:
fetch-depth: 1
path: arrow
repository: paleolimbot/arrow
ref: 735e0591a7210eef364a28112c506a877c664545
submodules: recursive
- name: Modify version
shell: bash
run: |
cd arrow/r
sed -i.bak -E -e \
's/(^Version: )([0-9]+\.[0-9]+\.[0-9]+).*$/\1${{ needs.source.outputs.pkg_version }}/' \
DESCRIPTION
head DESCRIPTION
rm -f DESCRIPTION.bak
- name: Install Deps
if: ${{ !contains(matrix.platform.runs_on, 'macos-10.13') }}
run: |
brew install sccache ninja
brew install openssl@${{ matrix.openssl }}
- name: Build libarrow
shell: bash
env:
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
SCCACHE_BUCKET: "${{ secrets.SCCACHE_BUCKET }}"
SCCACHE_REGION: "${{ secrets.SCCACHE_REGION }}"
SCCACHE_S3_KEY_PREFIX: "sccache"
MACOSX_DEPLOYMENT_TARGET: "10.13"
ARROW_S3: ON
ARROW_GCS: ON
ARROW_DEPENDENCY_SOURCE: BUNDLED
CMAKE_GENERATOR: Ninja
LIBARROW_MINIMAL: false
run: |
sccache --start-server
export EXTRA_CMAKE_FLAGS="-DOPENSSL_ROOT_DIR=$(brew --prefix openssl@${{ matrix.openssl }})"
cd arrow
r/inst/build_arrow_static.sh
- name: Bundle libarrow
shell: bash
env:
PKG_FILE: arrow-${{ needs.source.outputs.pkg_version }}.zip
VERSION: ${{ needs.source.outputs.pkg_version }}
run: |
cd arrow/r/libarrow/dist
zip -r $PKG_FILE lib/ include/
- name: Create Checksum
shell: bash
run: |
cd arrow/r/libarrow/dist
shasum -a 512 arrow-*.zip > arrow-${{ needs.source.outputs.pkg_version }}.zip.sha512
- name: Upload binary artifact
uses: actions/upload-artifact@v3
with:
name: r-lib__libarrow__bin__darwin-${{ matrix.platform.arch }}-openssl-${{ matrix.openssl }}
path: arrow/r/libarrow/dist/arrow-*.zip*
linux-cpp:
name: C++ Binary Linux OpenSSL ${{ matrix.openssl }}
runs-on: ubuntu-latest
needs: source
strategy:
fail-fast: false
matrix:
include:
- openssl: "3.0"
os: ubuntu
ubuntu: "22.04"
- extra-cmake-flags: >-
-DCMAKE_INCLUDE_PATH=/usr/include/openssl11
-DCMAKE_LIBRARY_PATH=/usr/lib64/openssl11
openssl: "1.1"
os: centos
- openssl: "1.0"
os: centos
steps:
- name: Checkout Arrow
uses: actions/checkout@v4
with:
fetch-depth: 1
path: arrow
repository: paleolimbot/arrow
ref: 735e0591a7210eef364a28112c506a877c664545
submodules: recursive
- name: Modify version
shell: bash
run: |
cd arrow/r
sed -i.bak -E -e \
's/(^Version: )([0-9]+\.[0-9]+\.[0-9]+).*$/\1${{ needs.source.outputs.pkg_version }}/' \
DESCRIPTION
head DESCRIPTION
rm -f DESCRIPTION.bak
- name: Set up Python by actions/setup-python
if: runner.arch == 'X64'
uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: 3.8
- name: Set up Python by apt
if: runner.os == 'Linux' && runner.arch != 'X64'
run: |
sudo apt update
sudo apt-get install -y python3-pip
pip install -U pip
echo "$HOME/.local/bin" >>"$GITHUB_PATH"
- name: Install Archery
shell: bash
run: pip install -e arrow/dev/archery[all]
- name: Build libarrow
shell: bash
env:
UBUNTU: "${{ matrix.ubuntu }}"
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
SCCACHE_BUCKET: "${{ secrets.SCCACHE_BUCKET }}"
SCCACHE_REGION: "${{ secrets.SCCACHE_REGION }}"
SCCACHE_S3_KEY_PREFIX: "sccache"
run: |
sudo sysctl -w kernel.core_pattern="core.%e.%p"
ulimit -c unlimited
archery docker run \
-e EXTRA_CMAKE_FLAGS="${{ matrix.extra-cmake-flags }}" \
${{ matrix.os }}-cpp-static
- name: Bundle libarrow
shell: bash
env:
PKG_FILE: arrow-${{ needs.source.outputs.pkg_version }}.zip
VERSION: ${{ needs.source.outputs.pkg_version }}
run: |
# These files were created by the docker user so we have to chown them
sudo chown -R $USER:$USER arrow/r/libarrow
cd arrow/r/libarrow/dist
zip -r $PKG_FILE lib/ include/
- name: Create Checksum
shell: bash
run: |
cd arrow/r/libarrow/dist
shasum -a 512 arrow-*.zip > arrow-${{ needs.source.outputs.pkg_version }}.zip.sha512
- name: Upload binary artifact
uses: actions/upload-artifact@v3
with:
name: r-lib__libarrow__bin__linux-openssl-${{ matrix.openssl }}
path: arrow/r/libarrow/dist/arrow-*.zip*
windows-cpp:
name: C++ Binary Windows RTools (40 only)
needs: source
runs-on: windows-latest
steps:
- run: git config --global core.autocrlf false
- name: Checkout Arrow
uses: actions/checkout@v4
with:
fetch-depth: 1
path: arrow
repository: paleolimbot/arrow
ref: 735e0591a7210eef364a28112c506a877c664545
submodules: recursive
- name: Modify version
shell: bash
run: |
cd arrow/r
sed -i.bak -E -e \
's/(^Version: )([0-9]+\.[0-9]+\.[0-9]+).*$/\1${{ needs.source.outputs.pkg_version }}/' \
DESCRIPTION
head DESCRIPTION
rm -f DESCRIPTION.bak
- uses: r-lib/actions/setup-r@v2
with:
rtools-version: 40
r-version: "4.0"
Ncpus: 2
- name: Install sccache
shell: bash
run: arrow/ci/scripts/install_sccache.sh pc-windows-msvc $(pwd)/sccache
- name: Build Arrow C++ with rtools40
shell: bash
env:
ARROW_HOME: "arrow"
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
SCCACHE_BUCKET: "${{ secrets.SCCACHE_BUCKET }}"
SCCACHE_REGION: "${{ secrets.SCCACHE_REGION }}"
SCCACHE_S3_KEY_PREFIX: "sccache"
run: arrow/ci/scripts/r_windows_build.sh
- name: Create Checksum
shell: bash
run: |
cd build
sha512sum arrow-*.zip > arrow-${{ needs.source.outputs.pkg_version }}.zip.sha512
- name: Upload binary artifact
uses: actions/upload-artifact@v3
with:
name: r-lib__libarrow__bin__windows
path: build/arrow-*.zip*
r-packages:
needs: [source, windows-cpp, macos-cpp]
name: ${{ matrix.platform.name }} ${{ matrix.r_version.r }}
runs-on: ${{ matrix.platform.runs_on }}
strategy:
fail-fast: false
matrix:
platform:
- { runs_on: 'windows-latest', name: "Windows"}
- { runs_on: ["self-hosted", "macos-10.13"], name: "macOS High Sierra"}
- { runs_on: ["self-hosted", "macOS", "arm64", "devops-managed"], name: "macOS Big Sur" }
r_version:
- { rtools: "42", r: "4.2" }
- { rtools: "40", r: "4.1" }
steps:
- uses: r-lib/actions/setup-r@v2
# expression marker prevents the ! being parsed as yaml tag
if: ${{ !contains(matrix.platform.runs_on, 'self-hosted') }}
with:
r-version: ${{ matrix.r_version.r }}
rtools-version: ${{ matrix.r_version.rtools }}
- name: Setup R Self-Hosted
if: contains(matrix.platform.runs_on, 'self-hosted')
run: |
if [ "${{ contains(matrix.platform.runs_on, 'arm64') }}" == "true" ]; then
rig_arch="-arm64"
fi
# rig is a system utility that allows for switching
# between pre-installed R version on the self-hosted runners
rig default ${{ matrix.r_version.r }}$rig_arch
rig system setup-user-lib
rig system add-pak
# TODO: improve arg handling
- name: Setup local repo
shell: bash
run: mkdir repo
- name: Get windows binary
uses: actions/download-artifact@v3
with:
name: r-lib__libarrow__bin__windows
path: repo/libarrow/bin/windows
- name: Get macOS x86_64 OpenSSL 1.1 binary
uses: actions/download-artifact@v3
with:
name: r-lib__libarrow__bin__darwin-x86_64-openssl-1.1
path: repo/libarrow/bin/darwin-x86_64-openssl-1.1
- name: Get macOS arm64 OpenSSL 1.1 binary
uses: actions/download-artifact@v3
with:
name: r-lib__libarrow__bin__darwin-arm64-openssl-1.1
path: repo/libarrow/bin/darwin-arm64-openssl-1.1
- name: Get macOS x86_64 OpenSSL 3.0 binary
uses: actions/download-artifact@v3
with:
name: r-lib__libarrow__bin__darwin-x86_64-openssl-3.0
path: repo/libarrow/bin/darwin-x86_64-openssl-3.0
- name: Get macOS arm64 OpenSSL 3.0 binary
uses: actions/download-artifact@v3
with:
name: r-lib__libarrow__bin__darwin-arm64-openssl-3.0
path: repo/libarrow/bin/darwin-arm64-openssl-3.0
- name: Get src pkg
uses: actions/download-artifact@v3
with:
name: r-pkg__src__contrib
path: repo/src/contrib
- name: Update repo index
shell: Rscript {0}
run: |
# getwd() is necessary as this macro is used within jobs using a docker container
tools::write_PACKAGES(file.path(getwd(), "repo/src/contrib", fsep = "/"), type = "source", verbose = TRUE)
- name: Show repo
shell: bash
# tree not available in git-bash on windows
run: |
ls -R repo
- name: Add repos to .Rprofile
shell: Rscript {0}
run: |
profile_path <- file.path(getwd(), ".Rprofile")
repo <- paste0("file://", getwd(), "/repo")
str <- paste0("options(arrow.repo = '", repo, "' )")
print(str)
write(str, file = profile_path, append = TRUE)
str <- paste0("options(arrow.dev_repo = '", repo, "' )")
print(str)
write(str, file = profile_path, append = TRUE)
# Set envvar for later steps by appending to $GITHUB_ENV
write(paste0("R_PROFILE_USER=", profile_path), file = Sys.getenv("GITHUB_ENV"), append = TRUE)
- name: Prepare Dependency Installation
shell: bash
run: |
tar -xzf repo/src/contrib/arrow_*.tar.gz arrow/DESCRIPTION
- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
working-directory: 'arrow'
extra-packages: cpp11
- name: Set CRAN like openssl
if: contains(matrix.platform.runs_on, 'arm64')
run: |
# The arm64 runners contain openssl 1.1.1t in this path that is always included first so we need to override the
# default setting of the brew --prefix as root dir to avoid version conflicts.
echo "OPENSSL_ROOT_DIR=/opt/R/arm64" >> $GITHUB_ENV
- name: Build Binary
id: build
shell: Rscript {0}
env:
NOT_CRAN: "false" # actions/setup-r sets this implicitly
ARROW_R_DEV: "true"
LIBARROW_BINARY: "true" # has to be set as long as allowlist not updated
ARROW_R_ENFORCE_CHECKSUM: "true"
ARROW_R_CHECKSUM_PATH: "${{ github.workspace }}/repo/libarrow/bin"
run: |
on_windows <- tolower(Sys.info()[["sysname"]]) == "windows"
# Build
Sys.setenv(MAKEFLAGS = paste0("-j", parallel::detectCores()))
INSTALL_opts <- "--build"
if (!on_windows) {
# Windows doesn't support the --strip arg
INSTALL_opts <- c(INSTALL_opts, "--strip")
}
# always remove arrow (mainly for self-hosted runners)
try(remove.packages("arrow"), silent = TRUE)
cat("Install arrow from dev repo.\n")
install.packages(
"arrow",
type = "source",
# The sub is necessary to prevent an error on windows.
repos = sub("file://", "file:", getOption("arrow.dev_repo")),,
INSTALL_opts = INSTALL_opts
)
# Test
library(arrow)
arrow_info()
read_parquet(system.file("v0.7.1.parquet", package = "arrow"))
# encode contrib.url for artifact name
cmd <- paste0(
"path=",
gsub(
"/", "__",
contrib.url("", type = "binary")
),
"\n"
)
cat(cmd, file = Sys.getenv("GITHUB_OUTPUT"), append = TRUE)
- name: Upload binary artifact
uses: actions/upload-artifact@v3
with:
name: r-pkg${{ steps.build.outputs.path }}
path: arrow_*
test-linux-binary:
needs: [source, linux-cpp]
name: Test binary ${{ matrix.config.image }}
runs-on: ubuntu-latest
container: ${{ matrix.config.image }}
strategy:
fail-fast: false
matrix:
config:
# If libarrow_binary is unset, we're testing that we're automatically
# choosing a binary on this OS. If libarrow_binary is TRUE, we're on
# an OS that is not in the allowlist, so we have to opt-in to use the
# binary. Other env vars used in r_docker_configure.sh can be added
# here (like devtoolset) and wired up in the later steps.
- {image: "rhub/debian-clang-devel", libarrow_binary: "TRUE"}
# fedora-clang-devel cannot use binaries bc of libc++ (uncomment to see the error)
# - {image: "rhub/fedora-clang-devel", libarrow_binary: "TRUE"}
- {image: "rhub/ubuntu-gcc-release"} # currently ubuntu-20.04 (focal)
- {image: "rocker/r-ubuntu:22.04"} # openssl3
- {image: "rocker/r-ver"} # whatever is latest ubuntu LTS
- {image: "rocker/r-ver:4.0.0"} # ubuntu-20.04
- {image: "rocker/r-ver:3.6.3", libarrow_binary: "TRUE"} # debian:buster (10)
- {image: "rstudio/r-base:4.1-focal"} # ubuntu-20.04
- {image: "rstudio/r-base:4.2-centos7", devtoolset: "8"}
steps:
# Get the arrow checkout just for the docker config scripts
# Don't need submodules for this (hence false arg to macro): they fail on
# actions/checkout for some reason in this context
- name: Checkout Arrow
uses: actions/checkout@v3
with:
fetch-depth: 1
path: arrow
repository: paleolimbot/arrow
ref: 735e0591a7210eef364a28112c506a877c664545
submodules: False
- name: Install system requirements
env:
ARROW_R_DEV: "TRUE" # To install curl/openssl in r_docker_configure.sh
DEVTOOLSET_VERSION: ${{ matrix.config.devtoolset }}
shell: bash
run: |
# Make sure R is on the path for the R-hub devel versions (where RPREFIX is set in its dockerfile)
echo "${RPREFIX}/bin" >> $GITHUB_PATH
export PATH="${RPREFIX}/bin:${PATH}"
cd arrow && ARROW_SOURCE_HOME=$(pwd) ./ci/scripts/r_docker_configure.sh
# TODO: improve arg handling
- name: Setup local repo
shell: bash
run: mkdir repo
- name: Get Linux OpenSSL 1.0 binary
uses: actions/download-artifact@v3
with:
name: r-lib__libarrow__bin__linux-openssl-1.0
path: repo/libarrow/bin/linux-openssl-1.0
- name: Get Linux OpenSSL 1.1 binary
uses: actions/download-artifact@v3
with:
name: r-lib__libarrow__bin__linux-openssl-1.1
path: repo/libarrow/bin/linux-openssl-1.1
- name: Get Linux OpenSSL 3.0 binary
uses: actions/download-artifact@v3
with:
name: r-lib__libarrow__bin__linux-openssl-3.0
path: repo/libarrow/bin/linux-openssl-3.0
- name: Get src pkg
uses: actions/download-artifact@v3
with:
name: r-pkg__src__contrib
path: repo/src/contrib
- name: Update repo index
shell: Rscript {0}
run: |
# getwd() is necessary as this macro is used within jobs using a docker container
tools::write_PACKAGES(file.path(getwd(), "repo/src/contrib", fsep = "/"), type = "source", verbose = TRUE)
- name: Show repo
shell: bash
# tree not available in git-bash on windows
run: |
ls -R repo
- name: Add repos to .Rprofile
shell: Rscript {0}
run: |
profile_path <- file.path(getwd(), ".Rprofile")
repo <- paste0("file://", getwd(), "/repo")
str <- paste0("options(arrow.repo = '", repo, "' )")
print(str)
write(str, file = profile_path, append = TRUE)
str <- paste0("options(arrow.dev_repo = '", repo, "' )")
print(str)
write(str, file = profile_path, append = TRUE)
# Set envvar for later steps by appending to $GITHUB_ENV
write(paste0("R_PROFILE_USER=", profile_path), file = Sys.getenv("GITHUB_ENV"), append = TRUE)
- name: Install arrow from our repo
env:
ARROW_R_DEV: "TRUE"
LIBARROW_BUILD: "FALSE"
LIBARROW_BINARY: ${{ matrix.config.libarrow_binary }}
ARROW_R_ENFORCE_CHECKSUM: "true"
ARROW_R_CHECKSUM_PATH: "${{ github.workspace }}/repo/libarrow/bin"
shell: bash
run: |
Rscript -e '
source("https://raw.githubusercontent.com/apache/arrow/HEAD/ci/etc/rprofile")
# always remove arrow (mainly for self-hosted runners)
try(remove.packages("arrow"), silent = TRUE)
install.packages(
"arrow",
repos = c(getOption("arrow.dev_repo"), getOption("repos")),
verbose = TRUE,
type = "source",
INSTALL_opts = "--build"
)
library(arrow)
read_parquet(system.file("v0.7.1.parquet", package = "arrow"))
print(arrow_info())
# Our Version should always be > CRAN so we would detect a CRAN version here.
stopifnot(packageVersion("arrow") == "${{needs.source.outputs.pkg_version}}")
'
- name: Upload binary artifact
if: matrix.config.devtoolset
uses: actions/upload-artifact@v3
with:
name: r-pkg_centos7
path: arrow_*
test-centos-binary:
# arrow binary package not on ppm currently see #37922
if: false
needs: test-linux-binary
runs-on: ubuntu-latest
container: "rstudio/r-base:4.2-centos7"
steps:
- uses: actions/download-artifact@v3
with:
name: r-pkg_centos7
- name: Install DTS Package
shell: Rscript {0}
run: |
pkg <- list.files(pattern = "arrow_*")
if(length(pkg) > 1) {
pkg <- pkg[[1]]
warning("Multiple packages found! Using first one.")
}
# Install dependencies from RSPM
install.packages("arrow", repos = "https://packagemanager.rstudio.com/all/__linux__/centos7/latest")
remove.packages("arrow")
install.packages(pkg)
library(arrow)
read_parquet(system.file("v0.7.1.parquet", package = "arrow"))
print(arrow_info())
test-source:
needs: source
name: Test ${{ matrix.platform.name }} source build
runs-on: ${{ matrix.platform.runs_on }}
strategy:
fail-fast: false
matrix:
platform:
- {runs_on: "ubuntu-latest", name: "Linux"}
- {runs_on: ["self-hosted", "macos-10.13"] , name: "macOS"}
steps:
- name: Install R
if: matrix.platform.name == 'Linux'
uses: r-lib/actions/setup-r@v2
# TODO: improve arg handling
- name: Setup local repo
shell: bash
run: mkdir repo
- name: Get src pkg
uses: actions/download-artifact@v3
with:
name: r-pkg__src__contrib
path: repo/src/contrib
- name: Update repo index
shell: Rscript {0}
run: |
# getwd() is necessary as this macro is used within jobs using a docker container
tools::write_PACKAGES(file.path(getwd(), "repo/src/contrib", fsep = "/"), type = "source", verbose = TRUE)
- name: Show repo
shell: bash
# tree not available in git-bash on windows
run: |
ls -R repo
- name: Add repos to .Rprofile
shell: Rscript {0}
run: |
profile_path <- file.path(getwd(), ".Rprofile")
repo <- paste0("file://", getwd(), "/repo")
str <- paste0("options(arrow.repo = '", repo, "' )")
print(str)
write(str, file = profile_path, append = TRUE)
str <- paste0("options(arrow.dev_repo = '", repo, "' )")
print(str)
write(str, file = profile_path, append = TRUE)
# Set envvar for later steps by appending to $GITHUB_ENV
write(paste0("R_PROFILE_USER=", profile_path), file = Sys.getenv("GITHUB_ENV"), append = TRUE)
- name: Checkout Arrow
uses: actions/checkout@v3
with:
fetch-depth: 1
path: arrow
repository: paleolimbot/arrow
ref: 735e0591a7210eef364a28112c506a877c664545
submodules: recursive
- name: Install sccache
if: matrix.platform.name == 'Linux'
shell: bash
run: |
arrow/ci/scripts/install_sccache.sh unknown-linux-musl /usr/local/bin
- name: Install R package system dependencies (Linux)
if: matrix.platform.name == 'Linux'
run: sudo apt-get install -y libcurl4-openssl-dev libssl-dev
- name: Remove arrow/
run: |
rm -rf arrow/
- name: Enable parallel build
run: |
cores=`nproc || sysctl -n hw.logicalcpu`
echo "MAKEFLAGS=-j$cores" >> $GITHUB_ENV
- name: Install arrow source package
env:
# Test source build so be sure not to download a binary
LIBARROW_BINARY: "FALSE"
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
SCCACHE_BUCKET: "${{ secrets.SCCACHE_BUCKET }}"
SCCACHE_REGION: "${{ secrets.SCCACHE_REGION }}"
SCCACHE_S3_KEY_PREFIX: "sccache"
shell: Rscript {0}
run: |
source("https://raw.githubusercontent.com/apache/arrow/HEAD/ci/etc/rprofile")
# always remove arrow (mainly for self-hosted runners)
try(remove.packages("arrow"), silent = TRUE)
install.packages(
"arrow",
repos = c(getOption("arrow.dev_repo"), getOption("repos")),
verbose = TRUE,
type = "source",
INSTALL_opts = "--build"
)
library(arrow)
read_parquet(system.file("v0.7.1.parquet", package = "arrow"))
print(arrow_info())
# Our Version should always be > CRAN so we would detect a CRAN version here.
stopifnot(packageVersion("arrow") == "${{needs.source.outputs.pkg_version}}")
- name: Retry with verbosity if that failed
if: failure()
env:
LIBARROW_BINARY: "FALSE"
ARROW_R_DEV: "TRUE"
CMAKE_FIND_DEBUG_MODE: "ON"
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
SCCACHE_BUCKET: "${{ secrets.SCCACHE_BUCKET }}"
SCCACHE_REGION: "${{ secrets.SCCACHE_REGION }}"
SCCACHE_S3_KEY_PREFIX: "sccache"
shell: Rscript {0}
run: |
source("https://raw.githubusercontent.com/apache/arrow/HEAD/ci/etc/rprofile")
# always remove arrow (mainly for self-hosted runners)
try(remove.packages("arrow"), silent = TRUE)
install.packages(
"arrow",
repos = c(getOption("arrow.dev_repo"), getOption("repos")),
verbose = TRUE,
type = "source",
INSTALL_opts = "--build"
)
library(arrow)
read_parquet(system.file("v0.7.1.parquet", package = "arrow"))
print(arrow_info())
# Our Version should always be > CRAN so we would detect a CRAN version here.
stopifnot(packageVersion("arrow") == "${{needs.source.outputs.pkg_version}}")
upload-binaries:
# Only upload binaries if all tests pass.
needs: [r-packages, test-source, test-linux-binary]
name: Upload artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout Arrow
uses: actions/checkout@v4
with:
fetch-depth: 1
path: arrow
repository: paleolimbot/arrow
ref: 735e0591a7210eef364a28112c506a877c664545
submodules: recursive
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
install-r: false
- name: Rename artifacts
shell: Rscript {0}
run: |
file_paths <- list.files("artifacts", include.dirs = FALSE, recursive = TRUE)
new_names <- file.path("binaries", sub("/", "__", file_paths))
dir.create("binaries", showWarnings = FALSE)
file.copy(file.path("artifacts", file_paths), new_names)
- name: Set up Python by actions/setup-python
if: runner.arch == 'X64'
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Set up Python by apt
if: runner.os == 'Linux' && runner.arch != 'X64'
run: |
sudo apt update
sudo apt install -y \
libgit2-dev \
libpython3-dev \
python3-pip
sudo python3 -m pip install --upgrade pip
- name: Checkout Crossbow
uses: actions/checkout@v4
with:
path: crossbow
ref: actions-f442bab59e
- name: Setup Crossbow
shell: bash
run: |
python3 -m pip install -e arrow/dev/archery[crossbow]
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Upload artifacts
shell: bash
run: |
archery crossbow \
--queue-path $(pwd)/crossbow \
--queue-remote https://github.com/ursacomputing/crossbow \
upload-artifacts \
--sha actions-f442bab59e-github-r-binary-packages \
--tag actions-f442bab59e-github-r-binary-packages \
"binaries/r-*"
env:
CROSSBOW_GITHUB_TOKEN: ${{ secrets.CROSSBOW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
- name: Verify uploaded artifacts
shell: bash
run: |
archery crossbow \
--queue-path $(pwd)/crossbow \
--queue-remote https://github.com/ursacomputing/crossbow \
status \
--task-filter 'r-binary-packages' \
--no-fetch \
--validate \
actions-f442bab59e
env:
CROSSBOW_GITHUB_TOKEN: ${{ secrets.CROSSBOW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}