From b1898f357cc49221143e9c00cbfeb1a2e9e67612 Mon Sep 17 00:00:00 2001 From: pat-s Date: Wed, 11 Sep 2024 00:15:18 +0200 Subject: [PATCH] finally add progressr support --- .woodpecker/build.yaml | 4 ++-- .woodpecker/process_cran_updates.yaml | 2 +- .woodpecker/warm_up_build.yaml | 2 +- DESCRIPTION | 2 ++ Justfile | 10 +++++++--- R/build_binaries.R | 16 +++++++--------- 6 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.woodpecker/build.yaml b/.woodpecker/build.yaml index 9e4bc7e..937e649 100644 --- a/.woodpecker/build.yaml +++ b/.woodpecker/build.yaml @@ -71,9 +71,9 @@ steps: # 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 - # - R -q -e 'options(crayon.enabled = TRUE, Ncpus = ${NCPUS}, future.globals.onReference = NULL); pkgs = tools::CRAN_package_db()[[1]]; pkgs = setdiff(pkgs[${BLOCK}], c("biplotbootGUI", "BlockmodelingGUI", "cncaGUI", "EventDetectGUI", "irtGUI", "KappaGUI", "magickGUI", "miniGUI", "multibiplotGUI", "TextMiningGUI", "later", "RclusTool", "Rcmdr", "RcmdrMisc", "RcmdrPlugin.aRnova", "RcmdrPlugin.BiclustGUI", "RcmdrPlugin.BWS1", "RcmdrPlugin.BWS2", "RcmdrPlugin.BWS3", "RcmdrPlugin.cpd", "RcmdrPlugin.DCCV", "RcmdrPlugin.DCE", "RcmdrPlugin.depthTools", "RcmdrPlugin.DoE", "RcmdrPlugin.EACSPIR", "RcmdrPlugin.EBM", "RcmdrPlugin.EcoVirtual", "RcmdrPlugin.Export", "RcmdrPlugin.EZR", "RcmdrPlugin.FactoMineR", "RcmdrPlugin.GWRM", "RcmdrPlugin.HH", "RcmdrPlugin.KMggplot2", "RcmdrPlugin.MA", "RcmdrPlugin.MPAStats", "RcmdrPlugin.NMBU", "RcmdrPlugin.orloca", "RcmdrPlugin.PcaRobust", "RcmdrPlugin.RiskDemo", "RcmdrPlugin.RMTCJags", "RcmdrPlugin.ROC", "RcmdrPlugin.sos" , "RcmdrPlugin.survival", "RcmdrPlugin.TeachingDemos", "RcmdrPlugin.TeachStat", "RcmdrPlugin.temis", "RcmdrPlugin.UCA", "RcmdrPlugin.WorldFlora", "sf", "StratigrapheR", "tcltk2", "TVMM", "uHMM", "RInno")); library(bincraftR); future::plan("${STRATEGY}", workers = ${NCPUS}, rscript_startup = quote(options(crayon.enabled = TRUE))); pkgs = foo = lapply(pkgs, function(x) build_binary_package(x, build_for_minor=FALSE, debug = FALSE, force = TRUE, platform = "${PLATFORM}"))' + # - R -q -e 'options(crayon.enabled = TRUE, Ncpus = ${NCPUS}, future.globals.onReference = NULL); pkgs = tools::CRAN_package_db()[[1]]; pkgs = setdiff(pkgs[${BLOCK}], c("biplotbootGUI", "BlockmodelingGUI", "cncaGUI", "EventDetectGUI", "irtGUI", "KappaGUI", "magickGUI", "miniGUI", "multibiplotGUI", "TextMiningGUI", "later", "RclusTool", "Rcmdr", "RcmdrMisc", "RcmdrPlugin.aRnova", "RcmdrPlugin.BiclustGUI", "RcmdrPlugin.BWS1", "RcmdrPlugin.BWS2", "RcmdrPlugin.BWS3", "RcmdrPlugin.cpd", "RcmdrPlugin.DCCV", "RcmdrPlugin.DCE", "RcmdrPlugin.depthTools", "RcmdrPlugin.DoE", "RcmdrPlugin.EACSPIR", "RcmdrPlugin.EBM", "RcmdrPlugin.EcoVirtual", "RcmdrPlugin.Export", "RcmdrPlugin.EZR", "RcmdrPlugin.FactoMineR", "RcmdrPlugin.GWRM", "RcmdrPlugin.HH", "RcmdrPlugin.KMggplot2", "RcmdrPlugin.MA", "RcmdrPlugin.MPAStats", "RcmdrPlugin.NMBU", "RcmdrPlugin.orloca", "RcmdrPlugin.PcaRobust", "RcmdrPlugin.RiskDemo", "RcmdrPlugin.RMTCJags", "RcmdrPlugin.ROC", "RcmdrPlugin.sos" , "RcmdrPlugin.survival", "RcmdrPlugin.TeachingDemos", "RcmdrPlugin.TeachStat", "RcmdrPlugin.temis", "RcmdrPlugin.UCA", "RcmdrPlugin.WorldFlora", "sf", "StratigrapheR", "tcltk2", "TVMM", "uHMM", "RInno")); library(bincraftR); future::plan("${STRATEGY}", workers = ${NCPUS}, rscript_startup = quote(options(crayon.enabled = TRUE))); options(progressr.enable = TRUE); progressr::handlers('cli'); progressr::handlers(global = TRUE); pkgs = foo = lapply(pkgs, function(x) build_binary_package(x, build_for_minor=FALSE, debug = FALSE, force = TRUE, platform = "${PLATFORM}"))' ### Manual pkg builds - - xvfb-run R -q -e 'options(crayon.enabled = TRUE, Ncpus = ${NCPUS}, future.globals.onReference = NULL); pkgs = c("av", "baorista", "bartCause", "bartMan", "BayesMallows", "bayesnec", "bdvis", "biblio", "bidask", "BifactorIndicesCalculator", "bigDM", "bigsnpr", "bimets", "BioM2", "biostat3", "biplotbootGUI", "bispdep", "biwavelet", "BKTR", "blme", "bnlearn", "boot", "boxcoxmix", "BranchGLM", "BRugs", "bscui", "bsvarSIGNs", "calendar", "CaPO4Sim", "caretEnsemble", "casebase", "cba", "celltrackR", "cffr", "circular", "ClassComparison", "clrng", "clustermq", "CLVTools", "cncaGUI", "collapse", "conrad", "contingencytables", "ConvertPar", "convevol", "CopernicusDEM", "cops", "copula", "corrplot", "CoTiMA", "countSTAR", "coursekata", "crandep", "CRE", "CrossCarry", "csquares", "CTD", "ctgdist", "ctsem", "cusp", "cv", "D3mirt", "DanielBiostatistics10th", "dartR", "dartR.base", "dartR.captive", "dartR.popgen", "dartR.sexlinked", "dartR.sim", "dartR.spatial", "datana", "datardis", "dbarts", "decp", "deepgp", "deeptime", "deeptrafo", "designmatch", "dfidx", "DFIT", "difR", "DIFshiny", "digest", "distr", "distrEllipse", "distrSim", "diveR", "dmm", "DPQmpfr", "DPTM", "drda", "dsmSearch", "duckdbfs", "DWDLargeR", "dyn.log", "dynaTree", "dynBiplotGUI", "dynr", "eaf", "EBcoBART", "ecocbo", "ecocomDP", "EcoEnsemble", "ecoreg", "eddington", "EFA.dimensions", "EMCluster", "emmeans", "EnrichIntersect", "envi", "envvar", "equateIRT", "equateMultiple", "EthSEQ", "evalITR", "EventDetectGUI", "exampletestr", "expm", "extremevalues", "faoutlier", "fastcpd", "fastDummies", "fastICA", "FastUtils", "fBasics", "fcl", "fdasrvf", "fdrtool", "filters", "finbif", "fio", "FjordLight", "flan", "flexsurv", "FLORAL", "flow", "flps", "fluidsynth", "fntl", "FoReco", "fragility", "FuzzyPovertyR", "galamm", "gamstransfer", "GAS", "gasfluxes", "gateR", "geofi", "geosimilarity", "geppe", "gert", "GET", "GetTDData", "GFDrmst", "ggpath", "ggrepel", "ghapps", "giacR", "GLCMTextures", "glmmPen", "glmmrBase", "googleAnalyticsR", "googletraffic", "GPCMlasso", "gpindex", "gpuR", "grates", "grattanInflators", "GRIDCOPULA", "gridGeometry", "groupTesting", "GRShiny", "gsw", "gwid", "gWidgets2tcltk", "GWmodel", "Haplin", "hce", "heteromixgm", "HierPortfolios", "highs", "HMC", "hmstimer", "HSAUR3", "hstats", "htsr", "httr2", "hunspell", "HydroPortailStats", "ibdsim2", "IceSat2R", "ichimoku", "iClusterVB", "icosa", "ilabelled", "ImputeRobust", "incubate", "indicspecies", "iNEXT.3D", "INLAspacetime", "IPEDSuploadables", "iplots", "ipolygrowth", "irtawsi", "irtGUI", "irtpwr", "irtQ", "irtreliability", "IsoriX", "iSTATS", "jagshelper", "jmvcore", "joyn", "jqr", "jrt", "jsmodule", "jstager", "KappaGUI", "kequate", "kernelshap", "kernlab", "kit", "klassR", "KoboconnectR", "KSgeneral", "L1pack", "LBI", "leaflet.extras", "lefko3", "lessR", "lgpr", "lingtypology", "lme4breeding", "loon", "loon.ggplot", "loon.shiny", "loon.tourr", "lordif", "LRTesteR", "MachineShop", "magickGUI", "makepipe", "malariaAtlas", "MALDIquant", "mathml", "matrixStats", "MazamaLocationUtils", "MBA", "mboost", "MCARtest", "mcb", "mco", "MCPModGeneral", "mdatools", "mdsr", "Mega2R", "metajam", "MethEvolSIM", "microsimulation", "minic", "miniGUI", "minqa", "mirai", "mirt", "mirtCAT", "mispitools", "missRanger", "mobr", "moc.gapbk", "modsem", "MPV", "mrbayes", "MSCquartets", "msm", "mstDIF", "MultBiplotR", "multibias", "multibiplotGUI", "multIntTestFunc", "mvs", "mxfda", "myClim", "nanonext", "ncdf4", "ndtv", "neotoma2", "nestedcv", "NetFACS", "nflplotR", "NGBVS", "nlgm", "NlinTS", "nlme", "nomnoml", "oce", "octopucs", "od", "omopgenerics", "opencpu", "OpenMx", "openssl", "openxlsx2", "optbdmaeAT", "optrcdmaeAT", "ordinal", "ordinalpattern", "outlierensembles", "pairwiseCI", "paramlink2", "party", "partykit", "pastboon", "patchDVI", "patterncausality", "pbdZMQ", "pcaPP", "pdR", "pedtools", "PerFit", "perms", "PFLR", "phonfieldwork", "piecepackr", "PKPDsim", "plfMA", "plotBart", "PMCMRplus", "PNAR", "PointedSDMs", "polmineR", "poweRbal", "PRA", "PRECAST", "prettifyAddins", "preventr", "PriceIndices", "priceR", "prior3D", "priorCON", "PROsetta", "proteomicsCV", "PubChemR", "pubh", "pubmed.mineR", "qcpm", "QTE.RD", "qtkit", "qtl", "qualtRics", "quanteda.textplots", "Racmacs", "rapiclient", "rapidsplithalf", "rassta", "ravetools", "rayrender", "Rbeast", "RblDataLicense", "Rblpapi", "RclusTool", "RcmdrPlugin.PcaRobust", "RcmdrPlugin.RiskDemo", "RcmdrPlugin.RMTCJags", "RcmdrPlugin.ROC", "RcmdrPlugin.sos", "RcmdrPlugin.survival", "RcmdrPlugin.TeachingDemos", "RcmdrPlugin.TeachStat", "RcmdrPlugin.temis", "RcmdrPlugin.UCA", "RcmdrPlugin.WorldFlora", "Rcplex", "RcppCWB", "RcppMeCab", "RcppParallel", "readrba", "referenceIntervals", "refineR", "refseqR", "relMix", "resilience", "ResultModelManager", "revdbayes", "rfviz", "RGraphSpace", "riAFTBART", "rio", "rjags", "rjson", "Rlabkey", "rmarchingcubes", "rmcfs", "RmecabKo", "RMySQL", "rnpn", "robotstxt", "robsurvey", "robustbase", "ROI.plugin.cplex", "ROI.plugin.highs", "ROI.plugin.qpoases", "rollup", "rolog", "ROracle", "rplum", "RPointCloud", "Rpoppler", "rrcov", "Rsagacmd", "RSP", "rstpm2", "rswipl", "rtide", "rTwig", "rugarch", "rytstat", "s3fs", "saeHB.panel.beta", "sampcompR", "SAMtool", "scDIFtest", "sched", "secr", "servr", "SGP", "shiny.benchmark", "shinyIRT", "ShinyItemAnalysis", "shinytest2", "SIAmodules", "Signac", "SigTree", "simCAT", "SimDesign", "SimNPH", "simodels", "simplePHENOTYPES", "SingleCaseES", "skedastic", "skpr", "sna", "snplinkage", "SNSequate", "soptdmaeA", "spatstat.explore", "speakeasyR", "Spectran", "spTimer", "SSDforR", "stan4bart", "startupmsg", "statnet", "stats4teaching", "stcpR6", "streamDAG", "strvalidator", "surface", "switchboard", "tabledown", "tables", "tcltk2", "TestAnaAPP", "TextMiningGUI", "tfrmtbuilder", "tiledb", "tkImgR", "tmsens", "TreeDist", "TTAinterfaceTrendAnalysis", "TVMM", "uHMM", "voi", "vvtableau", "wbacon", "webshot2", "ymd", "YTAnalytics"); pkgs = setdiff(pkgs, c("biplotbootGUI", "cncaGUI", "dynBiplotGUI", "ade4TkGUI", "BlockmodelingGUI", "cncaGUI", "EventDetectGUI", "irtGUI", "KappaGUI", "magickGUI", "miniGUI", "multibiplotGUI", "TextMiningGUI", "later", "RclusTool", "Rcmdr", "RcmdrMisc", "RcmdrPlugin.aRnova", "RcmdrPlugin.BiclustGUI", "RcmdrPlugin.BWS1", "RcmdrPlugin.BWS2", "RcmdrPlugin.BWS3", "RcmdrPlugin.cpd", "RcmdrPlugin.DCCV", "RcmdrPlugin.DCE", "RcmdrPlugin.depthTools", "RcmdrPlugin.DoE", "RcmdrPlugin.EACSPIR", "RcmdrPlugin.EBM", "RcmdrPlugin.EcoVirtual", "RcmdrPlugin.Export", "RcmdrPlugin.EZR", "RcmdrPlugin.FactoMineR", "RcmdrPlugin.GWRM", "RcmdrPlugin.HH", "RcmdrPlugin.KMggplot2", "RcmdrPlugin.MA", "RcmdrPlugin.MPAStats", "RcmdrPlugin.NMBU", "RcmdrPlugin.orloca", "RcmdrPlugin.PcaRobust", "RcmdrPlugin.RiskDemo", "RcmdrPlugin.RMTCJags", "RcmdrPlugin.ROC", "RcmdrPlugin.sos" , "RcmdrPlugin.survival", "RcmdrPlugin.TeachingDemos", "RcmdrPlugin.TeachStat", "RcmdrPlugin.temis", "RcmdrPlugin.UCA", "RcmdrPlugin.WorldFlora", "sf", "StratigrapheR", "tcltk2", "TVMM", "uHMM", "RInno")); library(bincraftR); future::plan("${STRATEGY}", workers = ${NCPUS}, rscript_startup = quote(options(crayon.enabled = TRUE))); pkgs = foo = lapply(pkgs, function(x) build_binary_package(x, build_for_minor=FALSE, debug = FALSE, force = TRUE, platform = "${PLATFORM}"))' + - xvfb-run R -q -e 'options(crayon.enabled = TRUE, Ncpus = ${NCPUS}, future.globals.onReference = NULL); pkgs = c("av", "baorista", "bartCause", "bartMan", "BayesMallows", "bayesnec", "bdvis", "biblio", "bidask", "BifactorIndicesCalculator", "bigDM", "bigsnpr", "bimets", "BioM2", "biostat3", "biplotbootGUI", "bispdep", "biwavelet", "BKTR", "blme", "bnlearn", "boot", "boxcoxmix", "BranchGLM", "BRugs", "bscui", "bsvarSIGNs", "calendar", "CaPO4Sim", "caretEnsemble", "casebase", "cba", "celltrackR", "cffr", "circular", "ClassComparison", "clrng", "clustermq", "CLVTools", "cncaGUI", "collapse", "conrad", "contingencytables", "ConvertPar", "convevol", "CopernicusDEM", "cops", "copula", "corrplot", "CoTiMA", "countSTAR", "coursekata", "crandep", "CRE", "CrossCarry", "csquares", "CTD", "ctgdist", "ctsem", "cusp", "cv", "D3mirt", "DanielBiostatistics10th", "dartR", "dartR.base", "dartR.captive", "dartR.popgen", "dartR.sexlinked", "dartR.sim", "dartR.spatial", "datana", "datardis", "dbarts", "decp", "deepgp", "deeptime", "deeptrafo", "designmatch", "dfidx", "DFIT", "difR", "DIFshiny", "digest", "distr", "distrEllipse", "distrSim", "diveR", "dmm", "DPQmpfr", "DPTM", "drda", "dsmSearch", "duckdbfs", "DWDLargeR", "dyn.log", "dynaTree", "dynBiplotGUI", "dynr", "eaf", "EBcoBART", "ecocbo", "ecocomDP", "EcoEnsemble", "ecoreg", "eddington", "EFA.dimensions", "EMCluster", "emmeans", "EnrichIntersect", "envi", "envvar", "equateIRT", "equateMultiple", "EthSEQ", "evalITR", "EventDetectGUI", "exampletestr", "expm", "extremevalues", "faoutlier", "fastcpd", "fastDummies", "fastICA", "FastUtils", "fBasics", "fcl", "fdasrvf", "fdrtool", "filters", "finbif", "fio", "FjordLight", "flan", "flexsurv", "FLORAL", "flow", "flps", "fluidsynth", "fntl", "FoReco", "fragility", "FuzzyPovertyR", "galamm", "gamstransfer", "GAS", "gasfluxes", "gateR", "geofi", "geosimilarity", "geppe", "gert", "GET", "GetTDData", "GFDrmst", "ggpath", "ggrepel", "ghapps", "giacR", "GLCMTextures", "glmmPen", "glmmrBase", "googleAnalyticsR", "googletraffic", "GPCMlasso", "gpindex", "gpuR", "grates", "grattanInflators", "GRIDCOPULA", "gridGeometry", "groupTesting", "GRShiny", "gsw", "gwid", "gWidgets2tcltk", "GWmodel", "Haplin", "hce", "heteromixgm", "HierPortfolios", "highs", "HMC", "hmstimer", "HSAUR3", "hstats", "htsr", "httr2", "hunspell", "HydroPortailStats", "ibdsim2", "IceSat2R", "ichimoku", "iClusterVB", "icosa", "ilabelled", "ImputeRobust", "incubate", "indicspecies", "iNEXT.3D", "INLAspacetime", "IPEDSuploadables", "iplots", "ipolygrowth", "irtawsi", "irtGUI", "irtpwr", "irtQ", "irtreliability", "IsoriX", "iSTATS", "jagshelper", "jmvcore", "joyn", "jqr", "jrt", "jsmodule", "jstager", "KappaGUI", "kequate", "kernelshap", "kernlab", "kit", "klassR", "KoboconnectR", "KSgeneral", "L1pack", "LBI", "leaflet.extras", "lefko3", "lessR", "lgpr", "lingtypology", "lme4breeding", "loon", "loon.ggplot", "loon.shiny", "loon.tourr", "lordif", "LRTesteR", "MachineShop", "magickGUI", "makepipe", "malariaAtlas", "MALDIquant", "mathml", "matrixStats", "MazamaLocationUtils", "MBA", "mboost", "MCARtest", "mcb", "mco", "MCPModGeneral", "mdatools", "mdsr", "Mega2R", "metajam", "MethEvolSIM", "microsimulation", "minic", "miniGUI", "minqa", "mirai", "mirt", "mirtCAT", "mispitools", "missRanger", "mobr", "moc.gapbk", "modsem", "MPV", "mrbayes", "MSCquartets", "msm", "mstDIF", "MultBiplotR", "multibias", "multibiplotGUI", "multIntTestFunc", "mvs", "mxfda", "myClim", "nanonext", "ncdf4", "ndtv", "neotoma2", "nestedcv", "NetFACS", "nflplotR", "NGBVS", "nlgm", "NlinTS", "nlme", "nomnoml", "oce", "octopucs", "od", "omopgenerics", "opencpu", "OpenMx", "openssl", "openxlsx2", "optbdmaeAT", "optrcdmaeAT", "ordinal", "ordinalpattern", "outlierensembles", "pairwiseCI", "paramlink2", "party", "partykit", "pastboon", "patchDVI", "patterncausality", "pbdZMQ", "pcaPP", "pdR", "pedtools", "PerFit", "perms", "PFLR", "phonfieldwork", "piecepackr", "PKPDsim", "plfMA", "plotBart", "PMCMRplus", "PNAR", "PointedSDMs", "polmineR", "poweRbal", "PRA", "PRECAST", "prettifyAddins", "preventr", "PriceIndices", "priceR", "prior3D", "priorCON", "PROsetta", "proteomicsCV", "PubChemR", "pubh", "pubmed.mineR", "qcpm", "QTE.RD", "qtkit", "qtl", "qualtRics", "quanteda.textplots", "Racmacs", "rapiclient", "rapidsplithalf", "rassta", "ravetools", "rayrender", "Rbeast", "RblDataLicense", "Rblpapi", "RclusTool", "RcmdrPlugin.PcaRobust", "RcmdrPlugin.RiskDemo", "RcmdrPlugin.RMTCJags", "RcmdrPlugin.ROC", "RcmdrPlugin.sos", "RcmdrPlugin.survival", "RcmdrPlugin.TeachingDemos", "RcmdrPlugin.TeachStat", "RcmdrPlugin.temis", "RcmdrPlugin.UCA", "RcmdrPlugin.WorldFlora", "Rcplex", "RcppCWB", "RcppMeCab", "RcppParallel", "readrba", "referenceIntervals", "refineR", "refseqR", "relMix", "resilience", "ResultModelManager", "revdbayes", "rfviz", "RGraphSpace", "riAFTBART", "rio", "rjags", "rjson", "Rlabkey", "rmarchingcubes", "rmcfs", "RmecabKo", "RMySQL", "rnpn", "robotstxt", "robsurvey", "robustbase", "ROI.plugin.cplex", "ROI.plugin.highs", "ROI.plugin.qpoases", "rollup", "rolog", "ROracle", "rplum", "RPointCloud", "Rpoppler", "rrcov", "Rsagacmd", "RSP", "rstpm2", "rswipl", "rtide", "rTwig", "rugarch", "rytstat", "s3fs", "saeHB.panel.beta", "sampcompR", "SAMtool", "scDIFtest", "sched", "secr", "servr", "SGP", "shiny.benchmark", "shinyIRT", "ShinyItemAnalysis", "shinytest2", "SIAmodules", "Signac", "SigTree", "simCAT", "SimDesign", "SimNPH", "simodels", "simplePHENOTYPES", "SingleCaseES", "skedastic", "skpr", "sna", "snplinkage", "SNSequate", "soptdmaeA", "spatstat.explore", "speakeasyR", "Spectran", "spTimer", "SSDforR", "stan4bart", "startupmsg", "statnet", "stats4teaching", "stcpR6", "streamDAG", "strvalidator", "surface", "switchboard", "tabledown", "tables", "tcltk2", "TestAnaAPP", "TextMiningGUI", "tfrmtbuilder", "tiledb", "tkImgR", "tmsens", "TreeDist", "TTAinterfaceTrendAnalysis", "TVMM", "uHMM", "voi", "vvtableau", "wbacon", "webshot2", "ymd", "YTAnalytics"); pkgs = setdiff(pkgs, c("biplotbootGUI", "cncaGUI", "dynBiplotGUI", "ade4TkGUI", "BlockmodelingGUI", "cncaGUI", "EventDetectGUI", "irtGUI", "KappaGUI", "magickGUI", "miniGUI", "multibiplotGUI", "TextMiningGUI", "later", "RclusTool", "Rcmdr", "RcmdrMisc", "RcmdrPlugin.aRnova", "RcmdrPlugin.BiclustGUI", "RcmdrPlugin.BWS1", "RcmdrPlugin.BWS2", "RcmdrPlugin.BWS3", "RcmdrPlugin.cpd", "RcmdrPlugin.DCCV", "RcmdrPlugin.DCE", "RcmdrPlugin.depthTools", "RcmdrPlugin.DoE", "RcmdrPlugin.EACSPIR", "RcmdrPlugin.EBM", "RcmdrPlugin.EcoVirtual", "RcmdrPlugin.Export", "RcmdrPlugin.EZR", "RcmdrPlugin.FactoMineR", "RcmdrPlugin.GWRM", "RcmdrPlugin.HH", "RcmdrPlugin.KMggplot2", "RcmdrPlugin.MA", "RcmdrPlugin.MPAStats", "RcmdrPlugin.NMBU", "RcmdrPlugin.orloca", "RcmdrPlugin.PcaRobust", "RcmdrPlugin.RiskDemo", "RcmdrPlugin.RMTCJags", "RcmdrPlugin.ROC", "RcmdrPlugin.sos" , "RcmdrPlugin.survival", "RcmdrPlugin.TeachingDemos", "RcmdrPlugin.TeachStat", "RcmdrPlugin.temis", "RcmdrPlugin.UCA", "RcmdrPlugin.WorldFlora", "sf", "StratigrapheR", "tcltk2", "TVMM", "uHMM", "RInno")); library(bincraftR); future::plan("${STRATEGY}", workers = ${NCPUS}, rscript_startup = quote(options(crayon.enabled = TRUE))); options(progressr.enable = TRUE); progressr::handlers('cli'); progressr::handlers(global = TRUE); foo = lapply(pkgs, function(x) build_binary_package(x, build_for_minor=FALSE, debug = FALSE, force = TRUE, platform = "${PLATFORM}"))' backend_options: kubernetes: ### PROD-parallel diff --git a/.woodpecker/process_cran_updates.yaml b/.woodpecker/process_cran_updates.yaml index 3bb54e5..480205f 100644 --- a/.woodpecker/process_cran_updates.yaml +++ b/.woodpecker/process_cran_updates.yaml @@ -55,7 +55,7 @@ steps: - 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 # options(future.globals.onReference = NULL): for some reason s3fs::file_delete() throws 'Error: Detected a non-exportable reference ('externalptr') in one of the globals ('FUN' of class 'function') used in the future expression' otherwise - - xvfb-run R -q -e 'options(crayon.enabled = TRUE, Ncpus = 4, future.globals.onReference = "error", repos = structure(c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/stable"))); pkgs = tools::CRAN_package_db()[[1]][${BLOCK}]; pkgs = setdiff(pkgs, c("biplotbootGUI", "cncaGUI", "dynBiplotGUI", "ade4TkGUI", "BlockmodelingGUI", "cncaGUI", "EventDetectGUI", "irtGUI", "KappaGUI", "magickGUI", "miniGUI", "multibiplotGUI", "TextMiningGUI", "later", "RclusTool", "Rcmdr", "RcmdrMisc", "RcmdrPlugin.aRnova", "RcmdrPlugin.BiclustGUI", "RcmdrPlugin.BWS1", "RcmdrPlugin.BWS2", "RcmdrPlugin.BWS3", "RcmdrPlugin.cpd", "RcmdrPlugin.DCCV", "RcmdrPlugin.DCE", "RcmdrPlugin.depthTools", "RcmdrPlugin.DoE", "RcmdrPlugin.EACSPIR", "RcmdrPlugin.EBM", "RcmdrPlugin.EcoVirtual", "RcmdrPlugin.Export", "RcmdrPlugin.EZR", "RcmdrPlugin.FactoMineR", "RcmdrPlugin.GWRM", "RcmdrPlugin.HH", "RcmdrPlugin.KMggplot2", "RcmdrPlugin.MA", "RcmdrPlugin.MPAStats", "RcmdrPlugin.NMBU", "RcmdrPlugin.orloca", "RcmdrPlugin.PcaRobust", "RcmdrPlugin.RiskDemo", "RcmdrPlugin.RMTCJags", "RcmdrPlugin.ROC", "RcmdrPlugin.sos" , "RcmdrPlugin.survival", "RcmdrPlugin.TeachingDemos", "RcmdrPlugin.TeachStat", "RcmdrPlugin.temis", "RcmdrPlugin.UCA" , "RcmdrPlugin.WorldFlora", "sf", "StratigrapheR", "tcltk2", "TVMM", "uHMM")); library(bincraftR); future::plan("sequential"); options(future.globals.onReference = NULL); process_cran_updates(interval = lubridate::interval(lubridate::today() - 2, lubridate::today() - 2), platform = "${PLATFORM}", process_updated = TRUE, process_new = TRUE)' + - xvfb-run R -q -e 'options(crayon.enabled = TRUE, Ncpus = 4, future.globals.onReference = "error", repos = structure(c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/stable"))); pkgs = tools::CRAN_package_db()[[1]][${BLOCK}]; pkgs = setdiff(pkgs, c("biplotbootGUI", "cncaGUI", "dynBiplotGUI", "ade4TkGUI", "BlockmodelingGUI", "cncaGUI", "EventDetectGUI", "irtGUI", "KappaGUI", "magickGUI", "miniGUI", "multibiplotGUI", "TextMiningGUI", "later", "RclusTool", "Rcmdr", "RcmdrMisc", "RcmdrPlugin.aRnova", "RcmdrPlugin.BiclustGUI", "RcmdrPlugin.BWS1", "RcmdrPlugin.BWS2", "RcmdrPlugin.BWS3", "RcmdrPlugin.cpd", "RcmdrPlugin.DCCV", "RcmdrPlugin.DCE", "RcmdrPlugin.depthTools", "RcmdrPlugin.DoE", "RcmdrPlugin.EACSPIR", "RcmdrPlugin.EBM", "RcmdrPlugin.EcoVirtual", "RcmdrPlugin.Export", "RcmdrPlugin.EZR", "RcmdrPlugin.FactoMineR", "RcmdrPlugin.GWRM", "RcmdrPlugin.HH", "RcmdrPlugin.KMggplot2", "RcmdrPlugin.MA", "RcmdrPlugin.MPAStats", "RcmdrPlugin.NMBU", "RcmdrPlugin.orloca", "RcmdrPlugin.PcaRobust", "RcmdrPlugin.RiskDemo", "RcmdrPlugin.RMTCJags", "RcmdrPlugin.ROC", "RcmdrPlugin.sos" , "RcmdrPlugin.survival", "RcmdrPlugin.TeachingDemos", "RcmdrPlugin.TeachStat", "RcmdrPlugin.temis", "RcmdrPlugin.UCA" , "RcmdrPlugin.WorldFlora", "sf", "StratigrapheR", "tcltk2", "TVMM", "uHMM")); library(bincraftR); future::plan("sequential"); options(progressr.enable = TRUE); progressr::handlers('cli'); progressr::handlers(global = TRUE); options(future.globals.onReference = NULL); process_cran_updates(interval = lubridate::interval(lubridate::today() - 2, lubridate::today() - 2), platform = "${PLATFORM}", process_updated = TRUE, process_new = TRUE)' backend_options: kubernetes: ### PROD diff --git a/.woodpecker/warm_up_build.yaml b/.woodpecker/warm_up_build.yaml index 2a6b876..cb935b2 100644 --- a/.woodpecker/warm_up_build.yaml +++ b/.woodpecker/warm_up_build.yaml @@ -46,7 +46,7 @@ steps: image: busybox:latest failure: ignore commands: - - sleep 200 + - sleep 10 - echo "Warmed Up" backend_options: kubernetes: diff --git a/DESCRIPTION b/DESCRIPTION index bcdb0e9..c2be87e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -17,6 +17,7 @@ Imports: magrittr, pkgbuild, progressr, + progress, stringr, purrr, RPostgres, @@ -30,3 +31,4 @@ Remotes: Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 +SystemRequirements: libgit2 (>= 1.0): libgit2-devel (rpm) or libgit2-dev (deb) diff --git a/Justfile b/Justfile index 95dc044..481ec0a 100644 --- a/Justfile +++ b/Justfile @@ -1,6 +1,10 @@ -image OS: +image OS ARCH: if echo "{{OS}}" | grep -qi "redhat"; then \ docker buildx build --progress plain --build-arg GITHUB_PAT="$GITHUB_PAT" --build-arg RED_HAT_DEV_PW="$RED_HAT_DEV_PW" -f docker/Dockerfile-{{OS}} -t devxygmbh/arm64-binaries-r-{{OS}}:latest --push .; \ else \ - docker buildx build --progress plain --build-arg GITHUB_PAT="$GITHUB_PAT" -f docker/Dockerfile-{{OS}} -t devxygmbh/arm64-binaries-r-{{OS}}:latest --push .; \ - fi \ No newline at end of file + docker buildx build --progress plain --build-arg GITHUB_PAT="$GITHUB_PAT" --build-arg ARCH={{ARCH}} -f docker/Dockerfile-{{OS}} --platform linux/{{ARCH}} -t devxygmbh/{{ARCH}}-binaries-r-{{OS}}:latest --push .; \ + fi + +# e.g. just build jammy arm64 later 1 +build OS ARCH PACKAGE NCPUS: + docker run --rm -it --platform linux/{{ARCH}} -e AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" -e AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" -e PGPASS="$PGPASS" -e NCPUS={{NCPUS}} --pull=always devxygmbh/{{ARCH}}-binaries-r-{{OS}}:latest R -q -e "options(progressr.enable = TRUE); library(future); plan(multisession); progressr::handlers(global = TRUE); progressr::handlers('cli'); bincraftR::build_binary_package(\"{{PACKAGE}}\", build_for_minor=FALSE, debug=FALSE, force=TRUE, deps_verbose = TRUE)" \ No newline at end of file diff --git a/R/build_binaries.R b/R/build_binaries.R index dc3e4be..dc59a3d 100644 --- a/R/build_binaries.R +++ b/R/build_binaries.R @@ -81,16 +81,12 @@ build_binary_package <- function(package_name, tag = NULL, codename = NULL, cli::cli_alert("Building binaries for {.pkg {package_name[[1]]}} with tags {.field {tag}}.") - # Set up the progress handler - # progressr::handlers(global = TRUE) - # progressr::handlers("cli", "debug") + p <- progressr::progressor(along = tag) - # out <- progressr::with_progress({ - # p <- progressr::progressor(along = tag) - future.apply::future_mapply(function(x, y) { + worker_fun <- function(x, y, p) { + p() tryCatch( { - # p() dump <- build_single_tag(x, y, dir_out_bin, local_clone_dir, platform = platform, debug = debug, force = force, install_system_dependencies = install_system_dependencies, @@ -114,9 +110,11 @@ build_binary_package <- function(package_name, tag = NULL, codename = NULL, store_build_metadata(x, y, platform, error_occurred = TRUE, force = TRUE, error = e$stderr) } ) - }, package_name, tag, future.seed = TRUE) + } - # }) + future.apply::future_mapply(worker_fun, package_name, tag, + future.seed = TRUE, MoreArgs = list(p) + ) total_build_time <- round(Sys.time() - t1, 2) cli::cli_alert("Execution time ({.pkg {package_name[[1]]}}) ({length(tag)} tags): {.strong {total_build_time} {units(difftime(Sys.time(), t1))}}.")