Skip to content

Commit c5b9f67

Browse files
MarcoFalkeRandyMcMillan
authored andcommitted
ci: Turn centos config into alpine musl config
1 parent f9e77ca commit c5b9f67

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,11 +509,11 @@ jobs:
509509
timeout-minutes: 120
510510
file-env: './ci/test/00_setup_env_native_previous_releases.sh'
511511

512-
- name: 'CentOS, depends, gui'
512+
- name: 'Alpine (musl), depends, gui'
513513
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg'
514514
fallback-runner: 'ubuntu-24.04'
515515
timeout-minutes: 120
516-
file-env: './ci/test/00_setup_env_native_centos.sh'
516+
file-env: './ci/test/00_setup_env_native_alpine_musl.sh'
517517

518518
- name: 'tidy'
519519
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md'

ci/test/00_setup_env_native_centos.sh renamed to ci/test/00_setup_env_native_alpine_musl.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
export LC_ALL=C.UTF-8
88

9-
export CONTAINER_NAME=ci_native_centos
10-
export CI_IMAGE_NAME_TAG="quay.io/centos/centos:stream10"
11-
export CI_BASE_PACKAGES="gcc-c++ glibc-devel libstdc++-devel ccache make ninja-build git python3 python3-pip which patch xz procps-ng rsync coreutils bison e2fsprogs cmake dash"
12-
export PIP_PACKAGES="pyzmq pycapnp"
9+
export CONTAINER_NAME=ci_native_alpine_musl
10+
export CI_IMAGE_NAME_TAG="mirror.gcr.io/alpine:3.22"
11+
export CI_BASE_PACKAGES="build-base musl-dev pkgconf curl ccache make ninja git python3 py3-pip which patch xz procps rsync util-linux bison e2fsprogs cmake dash linux-headers"
12+
export PIP_PACKAGES="--break-system-packages pyzmq pycapnp"
1313
export DEP_OPTS="DEBUG=1"
1414
export GOAL="install"
1515
export BITCOIN_CONFIG="\

ci/test/01_base_install.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,17 @@ if [ -n "${APT_LLVM_V}" ]; then
3232
)
3333
fi
3434

35-
if [[ $CI_IMAGE_NAME_TAG == *centos* ]]; then
36-
bash -c "dnf -y install epel-release"
37-
# The ninja-build package is available in the CRB repository.
38-
bash -c "dnf -y --allowerasing --enablerepo crb install $CI_BASE_PACKAGES $PACKAGES"
35+
if [[ $CI_IMAGE_NAME_TAG == *alpine* ]]; then
36+
${CI_RETRY_EXE} apk update
37+
# shellcheck disable=SC2086
38+
${CI_RETRY_EXE} apk add --no-cache $CI_BASE_PACKAGES $PACKAGES
3939
elif [ "$CI_OS_NAME" != "macos" ]; then
4040
if [[ -n "${APPEND_APT_SOURCES_LIST}" ]]; then
4141
echo "${APPEND_APT_SOURCES_LIST}" >> /etc/apt/sources.list
4242
fi
4343
${CI_RETRY_EXE} apt-get update
44-
${CI_RETRY_EXE} bash -c "apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $CI_BASE_PACKAGES"
44+
# shellcheck disable=SC2086
45+
${CI_RETRY_EXE} apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $CI_BASE_PACKAGES
4546
fi
4647

4748
if [ -n "${APT_LLVM_V}" ]; then

ci/test/03_test_script.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ else
9999
fi
100100

101101
if [ -z "$NO_DEPENDS" ]; then
102-
if [[ $CI_IMAGE_NAME_TAG == *centos* ]]; then
103-
SHELL_OPTS="CONFIG_SHELL=/bin/dash"
102+
if [[ $CI_IMAGE_NAME_TAG == *alpine* ]]; then
103+
SHELL_OPTS="CONFIG_SHELL=/usr/bin/dash"
104104
else
105105
SHELL_OPTS="CONFIG_SHELL="
106106
fi

ci/test_imagefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@ ENV BASE_ROOT_DIR=${BASE_ROOT_DIR}
1717
COPY ./ci/retry/retry /usr/bin/retry
1818
COPY ./ci/test/00_setup_env.sh ./${FILE_ENV} ./ci/test/01_base_install.sh /ci_container_base/ci/test/
1919

20+
# Bash is required, so install it when missing
21+
RUN sh -c "bash -c 'true' || ( apk update && apk add --no-cache bash )"
22+
2023
RUN ["bash", "-c", "cd /ci_container_base/ && set -o errexit && source ./ci/test/00_setup_env.sh && ./ci/test/01_base_install.sh"]

0 commit comments

Comments
 (0)