refactor(ci): consolidate build-all-versions workflows into 2 files #93
4 changed files with 64 additions and 245 deletions
refactor(ci): consolidate build-all-versions workflows (4 -> 2 files)
Merge the per-arch build-all and install-deps files into one each:
build-all-versions-{amd64,arm64}.yaml -> build-all-versions.yaml
build-all-versions-install-deps-{amd64,arch}.yaml -> build-all-versions-install-deps.yaml
Arch becomes a matrix axis carrying the per-arch agent (artemis/gaia),
BACKEND (kubernetes/docker) and R_PKG_CACHE_DIR. Routing is unchanged: the
existing `task == "build-all-${ARCH}"` selector means
`--var task=build-all-amd64` still runs only the amd64 rows. OS / OS_VERSION /
R_VERSION / K8S_INSTANCE_TYPE are still passed via --var. These pipelines are
manual-only (no cron).
commit
373693f39e
|
|
@ -1,11 +1,23 @@
|
||||||
|
# Consolidated install-deps for build-all (both arches in one file).
|
||||||
|
# Arch is a matrix axis; the existing task selector still routes it:
|
||||||
|
# task == "build-all-amd64" runs the amd64 row, "build-all-arm64" the arm64 row.
|
||||||
|
# OS / OS_VERSION / R_VERSION / K8S_INSTANCE_TYPE are still passed via --var.
|
||||||
when:
|
when:
|
||||||
- event: manual
|
- event: manual
|
||||||
evaluate: 'task == "build-all-arm64"'
|
evaluate: 'task == "build-all-${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'
|
||||||
|
|
@ -1,39 +1,72 @@
|
||||||
### Required extra vars
|
### Required extra vars (passed via --var at manual trigger time)
|
||||||
# ARCH (amd64)
|
# OS (alpine) / OS_VERSION (3.22) / R_VERSION (4.5.3) / K8S_INSTANCE_TYPE (amd64)
|
||||||
# OS (alpine)
|
# Arch is selected by the task name and routed via the matrix:
|
||||||
# OS_VERSION (3.22)
|
# crow pipeline create --var task=build-all-amd64 --var OS=alpine --var OS_VERSION=3.24 --var R_VERSION=4.5.3 --var K8S_INSTANCE_TYPE=... --branch=main 5
|
||||||
# R_VERSION (4.5.3)
|
# crow pipeline create --var task=build-all-arm64 --var OS=alpine --var OS_VERSION=3.24 --var R_VERSION=4.5.3 --branch=main 5
|
||||||
# crow pipeline create --var ARCH=amd64 --var OS=alpine --var OS_VERSION=3.24 --var R_VERSION=4.5.3 --var task=build-all-amd64 --branch=main --log-level=info 5
|
# Skip list lives in local/excluded-packages.json (read by local/build-all.R).
|
||||||
when:
|
when:
|
||||||
- event: manual
|
- event: manual
|
||||||
evaluate: 'task == "build-all-amd64"'
|
evaluate: 'task == "build-all-${ARCH}"'
|
||||||
|
|
||||||
skip_clone: true
|
skip_clone: true
|
||||||
|
|
||||||
labels:
|
labels:
|
||||||
platform: linux/amd64
|
platform: linux/${ARCH}
|
||||||
agent: artemis
|
agent: ${AGENT}
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- SPLIT_INTO: 4
|
- ARCH: amd64
|
||||||
|
AGENT: artemis
|
||||||
|
BACKEND: kubernetes
|
||||||
|
R_PKG_CACHE_DIR: ''
|
||||||
|
SPLIT_INTO: 4
|
||||||
SPLIT_INDEX: 1
|
SPLIT_INDEX: 1
|
||||||
|
- ARCH: amd64
|
||||||
|
AGENT: artemis
|
||||||
BACKEND: kubernetes
|
BACKEND: kubernetes
|
||||||
- SPLIT_INTO: 4
|
R_PKG_CACHE_DIR: ''
|
||||||
|
SPLIT_INTO: 4
|
||||||
SPLIT_INDEX: 2
|
SPLIT_INDEX: 2
|
||||||
|
- ARCH: amd64
|
||||||
|
AGENT: artemis
|
||||||
BACKEND: kubernetes
|
BACKEND: kubernetes
|
||||||
- SPLIT_INTO: 4
|
R_PKG_CACHE_DIR: ''
|
||||||
|
SPLIT_INTO: 4
|
||||||
SPLIT_INDEX: 3
|
SPLIT_INDEX: 3
|
||||||
|
- ARCH: amd64
|
||||||
|
AGENT: artemis
|
||||||
BACKEND: kubernetes
|
BACKEND: kubernetes
|
||||||
- SPLIT_INTO: 4
|
R_PKG_CACHE_DIR: ''
|
||||||
|
SPLIT_INTO: 4
|
||||||
|
SPLIT_INDEX: 4
|
||||||
|
- ARCH: arm64
|
||||||
|
AGENT: gaia
|
||||||
|
BACKEND: docker
|
||||||
|
R_PKG_CACHE_DIR: /mnt/cache/pkgcache
|
||||||
|
SPLIT_INTO: 4
|
||||||
|
SPLIT_INDEX: 1
|
||||||
|
- ARCH: arm64
|
||||||
|
AGENT: gaia
|
||||||
|
BACKEND: docker
|
||||||
|
R_PKG_CACHE_DIR: /mnt/cache/pkgcache
|
||||||
|
SPLIT_INTO: 4
|
||||||
|
SPLIT_INDEX: 2
|
||||||
|
- ARCH: arm64
|
||||||
|
AGENT: gaia
|
||||||
|
BACKEND: docker
|
||||||
|
R_PKG_CACHE_DIR: /mnt/cache/pkgcache
|
||||||
|
SPLIT_INTO: 4
|
||||||
|
SPLIT_INDEX: 3
|
||||||
|
- ARCH: arm64
|
||||||
|
AGENT: gaia
|
||||||
|
BACKEND: docker
|
||||||
|
R_PKG_CACHE_DIR: /mnt/cache/pkgcache
|
||||||
|
SPLIT_INTO: 4
|
||||||
SPLIT_INDEX: 4
|
SPLIT_INDEX: 4
|
||||||
BACKEND: kubernetes
|
|
||||||
# - SPLIT_INTO: 4
|
|
||||||
# SPLIT_INDEX: 5
|
|
||||||
# BACKEND: kubernetes
|
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-all-versions-install-deps-amd64
|
- build-all-versions-install-deps
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 'Build binaries'
|
- name: 'Build binaries'
|
||||||
|
|
@ -55,7 +88,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: ''
|
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
|
||||||
|
|
@ -64,8 +97,6 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
||||||
- 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
|
||||||
# Windows-only: 'RInno', 'KeyboardSimulator', 'R2PPT', 'RWinEdt', 'blatr', 'excel.link', 'spectrino', 'taskscheduleR', 'MDSGUI', 'BiplotGUI', 'R2wd', 'rFUSION', 'MediaNews', 'rFUSION', 'MediaNews'
|
|
||||||
# pkgs = readRDS('/mnt/cache/pkgs_amd64.rds');
|
|
||||||
- XVFB=$(command -v xwfb-run 2>/dev/null || command -v xvfb-run); XVFB_ARGS=""; if command -v xwfb-run >/dev/null 2>&1; then dnf install -y -q weston 2>/dev/null; XVFB_ARGS="-c weston"; fi
|
- XVFB=$(command -v xwfb-run 2>/dev/null || command -v xvfb-run); XVFB_ARGS=""; if command -v xwfb-run >/dev/null 2>&1; then dnf install -y -q weston 2>/dev/null; XVFB_ARGS="-c weston"; fi
|
||||||
- $XVFB $XVFB_ARGS -n $SPLIT_INDEX -- /opt/R/$R_VERSION/bin/Rscript local/build-all.R $SPLIT_INTO $SPLIT_INDEX $NCPUS 2>&1
|
- $XVFB $XVFB_ARGS -n $SPLIT_INDEX -- /opt/R/$R_VERSION/bin/Rscript local/build-all.R $SPLIT_INTO $SPLIT_INDEX $NCPUS 2>&1
|
||||||
- |
|
- |
|
||||||
Loading…
Reference in a new issue