refactor(ci): consolidate build-all-versions workflows into 2 files #93
4 changed files with 100 additions and 295 deletions
|
|
@ -1,11 +1,43 @@
|
||||||
|
# Consolidated install-deps for build-all (both arches in one file).
|
||||||
|
# Triggered together with build-all-versions; `target_arch` routes the matrix.
|
||||||
|
# Variables are declared so the manual-run form exposes them (crow #1165);
|
||||||
|
# they are merged with build-all-versions' identical declarations.
|
||||||
|
variables:
|
||||||
|
target_arch:
|
||||||
|
description: "Architecture to build."
|
||||||
|
options:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
default: amd64
|
||||||
|
OS:
|
||||||
|
description: "Base OS image name (e.g. alpine, redhat, ubuntu)."
|
||||||
|
default: alpine
|
||||||
|
OS_VERSION:
|
||||||
|
description: "OS version / image tag (e.g. 3.24, 9, jammy, noble)."
|
||||||
|
default: "3.24"
|
||||||
|
R_VERSION:
|
||||||
|
description: "Primary R version under /opt/R."
|
||||||
|
options:
|
||||||
|
- 4.5.3
|
||||||
|
- 4.4.3
|
||||||
|
default: 4.5.3
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- event: manual
|
- event: manual
|
||||||
evaluate: 'task == "build-all-arm64"'
|
evaluate: 'target_arch == "${ARCH}"'
|
||||||
|
|
||||||
skip_clone: true
|
skip_clone: true
|
||||||
|
|
||||||
labels:
|
labels:
|
||||||
agent: gaia
|
platform: linux/${ARCH}
|
||||||
|
agent: ${AGENT}
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- ARCH: amd64
|
||||||
|
AGENT: artemis
|
||||||
|
- ARCH: arm64
|
||||||
|
AGENT: gaia
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 'Install deps and bincraft'
|
- name: 'Install deps and bincraft'
|
||||||
|
|
@ -41,16 +73,3 @@ steps:
|
||||||
requests:
|
requests:
|
||||||
memory: 5Gi
|
memory: 5Gi
|
||||||
cpu: 1000m
|
cpu: 1000m
|
||||||
kubernetes:
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
memory: 5Gi
|
|
||||||
cpu: 1000m
|
|
||||||
nodeSelector:
|
|
||||||
kubernetes.io/arch: ${ARCH}
|
|
||||||
node.kubernetes.io/instance-type: ${K8S_INSTANCE_TYPE}
|
|
||||||
tolerations:
|
|
||||||
- key: 'CI'
|
|
||||||
operator: 'Equal'
|
|
||||||
value: 'true'
|
|
||||||
effect: 'NoSchedule'
|
|
||||||
|
|
@ -1,55 +1,83 @@
|
||||||
### Required extra vars
|
### Manual full rebuild of all CRAN binaries for one OS/arch.
|
||||||
# ARCH (amd64)
|
# Set the variables below in the manual-run form (or via --var on the CLI).
|
||||||
# OS (alpine)
|
# `target_arch` routes the matrix; OS/OS_VERSION/R_VERSION select the platform
|
||||||
# OS_VERSION (3.22)
|
# image and cache volume. Placement is via the agent label (artemis/gaia).
|
||||||
# R_VERSION (4.5.3)
|
|
||||||
# Skip list lives in local/excluded-packages.json (read by local/build-all.R).
|
# Skip list lives in local/excluded-packages.json (read by local/build-all.R).
|
||||||
# crow pipeline create --var ARCH=arm64 --var OS=alpine --var OS_VERSION=3.24 --var R_VERSION=4.5.3 --var task=build-all-arm64 --branch=main --log-level=info 5
|
variables:
|
||||||
# crow pipeline create --var ARCH=arm64 --var OS=alpine --var OS_VERSION=3.24 --var R_VERSION=4.5.3 --var task=build-all-arm64 --branch=main --log-level=info 5
|
target_arch:
|
||||||
|
description: "Architecture to build."
|
||||||
|
options:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
default: amd64
|
||||||
|
OS:
|
||||||
|
description: "Base OS image name (e.g. alpine, redhat, ubuntu)."
|
||||||
|
default: alpine
|
||||||
|
OS_VERSION:
|
||||||
|
description: "OS version / image tag (e.g. 3.24, 9, jammy, noble)."
|
||||||
|
default: "3.24"
|
||||||
|
R_VERSION:
|
||||||
|
description: "Primary R version under /opt/R."
|
||||||
|
options:
|
||||||
|
- 4.5.3
|
||||||
|
- 4.4.3
|
||||||
|
default: 4.5.3
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- event: manual
|
- event: manual
|
||||||
evaluate: 'task == "build-all-arm64"'
|
evaluate: 'target_arch == "${ARCH}"'
|
||||||
|
|
||||||
skip_clone: true
|
skip_clone: true
|
||||||
|
|
||||||
labels:
|
labels:
|
||||||
agent: gaia
|
platform: linux/${ARCH}
|
||||||
|
agent: ${AGENT}
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# - SPLIT_INTO: 5
|
- ARCH: amd64
|
||||||
# SPLIT_INDEX: 1
|
AGENT: artemis
|
||||||
# BACKEND: kubernetes
|
R_PKG_CACHE_DIR: ''
|
||||||
# - SPLIT_INTO: 5
|
SPLIT_INTO: 4
|
||||||
# SPLIT_INDEX: 2
|
|
||||||
# BACKEND: kubernetes
|
|
||||||
# - SPLIT_INTO: 5
|
|
||||||
# SPLIT_INDEX: 3
|
|
||||||
# BACKEND: kubernetes
|
|
||||||
# - SPLIT_INTO: 5
|
|
||||||
# SPLIT_INDEX: 4
|
|
||||||
# BACKEND: kubernetes
|
|
||||||
# - SPLIT_INTO: 5
|
|
||||||
# SPLIT_INDEX: 5
|
|
||||||
# BACKEND: kubernetes
|
|
||||||
- SPLIT_INTO: 4
|
|
||||||
SPLIT_INDEX: 1
|
SPLIT_INDEX: 1
|
||||||
BACKEND: docker
|
- ARCH: amd64
|
||||||
- SPLIT_INTO: 4
|
AGENT: artemis
|
||||||
|
R_PKG_CACHE_DIR: ''
|
||||||
|
SPLIT_INTO: 4
|
||||||
SPLIT_INDEX: 2
|
SPLIT_INDEX: 2
|
||||||
BACKEND: docker
|
- ARCH: amd64
|
||||||
- SPLIT_INTO: 4
|
AGENT: artemis
|
||||||
|
R_PKG_CACHE_DIR: ''
|
||||||
|
SPLIT_INTO: 4
|
||||||
SPLIT_INDEX: 3
|
SPLIT_INDEX: 3
|
||||||
BACKEND: docker
|
- ARCH: amd64
|
||||||
- SPLIT_INTO: 4
|
AGENT: artemis
|
||||||
|
R_PKG_CACHE_DIR: ''
|
||||||
|
SPLIT_INTO: 4
|
||||||
|
SPLIT_INDEX: 4
|
||||||
|
- ARCH: arm64
|
||||||
|
AGENT: gaia
|
||||||
|
R_PKG_CACHE_DIR: /mnt/cache/pkgcache
|
||||||
|
SPLIT_INTO: 4
|
||||||
|
SPLIT_INDEX: 1
|
||||||
|
- ARCH: arm64
|
||||||
|
AGENT: gaia
|
||||||
|
R_PKG_CACHE_DIR: /mnt/cache/pkgcache
|
||||||
|
SPLIT_INTO: 4
|
||||||
|
SPLIT_INDEX: 2
|
||||||
|
- ARCH: arm64
|
||||||
|
AGENT: gaia
|
||||||
|
R_PKG_CACHE_DIR: /mnt/cache/pkgcache
|
||||||
|
SPLIT_INTO: 4
|
||||||
|
SPLIT_INDEX: 3
|
||||||
|
- ARCH: arm64
|
||||||
|
AGENT: gaia
|
||||||
|
R_PKG_CACHE_DIR: /mnt/cache/pkgcache
|
||||||
|
SPLIT_INTO: 4
|
||||||
SPLIT_INDEX: 4
|
SPLIT_INDEX: 4
|
||||||
BACKEND: docker
|
|
||||||
# - SPLIT_INTO: 5
|
|
||||||
# SPLIT_INDEX: 5
|
|
||||||
# BACKEND: docker
|
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-all-versions-install-deps-arm64
|
- build-all-versions-install-deps
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 'Build binaries'
|
- name: 'Build binaries'
|
||||||
|
|
@ -71,7 +99,7 @@ steps:
|
||||||
# normal env vars
|
# normal env vars
|
||||||
GIT_USER: pat-s
|
GIT_USER: pat-s
|
||||||
# set the location of the 'pkgcache' cache dir which persists the R package dependencies needed to install the packages themselves
|
# set the location of the 'pkgcache' cache dir which persists the R package dependencies needed to install the packages themselves
|
||||||
R_PKG_CACHE_DIR: /mnt/cache/pkgcache
|
R_PKG_CACHE_DIR: ${R_PKG_CACHE_DIR}
|
||||||
R_LIBS_USER: /mnt/cache/R-pkgs
|
R_LIBS_USER: /mnt/cache/R-pkgs
|
||||||
CCACHE_DIR: /mnt/cache/ccache
|
CCACHE_DIR: /mnt/cache/ccache
|
||||||
NCPUS: 2
|
NCPUS: 2
|
||||||
|
|
@ -105,22 +133,6 @@ steps:
|
||||||
limits:
|
limits:
|
||||||
memory: 20Gi
|
memory: 20Gi
|
||||||
cpu: 2000m
|
cpu: 2000m
|
||||||
kubernetes:
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
memory: 5Gi
|
|
||||||
cpu: 1000m
|
|
||||||
limits:
|
|
||||||
memory: 20Gi
|
|
||||||
cpu: 2000m
|
|
||||||
nodeSelector:
|
|
||||||
kubernetes.io/arch: ${ARCH}
|
|
||||||
node.kubernetes.io/instance-type: ${K8S_INSTANCE_TYPE}
|
|
||||||
tolerations:
|
|
||||||
- key: 'CI'
|
|
||||||
operator: 'Equal'
|
|
||||||
value: 'true'
|
|
||||||
effect: 'NoSchedule'
|
|
||||||
- name: 'Upload package indexes'
|
- name: 'Upload package indexes'
|
||||||
image: 'reg.devxy.io/rpkgs/build-env-${OS}:${OS_VERSION}'
|
image: 'reg.devxy.io/rpkgs/build-env-${OS}:${OS_VERSION}'
|
||||||
pull: true
|
pull: true
|
||||||
|
|
@ -148,20 +160,4 @@ steps:
|
||||||
cpu: 1000m
|
cpu: 1000m
|
||||||
limits:
|
limits:
|
||||||
memory: 20Gi
|
memory: 20Gi
|
||||||
cpu: 2000m
|
cpu: 2000m
|
||||||
kubernetes:
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
memory: 5Gi
|
|
||||||
cpu: 1000m
|
|
||||||
limits:
|
|
||||||
memory: 20Gi
|
|
||||||
cpu: 2000m
|
|
||||||
nodeSelector:
|
|
||||||
kubernetes.io/arch: ${ARCH}
|
|
||||||
node.kubernetes.io/instance-type: ${K8S_INSTANCE_TYPE}
|
|
||||||
tolerations:
|
|
||||||
- key: 'CI'
|
|
||||||
operator: 'Equal'
|
|
||||||
value: 'true'
|
|
||||||
effect: 'NoSchedule'
|
|
||||||
Loading…
Reference in a new issue