cache images

This commit is contained in:
Patrick Schratz 2024-11-26 14:13:24 +01:00
commit 3d5a815004
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -31,22 +31,19 @@ steps:
# volumes:
# - amd64-binaries-r-dep-cache-ubuntu-2204:/mnt/cache
commands:
# download latest package version (avoid having to rebuild image every time)
# rscript_startup arg: required to pass down global option to future workers https://github.com/HenrikBengtsson/future/issues/134#issuecomment-2245666169
- git clone https://pat-s:$$git_ro_token@git.devxy.io/devxy/r-pkg-binaries.git .
- rm -rf /mnt/cache/R-pkgs/00LOCK-r-pkg-binaries /mnt/cache/R-pkgs/00LOCK-bincraftR
# for some reason paks pkgcache is often corrupt
- rm -rf /mnt/cache/R-pkgs/pkgcache/ /mnt/cache/pkgcache/ /root/.cache/R/
- mkdir -p /mnt/cache/pkgcache /mnt/cache/R-pkgs /mnt/cache/ccache /mnt/cache/packages
- R -q -e 'pak::pak("git::https://gitlab.com/devxy/r-package-binaries/bincraftr.git")'
- R -q -e 'packageVersion("bincraftR")'
# more complicated system dependencies which pak cannot resolve
- mkdir -p /mnt/cache/pkgcache /mnt/cache/R-pkgs /mnt/cache/ccache /mnt/cache/packages
# set additional repos: important as otherwise some packages cannot be resolved (e.g. INLA). Also: setting our own binary repos so we can make use of them for dep installation at some point
### Check
# - Rsymphony/ROI.plugin.symphony/adea/PortfolioAnalytics -> can't install/link external SYMPHONY lib (only on RHEL, as for others syslib exists)
# - Rglpk
# biplotbootGUI: somehow ubuntu still hangs even when using xvfb-run
- xvfb-run R -q -e "options(crayon.enabled = TRUE, Ncpus = $NCPUS, future.globals.onReference = NULL, repos = structure(c(devxy = 'https://cran.devxy.io/amd64/jammy/latest', CRAN = 'https://cloud.r-project.org'))); library(dplyr); library(bincraftR); cran_pkgs = tools::CRAN_package_db()[['Package']]; '%nin%' <- Negate('%in%'); foo = query_metadata_table() |> filter(platform == 'ubuntu-2204', arch == 'amd64') |> distinct(name) |> pull(name); pkgs <- dput(cran_pkgs[cran_pkgs %nin% foo][0:300]); options(progressr.enable = TRUE); pkgs = c('leidenbase', 'lgpr', 'MDSGUI', 'MediaNews', 'mixcat', 'MonoPhy', 'MPCR', 'netShiny', 'nevada', 'NFCP', 'nfl4th', 'nflverse', 'NGCHM', 'NIMAA', 'nlcv', 'nlmixr2rpt', 'noaastormevents', 'NoviceDeveloperResources2', 'npcurePK', 'npi', 'nRegression', 'nucim', 'numbat', 'oaqc', 'oceanmap', 'ondisc', 'One4All', 'onelogin', 'OpenCL', 'opencv', 'opendatatoronto', 'openmeteo', 'openVA', 'R2PPT', 'R2wd', 'ravetools', 'Rcatch22', 'Rcplex', 'RcppCWB', 'rFUSION', 'RInno', 'rmarchingcubes', 'RmecabKo', 'ROI.plugin.cplex', 'ROI.plugin.qpoases', 'ROI.plugin.symphony', 'ROracle', 'Rsymphony', 'RWinEdt', 'SegEnvIneq', 'skedastic', 'spectrino', 'taskscheduleR', 'theft', 'theftdlc', 'TML', 'trtswitch', 'ursa'); pkgs = setdiff(pkgs, c('RInno', 'MediaNews', 'CoTiMA', 'later')); progressr::handlers('cli'); progressr::handlers(global = TRUE); foo = lapply(pkgs, function(x) bincraftR::build_binary_package(x, debug = FALSE, force = TRUE, platform = 'ubuntu-2204'))"
- xvfb-run R -q -e "options(crayon.enabled = TRUE, Ncpus = $NCPUS, future.globals.onReference = NULL, repos = structure(c(CRAN = 'https://cran.devxy.io/amd64/jammy/latest'))); pkgs = c('BiplotGUI', 'KeyboardSimulator', 'MDSGUI', 'R2PPT', 'R2wd', 'RWinEdt', 'Rveg', 'blatr', 'excel.link', 'leidenbase', 'mpathr', 'spectrino', 'taskscheduleR'); pkgs = setdiff(pkgs, c('RInno', 'MediaNews', 'CoTiMA', 'later')); progressr::handlers('cli'); progressr::handlers(global = TRUE); foo = lapply(pkgs, function(x) bincraftR::build_binary_package(x, debug = FALSE, force = TRUE, platform = 'ubuntu-2204'))"
### Manual pkg builds
# webshot2, tabledown, TestAnaAPP, trekcolors, Spectran, SimNPH, RPushbullet, SimDesign, simCAT, SIAmodules, shinytest2, ShinyItemAnalysis, shinyIRT, shiny.benchmark, scDIFtest, RSP, qtkit, PROsetta, prettifyAddins, PerFit, outlierensembles, nomnoml, mxfda, MultBiplotR, mstDIF, mdsr, makepipe, lordif, kequate, jstager, jrt, irtreliability, irtQ, irtpwr, irtGUI, irtawsi, GRShiny, GPCMlasso, googletraffic, giacR, flps, flow, faoutlier, equateIRT, EnrichIntersect, EFA.dimensions, DFIT, D3mirt, ctgdist, CoTiMA, ConvertPar, bscui, BifactorIndicesCalculator, autoFC, airt: wait for https://github.com/rstudio/r-system-requirements/pull/178
# RInno: Windows-only