refactor(ci): skip bincraft reinstall when image already has it
bincraft is baked into the build-env images, but every workflow run
unconditionally called pak::pak("git::.../bincraft.git") to defend
against bakes where the install silently failed.
That cost ~30-60s per job (pak resolves Remotes, may recompile),
which adds up across all process-updates, update-package-index,
weekly-rebuild and archive-missed-packages workflows.
Guard the call with requireNamespace(): healthy images skip the
install entirely; broken images still self-heal.
This commit is contained in:
parent
8c5362b7ab
commit
63b4a51b31
1 changed files with 43 additions and 43 deletions
|
|
@ -39,7 +39,7 @@ steps:
|
|||
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
||||
- mkdir -p /mnt/cache/pkgcache /mnt/cache/R-pkgs /mnt/cache/ccache /mnt/cache/packages
|
||||
- rm -rf /mnt/cache/R-pkgs/00LOCK-*
|
||||
- /opt/R/$R_VERSION/bin/R -q -e 'pak::pak("git::https://codefloe.com/rpkgs/bincraft.git")'
|
||||
- /opt/R/$R_VERSION/bin/R -q -e 'if (!requireNamespace("bincraft", quietly = TRUE)) pak::pak("git::https://codefloe.com/rpkgs/bincraft.git")'
|
||||
- /opt/R/$R_VERSION/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
|
||||
- /opt/R/$R_VERSION/bin/R -q -e 'pak::pak("httr2")'
|
||||
|
|
|
|||
Loading…
Reference in a new issue