feat(rebuild): allow rebuilding for an explicit R minor #182
1 changed files with 33 additions and 5 deletions
|
|
@ -20,6 +20,19 @@ variables:
|
|||
# Gates this pipeline. A manual pipeline creation instantiates every file in
|
||||
# .crow/, and a declared default is applied even when the run never passed
|
||||
# this variable, so the default must be a value that matches no matrix row.
|
||||
# Which R minor to rebuild for. The matrix pins each slot's primary minor,
|
||||
# which is the only one the weekly cron ever builds - that is why non-primary
|
||||
# minors accumulate a backlog and why an ABI-risky package can exist for 4.4
|
||||
# and 4.5 but not 4.6. Override this to work that backlog off.
|
||||
rebuild_r_version:
|
||||
description: "R version to rebuild with: 'matrix' for each slot's primary, or an explicit x.y.z."
|
||||
options:
|
||||
- matrix
|
||||
- 4.6.0
|
||||
- 4.5.3
|
||||
- 4.4.3
|
||||
default: matrix
|
||||
|
||||
weekly_rebuild_missing:
|
||||
description: "Manual run target: a specific <os>-<arch>, 'all' to run every os/arch in parallel, or 'none' to run nothing."
|
||||
options:
|
||||
|
|
@ -410,6 +423,7 @@ steps:
|
|||
UVR_PACKAGES_DIR: /mnt/cache/uvr/packages
|
||||
R_LIBS_USER: /mnt/cache/R-pkgs
|
||||
R_VERSION: ${R_VERSION}
|
||||
REBUILD_R_VERSION: ${rebuild_r_version}
|
||||
CCACHE_DIR: /mnt/cache/ccache
|
||||
PLATFORM: ${OS}
|
||||
ARCH: ${ARCH}
|
||||
|
|
@ -424,12 +438,26 @@ steps:
|
|||
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
||||
- mkdir -p /mnt/cache/uvr/cache /mnt/cache/uvr/packages /mnt/cache/R-pkgs /mnt/cache/ccache /mnt/cache/packages
|
||||
- rm -rf /mnt/cache/R-pkgs/00LOCK-*
|
||||
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
|
||||
- /opt/R/$R_VERSION/bin/R -q -e 'packageVersion("bincraft")'
|
||||
# `matrix` keeps the slot's primary minor; anything else overrides it.
|
||||
# rebuild-missing.R derives its target slot from the R it runs under, so
|
||||
# selecting the interpreter is all that is needed to fill a minor's gap.
|
||||
- |
|
||||
if [ "$REBUILD_R_VERSION" = "matrix" ] || [ -z "$REBUILD_R_VERSION" ]; then
|
||||
RV="$R_VERSION"
|
||||
else
|
||||
RV="$REBUILD_R_VERSION"
|
||||
fi
|
||||
if [ ! -x "/opt/R/$RV/bin/R" ]; then
|
||||
echo "R $RV is not installed in this image; available: $(ls /opt/R)" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Rebuilding with R $RV"
|
||||
- /opt/R/$RV/bin/Rscript local/install-bincraft.R
|
||||
- /opt/R/$RV/bin/R -q -e 'packageVersion("bincraft")'
|
||||
- XVFB=$(command -v xwfb-run 2>/dev/null || command -v xvfb-run); XVFB_ARGS=""; if command -v xwfb-run >/dev/null 2>&1; then dnf install -y -q weston 2>/dev/null; XVFB_ARGS="-c weston"; fi
|
||||
- UVR_R_BIN=/opt/R/$R_VERSION/bin/R local/uvr-install.sh httr2
|
||||
- /opt/R/$R_VERSION/bin/R -q -e 'source("local/fetch-rebuild-packages-from-issue.R")'
|
||||
- $XVFB $XVFB_ARGS -n $SPLIT_INDEX -- /opt/R/$R_VERSION/bin/Rscript local/rebuild-missing.R $SPLIT_INTO $SPLIT_INDEX $REBUILD_BUDGET_HOURS 2>&1
|
||||
- UVR_R_BIN=/opt/R/$RV/bin/R local/uvr-install.sh httr2
|
||||
- /opt/R/$RV/bin/R -q -e 'source("local/fetch-rebuild-packages-from-issue.R")'
|
||||
- $XVFB $XVFB_ARGS -n $SPLIT_INDEX -- /opt/R/$RV/bin/Rscript local/rebuild-missing.R $SPLIT_INTO $SPLIT_INDEX $REBUILD_BUDGET_HOURS 2>&1
|
||||
backend_options:
|
||||
docker:
|
||||
resources:
|
||||
|
|
|
|||
Loading…
Reference in a new issue