require setting platform variable

This commit is contained in:
Patrick Schratz 2024-07-30 22:27:34 +02:00
commit 836c9b9b62
Signed by: pat-s
GPG key ID: 3C6318841EF78925
2 changed files with 6 additions and 12 deletions

View file

@ -5,18 +5,12 @@ skip_clone: true
matrix: matrix:
include: include:
# - PLATFORM: rhel-9 - PLATFORM: redhat-9
# BLOCK: 1096:3000 BLOCK: 1:1000
# - PLATFORM: rhel-8 - PLATFORM: redhat-8
# BLOCK: 1:1000 BLOCK: 1:1000
- PLATFORM: ubuntu-2404 - PLATFORM: ubuntu-2404
BLOCK: 1:1000 BLOCK: 1:1000
# - PLATFORM: ubuntu-2204
# PLATFORM_ID: 2204
# - PLATFORM: ubuntu-2404
# PLATFORM_ID: 2404
# - PLATFORM: opensuse-155
# PLATFORM_ID: suse155
steps: steps:
- name: "Build binaries (${PLATFORM}: ${BLOCK})" - name: "Build binaries (${PLATFORM}: ${BLOCK})"
secrets: [red_hat_dev_pw, aws_access_key_id, aws_secret_access_key, pgpass, git_ro_token] secrets: [red_hat_dev_pw, aws_access_key_id, aws_secret_access_key, pgpass, git_ro_token]
@ -46,7 +40,7 @@ steps:
# more complicated system dependencies which pak cannot resolve # more complicated system dependencies which pak cannot resolve
- mkdir -p /mnt/cache/pkgcache /mnt/cache/R-pkgs /mnt/cache/ccache /mnt/cache/packages - 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 # 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 = 6, 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}]; library(rBinaries); future::plan("multisession", workers = 6, rscript_startup = quote(options(crayon.enabled = TRUE))); foo = lapply(pkgs, function(x) build_binary_package(x, build_for_minor=FALSE, debug = FALSE, force = TRUE))' - R -q -e 'options(crayon.enabled = TRUE, Ncpus = 6, 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}]; library(rBinaries); future::plan("multisession", workers = 6, rscript_startup = quote(options(crayon.enabled = TRUE))); foo = lapply(pkgs, function(x) build_binary_package(x, build_for_minor=FALSE, debug = FALSE, force = TRUE, platform = ${PLATFORM}))'
backend_options: backend_options:
kubernetes: kubernetes:
### PROD ### PROD

View file

@ -11,7 +11,7 @@ build_binary_package <- function(package_name, tag = NULL, codename = NULL,
r_minor_version = NULL, build_for_minor = TRUE, r_minor_version = NULL, build_for_minor = TRUE,
local_build_root = "/root", local_build_root = "/root",
local_clone_dir = "/tmp", local_clone_dir = "/tmp",
platform = "redhat-9", platform = NULL,
install_system_dependencies = TRUE, install_system_dependencies = TRUE,
debug = FALSE, debug = FALSE,
force = FALSE) { force = FALSE) {