ci: Turn CentOS config into Alpine musl config #33480

pull maflcko wants to merge 2 commits into bitcoin:master from maflcko:2509-ci-alpine changing 5 files +18 −14
  1. maflcko commented at 12:30 pm on September 25, 2025: member

    Fixes #33437

    Historically, the centos task was added to add CI coverage for old packages and 32-bit depends builds, but both are now covered by different tasks.

    The CentOS task aligns with Ubuntu/Debian CI tasks in terms of libc usage, but (slightly) differs in package naming and update philosophy. I am not aware of the task ever discovering a centos-related issue, so it seems fine to recycle it into an Alpine Linux task.

    The main difference would be that musl libc is now used. Also, busybox is used in Alpine, so in theory the busybox install could be removed from the arm CI task in the future.

    Packaging considerations: All packages should roughly be the same (gcc remains at version 14, python remains at version 3.12, etc). Also, all packages are from the Alpine main track, coming with 2 years of support. The only exception is the py3-pip package (https://pkgs.alpinelinux.org/packages?name=py3-pip&branch=v3.22&repo=&arch=riscv64) from the community track, however, I don’t expect any issues arising from that.

  2. ci: Turn centos config into alpine musl config fa6b2e9efe
  3. DrahtBot added the label Tests on Sep 25, 2025
  4. DrahtBot commented at 12:30 pm on September 25, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33480.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK janb84, willcl-ark
    Concept ACK RandyMcMillan, dergoegge

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #bitcoin-core/gui/896 (rpcconsole: display signet challenge by RandyMcMillan)
    • #33562 (DRAFT: add a freebsd job using systemlibs by willcl-ark)
    • #33514 (Clear out space on GHA jobs by willcl-ark)
    • #31349 (ci: detect outbound internet traffic generated while running tests by vasild)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  5. willcl-ark commented at 12:31 pm on September 25, 2025: member
    Concept ACK
  6. maflcko commented at 2:24 pm on September 25, 2025: member

    Interesting side note: Looks like most unit tests are minimally faster on Alpine, except for the secp tests:

    https://github.com/bitcoin/bitcoin/actions/runs/18007497948/job/51231174310?pr=33480#step:9:3415:

    0148/150 Test   [#4](/bitcoin-bitcoin/4/): secp256k1_noverify_tests .............   Passed   38.88 sec
    1149/150 Test   [#5](/bitcoin-bitcoin/5/): secp256k1_tests ......................   Passed   57.62 sec
    

    https://github.com/bitcoin/bitcoin/actions/runs/18007193787/job/51230198016#step:9:2625 :

    0145/150 Test   [#4](/bitcoin-bitcoin/4/): secp256k1_noverify_tests .............   Passed   12.96 sec
    1148/150 Test   [#5](/bitcoin-bitcoin/5/): secp256k1_tests ......................   Passed   26.79 sec
    
  7. janb84 commented at 2:48 pm on September 25, 2025: contributor
    So Centos as CI task was not added to give good RHEL distro / Enterprise Linux support ?
  8. maflcko commented at 3:18 pm on September 25, 2025: member

    So Centos as CI task was not added to give good RHEL distro / Enterprise Linux support ?

    No, as mentioned in the pull description. For reference, the history was:

    • #17635: Add centos 7 CI to check “old packages”.
    • #17900: Drop the “old packages” and use depends (32-bit).
    • #31651: Use native depends instead of 32-bit.
    • #31593: Bump to stream10, so that even the build system is using recent packages (gcc, cmake, python), to avoid warnings and errors. Also, …
    • #32560: … to be able to run a GCC hardened debug build with a recent GCC.
  9. janb84 commented at 3:54 pm on September 25, 2025: contributor

    Concept ACK fa6b2e9efece2d728bdc257c36c95db03e1a7bc4

    This PR introduces more libc diversity in the CI pipeline (in the form of using Alpine), which is welcome.

    Not completely agreeing with this PR sentence;

    “So basically, the centos task is similar to all the Ubuntu/Debian CI tasks, possibly with some packages named slightly differently. "

    Yes and No; (Risk of being too much of a nitpicker.)

    • Yes from a Libc perspective; Centos is glibc and Debian is also glibc

    • No from a distro philosophy; Ubuntu/Debian and RHEL distro’s are different in philosophy REHL is slower, more enterprise-focused. But do we need it as a CI step ? no as you mentioned, it does not give us new information.

    There for this seems like a good improvement.

    Also thanks for the extensive answer.

  10. maflcko commented at 4:20 pm on September 25, 2025: member

    nitpicker

    No worries. Happy to adjust the pull description, if you have any suggestions I could take over.

  11. maflcko commented at 5:05 pm on September 25, 2025: member

    Also confirmed that the gcc debug mode works on alpine: https://github.com/maflcko/bitcoin-core-with-ci/actions/runs/18013008390/job/51250509812#step:8:2473 :

     0/usr/include/c++/14.2.0/debug/vector:508:
     1In function:
     2    constexpr std::debug::vector<_Tp, _Allocator>::reference std::
     3    debug::vector<_Tp, _Allocator>::operator[](size_type) [with _Tp = 
     4    CTxOut; _Allocator = std::allocator<CTxOut>; reference = CTxOut&; 
     5    size_type = long unsigned int]
     6
     7Error: attempt to subscript container with out-of-bounds index 3, but 
     8container only holds 3 elements.
     9
    10Objects involved in the operation:
    11    sequence "this" @ 0x7fffcfe17008 {
    12      type = std::debug::vector<CTxOut, std::allocator<CTxOut> >;
    13    }
    
  12. janb84 commented at 8:26 am on September 26, 2025: contributor

    nitpicker

    No worries. Happy to adjust the pull description, if you have any suggestions I could take over.

    How about something like this:

    The CentOS task aligns with Ubuntu/Debian CI tasks in terms of libc usage, but (slightly) differs in package naming and update philosophy. I am not aware of the task ever discovering a centos-related issue, so it seems fine to recycle it into an Alpine Linux task.

  13. maflcko commented at 8:29 am on September 26, 2025: member
    thx, edited description
  14. janb84 commented at 8:48 am on September 26, 2025: contributor

    ACK fa6b2e9efece2d728bdc257c36c95db03e1a7bc4

    This PR introduces more libc diversity in the CI pipeline (in the form of using Alpine), which is welcome.

  15. DrahtBot requested review from willcl-ark on Sep 26, 2025
  16. RandyMcMillan commented at 9:08 pm on September 27, 2025: contributor
    Concept ACK
  17. RandyMcMillan commented at 4:01 pm on September 28, 2025: contributor

    tACK


    It may be worth mentioning that this change fixed an issue (I was unable to isolate) on CentOS using HexStr() formatting a custom signetchallenge to display in the rpcconsole.

  18. maflcko commented at 6:08 am on September 29, 2025: member

    It may be worth mentioning that this change fixed an issue (I was unable to isolate) on CentOS using HexStr() formatting a custom signetchallenge to display in the rpcconsole.

    That is unrelated to both this pull request and your pull request, see #33293.

  19. in ci/test/00_setup_env_native_alpine_musl.sh:10 in fa6b2e9efe outdated
     5@@ -6,10 +6,10 @@
     6 
     7 export LC_ALL=C.UTF-8
     8 
     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"
    13+export CONTAINER_NAME=ci_native_alpine_musl
    14+export CI_IMAGE_NAME_TAG="mirror.gcr.io/alpine:3.22"
    


    willcl-ark commented at 9:50 am on September 29, 2025:

    What do you think about setting this to alpine:latest to automatically use new versions? Might give us the occasionaly false positive when the alpine version is auto-bumped, but feels useful to catch musl changes as early as possible?

    Perhaps that’s a jobs for a nightly though…


    maflcko commented at 10:17 am on September 29, 2025:

    Yeah, it is already part of this nightly: https://github.com/maflcko/b-c-nightly/blob/9d6cf19851e57a9717da28c894b5dce6882017ca/.cirrus.yml#L147

    I don’t think it every found something.

    Also, for consistency and reproducibility, I’d prefer to stick with the best-effort-pinned-versions, like in the other CI tasks.

  20. in .github/workflows/ci.yml:481 in fa6b2e9efe
    476@@ -477,11 +477,11 @@ jobs:
    477             timeout-minutes: 120
    478             file-env: './ci/test/00_setup_env_native_previous_releases.sh'
    479 
    480-          - name: 'CentOS, depends, gui'
    481+          - name: 'Alpine (musl), depends, gui'
    482             cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg'
    


    willcl-ark commented at 10:00 am on September 29, 2025:
    I wonder if this needs to be lg any more? Could probably be md I think?

    maflcko commented at 10:17 am on September 29, 2025:
    Sure, pushed a commit
  21. willcl-ark approved
  22. willcl-ark commented at 10:00 am on September 29, 2025: member

    ACK fa6b2e9efece2d728bdc257c36c95db03e1a7bc4

    Alpine/musl feels much more useful to me than a frozen-in-time CentOS build.

    Not tested locally as I’m a bit bandwidth-contrained at the moment, but the code changes and CI look good to me.

  23. ci: Reduce Alpine musl task to md runner size
    Per https://github.com/bitcoin/bitcoin/pull/33480#discussion_r2387381492
    444409ff2b
  24. janb84 commented at 10:48 am on September 29, 2025: contributor

    reACK 444409ff2b78d8f3e541bd6e883af8da7adfd264

    changes since last ACK:

    • changed container size to md. CI still works with this size. ✅
  25. DrahtBot requested review from willcl-ark on Sep 29, 2025
  26. willcl-ark approved
  27. willcl-ark commented at 10:48 am on September 29, 2025: member

    ACK 444409ff2b78d8f3e541bd6e883af8da7adfd264

    This took 29 minutes for an alpine depends, gui build, with no docker/ccache/depends caches (as no merges to master yet) which seems in line with other jobs.

  28. maflcko commented at 3:08 pm on October 2, 2025: member
    Another (tiny) benefit of this pull request is that the task will now finally be able to run on my riscv64 box (modulo the two python wheels)
  29. dergoegge commented at 7:26 am on October 4, 2025: member
    Concept ACK
  30. maflcko requested review from fanquake on Oct 8, 2025
  31. fanquake merged this on Oct 15, 2025
  32. fanquake closed this on Oct 15, 2025

  33. maflcko deleted the branch on Oct 15, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-10-24 09:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me