add alpine
This commit is contained in:
parent
2c00a55f5b
commit
6564fd499f
7 changed files with 144 additions and 15 deletions
|
|
@ -13,6 +13,8 @@ matrix:
|
||||||
PLATFORM_ID: 2404
|
PLATFORM_ID: 2404
|
||||||
- PLATFORM: opensuse-155
|
- PLATFORM: opensuse-155
|
||||||
PLATFORM_ID: suse155
|
PLATFORM_ID: suse155
|
||||||
|
- PLATFORM: alpine-320
|
||||||
|
PLATFORM_ID: alpine320
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Ensures that we're always using the latest available upstream build chain
|
# Ensures that we're always using the latest available upstream build chain
|
||||||
|
|
@ -33,7 +35,7 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- apk add -q --no-cache curl
|
- 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 '"' > r-release-version.txt
|
- 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 '"' > r-release-version.txt
|
||||||
# - echo "3.6.3" > r-release-version.txt
|
# - echo "4.3.3" > r-release-version.txt
|
||||||
- cat r-release-version.txt
|
- cat r-release-version.txt
|
||||||
backend_options:
|
backend_options:
|
||||||
kubernetes:
|
kubernetes:
|
||||||
|
|
@ -50,14 +52,14 @@ steps:
|
||||||
- name: Check if files for R version already exist in s3
|
- name: Check if files for R version already exist in s3
|
||||||
environment:
|
environment:
|
||||||
AWS_ACCESS_KEY_ID:
|
AWS_ACCESS_KEY_ID:
|
||||||
from_secret: b2_application_key_id
|
from_secret: aws_access_key_id
|
||||||
AWS_SECRET_ACCESS_KEY:
|
AWS_SECRET_ACCESS_KEY:
|
||||||
from_secret: b2_application_key
|
from_secret: aws_secret_access_key
|
||||||
AWS_ENDPOINT_URL: https://s3.eu-central-003.backblazeb2.com
|
AWS_REGION: eu-central-2
|
||||||
image: alpine:3.20
|
image: alpine:3.20
|
||||||
commands:
|
commands:
|
||||||
- apk add -q --no-cache aws-cli
|
- apk add -q --no-cache aws-cli
|
||||||
- aws s3 ls s3://devxy-r-builds/${PLATFORM_ID}/ | tail -1 | awk '{print $NF}' | cut -c 3-7 > r_build_latest.txt
|
- aws s3 ls s3://devxy-rbuilds/${PLATFORM_ID}/ | tail -1 | awk '{print $NF}' | cut -c 3-7 > r_build_latest.txt
|
||||||
- cat r_build_latest.txt
|
- cat r_build_latest.txt
|
||||||
backend_options:
|
backend_options:
|
||||||
kubernetes:
|
kubernetes:
|
||||||
|
|
@ -100,23 +102,23 @@ steps:
|
||||||
# - /tmp:/tmp # agent on VM
|
# - /tmp:/tmp # agent on VM
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
image: pats22/s3-plugin:latest
|
image: woodpeckerci/plugin-s3:1.3.0
|
||||||
pull: true
|
pull: true
|
||||||
settings:
|
settings:
|
||||||
bucket: devxy-r-builds
|
bucket: devxy-rbuilds
|
||||||
strip_prefix: /tmp/${PLATFORM}/
|
strip_prefix: /tmp/${PLATFORM}/
|
||||||
source: /tmp/${PLATFORM}/*
|
source: /tmp/${PLATFORM}/*
|
||||||
target: ${PLATFORM_ID}/
|
target: ${PLATFORM_ID}/
|
||||||
region: eu-central-003
|
region: eu-central-2
|
||||||
acl: public-read
|
# acl: public-read
|
||||||
access_key:
|
access_key:
|
||||||
from_secret: b2_application_key_id
|
from_secret: aws_access_key_id
|
||||||
secret_key:
|
secret_key:
|
||||||
from_secret: b2_application_key
|
from_secret: aws_secret_access_key
|
||||||
endpoint: s3.eu-central-003.backblazeb2.com
|
# endpoint: s3.eu-central-003.backblazeb2.com
|
||||||
overwrite: false
|
overwrite: false
|
||||||
volumes:
|
volumes:
|
||||||
- ci-tmp-fsn1:/tmp # agent on k8s
|
- ci-tmp-rwx:/tmp # agent on k8s
|
||||||
# - /tmp:/tmp # agent on VM
|
# - /tmp:/tmp # agent on VM
|
||||||
backend_options:
|
backend_options:
|
||||||
kubernetes:
|
kubernetes:
|
||||||
|
|
@ -140,8 +142,9 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- 2375
|
- 2375
|
||||||
volumes:
|
volumes:
|
||||||
- ci-tmp-fsn1:/tmp # agent on k8s
|
- ci-tmp-rwx:/tmp # agent on k8s
|
||||||
backend_options:
|
backend_options:
|
||||||
kubernetes:
|
kubernetes:
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
|
kubernetes.io/arch: "arm64"
|
||||||
topology.kubernetes.io/region: fsn1
|
topology.kubernetes.io/region: fsn1
|
||||||
|
|
|
||||||
5
Justfile
5
Justfile
|
|
@ -22,3 +22,8 @@ build-r-opensuse-155 R_VERSION:
|
||||||
export PLATFORM=opensuse-155; \
|
export PLATFORM=opensuse-155; \
|
||||||
export R_VERSION={{R_VERSION}}; \
|
export R_VERSION={{R_VERSION}}; \
|
||||||
make build-r-$PLATFORM
|
make build-r-$PLATFORM
|
||||||
|
|
||||||
|
build-r-alpine-320 R_VERSION:
|
||||||
|
export PLATFORM=alpine-320; \
|
||||||
|
export R_VERSION={{R_VERSION}}; \
|
||||||
|
make build-r-$PLATFORM
|
||||||
|
|
|
||||||
2
Makefile
2
Makefile
|
|
@ -1,4 +1,4 @@
|
||||||
PLATFORMS := ubuntu-2004 ubuntu-2204 ubuntu-2404 debian-10 debian-11 debian-12 centos-7 centos-8 rhel-9 opensuse-155 fedora-38 fedora-39 fedora-40
|
PLATFORMS := ubuntu-2004 ubuntu-2204 ubuntu-2404 debian-10 debian-11 debian-12 centos-7 centos-8 rhel-9 opensuse-155 fedora-38 fedora-39 fedora-40 alpine-320
|
||||||
SLS_BINARY ?= ./node_modules/serverless/bin/serverless.js
|
SLS_BINARY ?= ./node_modules/serverless/bin/serverless.js
|
||||||
|
|
||||||
deps:
|
deps:
|
||||||
|
|
|
||||||
7
build.sh
7
build.sh
|
|
@ -20,3 +20,10 @@ export PLATFORM=rhel-9
|
||||||
export R_VERSION=4.3.3
|
export R_VERSION=4.3.3
|
||||||
|
|
||||||
make build-r-$PLATFORM
|
make build-r-$PLATFORM
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export PLATFORM=alpine
|
||||||
|
export R_VERSION=4.3.3
|
||||||
|
|
||||||
|
make build-r-$PLATFORM
|
||||||
|
|
|
||||||
28
builder/Dockerfile.alpine-320
Normal file
28
builder/Dockerfile.alpine-320
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
FROM alpine:3.20
|
||||||
|
|
||||||
|
ENV OS_IDENTIFIER alpine-320
|
||||||
|
|
||||||
|
RUN set -x \
|
||||||
|
&& apk add -q R-dev curl ca-certificates bash g++ tzdata openjdk17 texmf-dist texlive-full tar sed patch
|
||||||
|
|
||||||
|
# Install AWS CLI
|
||||||
|
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip" && \
|
||||||
|
unzip awscliv2.zip && \
|
||||||
|
./aws/install && \
|
||||||
|
rm -rf aws awscliv2.zip
|
||||||
|
|
||||||
|
RUN curl -LO "https://github.com/goreleaser/nfpm/releases/download/v2.39.0/nfpm_2.39.0_$(arch).apk" && \
|
||||||
|
apk add --allow-untrusted "./nfpm_2.39.0_$(arch).apk" && \
|
||||||
|
rm "nfpm_2.39.0_$(arch).apk"
|
||||||
|
|
||||||
|
RUN chmod 0777 /opt
|
||||||
|
|
||||||
|
# Override the default pager used by R
|
||||||
|
ENV PAGER /usr/bin/pager
|
||||||
|
|
||||||
|
ENV CONFIGURE_OPTIONS "--enable-R-shlib --with-tcltk --enable-memory-profiling --with-x=no --with-blas --with-lapack"
|
||||||
|
|
||||||
|
COPY package.alpine-320 /package.sh
|
||||||
|
COPY build.sh .
|
||||||
|
COPY patches /patches
|
||||||
|
ENTRYPOINT ./build.sh
|
||||||
|
|
@ -35,6 +35,18 @@ services:
|
||||||
image: r-builds:ubuntu-2404
|
image: r-builds:ubuntu-2404
|
||||||
volumes:
|
volumes:
|
||||||
- /tmp/ubuntu-2404:/tmp/output/ubuntu-2404
|
- /tmp/ubuntu-2404:/tmp/output/ubuntu-2404
|
||||||
|
alpine-320:
|
||||||
|
command: ./build.sh
|
||||||
|
environment:
|
||||||
|
- R_VERSION=${R_VERSION}
|
||||||
|
- R_INSTALL_PATH=${R_INSTALL_PATH}
|
||||||
|
- LOCAL_STORE=/tmp/output
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile.alpine-320
|
||||||
|
image: r-builds:alpine-320
|
||||||
|
volumes:
|
||||||
|
- /tmp/alpine-320:/tmp/output/alpine-320
|
||||||
debian-10:
|
debian-10:
|
||||||
command: ./build.sh
|
command: ./build.sh
|
||||||
environment:
|
environment:
|
||||||
|
|
|
||||||
74
builder/package.alpine-320
Normal file
74
builder/package.alpine-320
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ ! -d /tmp/output/${OS_IDENTIFIER} ]]; then
|
||||||
|
mkdir -p "/tmp/output/${OS_IDENTIFIER}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# R 3.x requires PCRE1. On Ubuntu 24, R 3.x also requires PCRE2 for Pango support.
|
||||||
|
pcre_libs='- pcre2-dev'
|
||||||
|
if [[ "${R_VERSION}" =~ ^3 ]]; then
|
||||||
|
pcre_libs='- pcre2-dev
|
||||||
|
- libpcre3-dev'
|
||||||
|
fi
|
||||||
|
|
||||||
|
deflate_libs='# - libdeflate-dev'
|
||||||
|
if grep -q '^LIBS *=.*[-]ldeflate' ${R_INSTALL_PATH}/lib/R/etc/Makeconf; then
|
||||||
|
deflate_libs='- libdeflate-dev'
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat <<EOF > /tmp/nfpm.yml
|
||||||
|
name: r-${R_VERSION}
|
||||||
|
version: 1
|
||||||
|
version_schema: none
|
||||||
|
section: universe/math
|
||||||
|
priority: optional
|
||||||
|
arch: $(arch)
|
||||||
|
maintainer: Posit Software, PBC <https://github.com/rstudio/r-builds>
|
||||||
|
description: |
|
||||||
|
GNU R statistical computation and graphics system
|
||||||
|
vendor: Posit Software, PBC
|
||||||
|
homepage: https://www.r-project.org
|
||||||
|
license: GPL-2
|
||||||
|
depends:
|
||||||
|
- g++
|
||||||
|
- gcc
|
||||||
|
- gfortran
|
||||||
|
- libbz2
|
||||||
|
# - libc6
|
||||||
|
- cairo
|
||||||
|
- libcurl
|
||||||
|
${deflate_libs}
|
||||||
|
# - libglib2.0-0t64
|
||||||
|
# - libgomp1
|
||||||
|
- icu-dev
|
||||||
|
- jpeg-dev
|
||||||
|
# - liblzma-dev
|
||||||
|
- openblas-dev
|
||||||
|
- pango
|
||||||
|
# - libpangocairo-1.0-0
|
||||||
|
- libpaper
|
||||||
|
${pcre_libs}
|
||||||
|
- libpng-dev
|
||||||
|
- readline-dev
|
||||||
|
- tcl
|
||||||
|
- tiff-dev
|
||||||
|
- libtirpc-dev
|
||||||
|
- tk
|
||||||
|
# - libx11-6
|
||||||
|
# - libxt6t64
|
||||||
|
- make
|
||||||
|
# - ucf
|
||||||
|
- unzip
|
||||||
|
- zip
|
||||||
|
- zlib-ng-dev
|
||||||
|
contents:
|
||||||
|
- src: ${R_INSTALL_PATH}
|
||||||
|
dst: ${R_INSTALL_PATH}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
nfpm package \
|
||||||
|
-f /tmp/nfpm.yml \
|
||||||
|
-p apk \
|
||||||
|
-t "/tmp/output/${OS_IDENTIFIER}"
|
||||||
|
|
||||||
|
export PKG_FILE=$(ls /tmp/output/${OS_IDENTIFIER}/r-${R_VERSION}*.apk | head -1)
|
||||||
Loading…
Reference in a new issue