The "Install system libraries" step was stalling indefinitely. It was not deadlocked on a config prompt and not slow-but-progressing: measured inside the live runner container, /var/cache/apt/archives stayed at 0 .deb files after 3+ minutes, with apt's http workers parked in S state waiting on the network. Root cause is the http:// mirror path being pathologically slow from this runner, not broken. Measured 2026-08-04 from inside the CI container, same index file, back to back: http://archive.ubuntu.com/ubuntu/dists/noble/Release 20.1s https://archive.ubuntu.com/ubuntu/dists/noble/Release 3.1s apt fetches many indexes serially, so ~20s apiece compounds into what looks like a hang. Rewriting the deb822 sources to https makes the step complete. Verified before committing, in the running CI container (rocker/r-ver:4.4): - ca-certificates present and apt 2.8.3 ships the https method built in, so nothing has to be installed over http first to bootstrap TLS - the sed rewrites both URIs (archive + security); the only remaining http:// is an inert comment line - '#' is used as the sed delimiter deliberately: '|' collides with the alternation and fails with "unknown option to `s'" - the regex survives YAML block-scalar parsing with backslashes intact `|| true` guards each sed because the step runs under `sh -e`, so a missing-sources-file on some other base image must not kill the job.
61 lines
2.2 KiB
YAML
61 lines
2.2 KiB
YAML
name: R-CMD-check
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: rocker/r-ver:4.4
|
|
|
|
steps:
|
|
- name: Install system libraries and Node.js (required by actions/checkout)
|
|
run: |
|
|
# Switch apt to HTTPS mirrors. Measured from this runner on
|
|
# 2026-08-04: the SAME index file takes 20.1s over http:// and 3.1s
|
|
# over https://. apt fetches many indexes serially, so http:// does
|
|
# not read as "slow" -- it reads as a hang (zero bytes in
|
|
# /var/cache/apt/archives after 3+ minutes, apt's http workers parked
|
|
# in S state). rocker/r-ver:4.4 already ships ca-certificates and
|
|
# apt 2.8.3 has the https method built in, so nothing needs to be
|
|
# installed over http first to bootstrap this.
|
|
# `|| true` because the step runs under `sh -e`: on an image whose
|
|
# sources live in the other location, the missing-file sed must not
|
|
# kill the job.
|
|
sed -i -E 's#http://(archive|security)\.ubuntu\.com#https://\1.ubuntu.com#g' \
|
|
/etc/apt/sources.list.d/ubuntu.sources 2>/dev/null || true
|
|
sed -i -E 's#http://(archive|security)\.ubuntu\.com#https://\1.ubuntu.com#g' \
|
|
/etc/apt/sources.list 2>/dev/null || true
|
|
apt-get update -qq
|
|
apt-get install -y --no-install-recommends \
|
|
nodejs git \
|
|
libcurl4-openssl-dev libssl-dev libxml2-dev \
|
|
libfontconfig1-dev libharfbuzz-dev libfribidi-dev
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install pak
|
|
run: |
|
|
Rscript -e 'install.packages("pak", repos = "https://r-lib.github.io/p/pak/stable/")'
|
|
|
|
- name: Install package dependencies
|
|
run: |
|
|
Rscript -e 'pak::local_install_deps(dependencies = TRUE)'
|
|
|
|
- name: Install rcmdcheck (check runner)
|
|
run: |
|
|
Rscript -e 'pak::pak("rcmdcheck")'
|
|
|
|
- name: Run tests
|
|
run: |
|
|
Rscript -e 'testthat::test_local(stop_on_failure = TRUE)'
|
|
|
|
- name: R CMD check
|
|
run: |
|
|
Rscript -e '
|
|
rcmdcheck::rcmdcheck(
|
|
args = c("--no-manual", "--no-vignettes"),
|
|
error_on = "error"
|
|
)
|
|
'
|