r-builds/.crow/build.yaml
pat-s a8e38ea55d
Some checks failed
ci/crow/cron/build/7 Pipeline is pending
ci/crow/cron/build/8 Pipeline is pending
ci/crow/cron/build/9 Pipeline is pending
ci/crow/cron/build/10 Pipeline is pending
ci/crow/cron/build/11 Pipeline is pending
ci/crow/cron/build/12 Pipeline is pending
ci/crow/cron/build/13 Pipeline is pending
ci/crow/cron/build/14 Pipeline is pending
ci/crow/cron/build/5 Pipeline was successful
ci/crow/cron/build/4 Pipeline failed
ci/crow/cron/build/6 Pipeline failed
ci/crow/cron/build/2 Pipeline failed
ci/crow/cron/build/1 Pipeline failed
ci/crow/cron/build/3 Pipeline was successful
chore: remove alpine 321, add 323
2025-12-06 12:01:19 +01:00

238 lines
6.7 KiB
YAML

when:
event: [cron, manual]
matrix:
include:
- PLATFORM: rhel-9
PLATFORM_ID: el9
ARCH: arm64
ARCH_ID: aarch64
INSTANCE_TYPE: cax31
- PLATFORM: rhel-9
PLATFORM_ID: el9
ARCH: amd64
ARCH_ID: x86_64
INSTANCE_TYPE: AX42
- PLATFORM: rhel-10
PLATFORM_ID: el10
ARCH: arm64
ARCH_ID: aarch64
INSTANCE_TYPE: cax31
- PLATFORM: rhel-10
PLATFORM_ID: el10
ARCH: amd64
ARCH_ID: x86_64
INSTANCE_TYPE: AX42
- PLATFORM: centos-8
PLATFORM_ID: el8
ARCH: arm64
ARCH_ID: aarch64
INSTANCE_TYPE: cax31
- PLATFORM: centos-8
PLATFORM_ID: el8
ARCH: amd64
ARCH_ID: x86_64
INSTANCE_TYPE: AX42
- PLATFORM: ubuntu-2204
PLATFORM_ID: 2204
ARCH: arm64
ARCH_ID: arm64
INSTANCE_TYPE: cax31
- PLATFORM: ubuntu-2204
PLATFORM_ID: 2204
ARCH: amd64
ARCH_ID: amd64
INSTANCE_TYPE: AX42
- PLATFORM: ubuntu-2404
PLATFORM_ID: 2404
ARCH: arm64
ARCH_ID: arm64
INSTANCE_TYPE: cax31
- PLATFORM: ubuntu-2404
PLATFORM_ID: 2404
ARCH: amd64
ARCH_ID: amd64
INSTANCE_TYPE: AX42
# - PLATFORM: alpine-320
# PLATFORM_ID: alpine320
# ARCH: arm64
# ARCH_ID: aarch64
# INSTANCE_TYPE: cax31
- PLATFORM: alpine-323
PLATFORM_ID: alpine323
ARCH: arm64
ARCH_ID: aarch64
INSTANCE_TYPE: cax31
- PLATFORM: alpine-323
PLATFORM_ID: alpine323
ARCH: amd64
ARCH_ID: x86_64
INSTANCE_TYPE: AX42
- PLATFORM: alpine-322
PLATFORM_ID: alpine322
ARCH: arm64
ARCH_ID: aarch64
INSTANCE_TYPE: cax31
- PLATFORM: alpine-322
PLATFORM_ID: alpine322
ARCH: amd64
ARCH_ID: x86_64
INSTANCE_TYPE: AX42
steps:
# Ensures that we're always using the latest available upstream build chain
# - name: Pull upstream
# image: reg.devxy.io/proxy_cache/library/alpine:3.20
# commands:
# - apk add -q --no-cache git
# - git remote add upstream https://github.com/cynkra/r-builds.git
# - git config --global user.email "you@example.com"
# - git config --global user.name "Your Name"
# - git config pull.ff only
# - git fetch upstream
# - git merge upstream/main --allow-unrelated-histories
#.
- name: Get latest R version
image: reg.devxy.io/proxy_cache/library/alpine:3.23
commands:
- apk add -q --no-cache curl
- curl -s https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/r/r.rb | grep -o 'R-[0-9]*\.[0-9]*\.[0-9]*' | tr -d 'R-' | tr -d '"' | head -n 1 > r-version-to-build.txt
# - echo "4.1.3" > r-version-to-build.txt
- cat r-version-to-build.txt
backend_options:
kubernetes:
resources:
requests:
memory: 50Mi
cpu: 200m
limits:
memory: 200Mi
cpu: 500m
nodeSelector:
kubernetes.io/arch: "${ARCH}"
node.kubernetes.io/instance-type: "${INSTANCE_TYPE}"
tolerations:
- key: "CI"
operator: "Equal"
value: "true"
effect: "NoSchedule"
- name: Check if files for R version already exist in s3
environment:
AWS_ACCESS_KEY_ID:
from_secret: HETZNER_S3_ACCESS_KEY_K3S
AWS_SECRET_ACCESS_KEY:
from_secret: HETZNER_S3_SECRET_KEY_K3S
AWS_ENDPOINT_URL: https://fsn1.your-objectstorage.com
image: reg.devxy.io/proxy_cache/library/alpine:3.23
commands:
- apk add -q --no-cache aws-cli
- |
VERSION=$(cat r-version-to-build.txt)
aws s3 ls s3://devxy-r-builds/${PLATFORM_ID}/ | \
awk -v arch="${ARCH_ID}" -v ver="${VERSION}" \
'$0 ~ arch && $0 ~ ver {print substr($NF, 3, 5)}' > r-version-s3.txt
- cat r-version-s3.txt
backend_options:
kubernetes:
nodeSelector:
kubernetes.io/arch: "${ARCH}"
node.kubernetes.io/instance-type: "${INSTANCE_TYPE}"
tolerations:
- key: "CI"
operator: "Equal"
value: "true"
effect: "NoSchedule"
# ref: https://github.com/woodpecker-ci/woodpecker/discussions/2721
- name: Build
image: reg.devxy.io/proxy_cache/library/alpine:3.23
privileged: true
environment:
DOCKER_HOST: tcp://docker:2375
commands: |
# docker info
if ! grep -qF "$(cat r-version-to-build.txt)" r-version-s3.txt; then
apk add -q --no-cache py3-pip make just aws-cli docker-compose
pip3 install -q b2 --break-system-packages
just build-r-${PLATFORM} $(cat r-version-to-build.txt)
fi
backend_options:
kubernetes:
resources:
requests:
memory: 200Mi
cpu: 500m
limits:
memory: 1000Mi
cpu: 4000m
nodeSelector:
kubernetes.io/arch: "${ARCH}"
node.kubernetes.io/instance-type: "${INSTANCE_TYPE}"
tolerations:
- key: "CI"
operator: "Equal"
value: "true"
effect: "NoSchedule"
- name: Upload to Hetzner S3
image: reg.devxy.io/proxy_cache/woodpeckerci/plugin-s3:1.5.2
pull: true
settings:
bucket: devxy-r-builds
strip_prefix: /tmp/${PLATFORM}/
source: /tmp/${PLATFORM}/*
target: ${PLATFORM_ID}/
region: fsn1
acl: public-read
endpoint: https://fsn1.your-objectstorage.com
access_key:
from_secret: HETZNER_S3_ACCESS_KEY_K3S
secret_key:
from_secret: HETZNER_S3_SECRET_KEY_K3S
overwrite: false
volumes:
- ci-tmp-rwx:/tmp # agent on k8s
# - /tmp:/tmp # agent on VM
backend_options:
kubernetes:
resources:
requests:
memory: 100Mi
cpu: 200m
limits:
memory: 1000Mi
cpu: 1000m
nodeSelector:
kubernetes.io/arch: "${ARCH}"
node.kubernetes.io/instance-type: "${INSTANCE_TYPE}"
tolerations:
- key: "CI"
operator: "Equal"
value: "true"
effect: "NoSchedule"
services:
docker:
environment:
DOCKER_TLS_CERTDIR: ""
image: reg.devxy.io/proxy_cache/library/docker:28-dind
commands:
- mkdir -p /tmp/${PLATFORM}/${ARCH}
- dockerd --tls=false --mtu 1420 --host=tcp://0.0.0.0:2375
privileged: true
ports:
- 2375
volumes:
- ci-tmp-rwx:/tmp # agent on k8s
backend_options:
kubernetes:
nodeSelector:
kubernetes.io/arch: "${ARCH}"
node.kubernetes.io/instance-type: "${INSTANCE_TYPE}"
tolerations:
- key: "CI"
operator: "Equal"
value: "true"
effect: "NoSchedule"