ci: DRY workflow using anchors #1719

pull hebasto wants to merge 6 commits into bitcoin-core:master from hebasto:250807-yaml-anchors changing 2 files +73 −152
  1. hebasto commented at 2:52 PM on August 7, 2025: member

    GHA YAML parser now supports anchors.

    This PR makes use of that support to DRY the workflow code.

  2. hebasto force-pushed on Aug 7, 2025
  3. real-or-random added the label ci on Aug 7, 2025
  4. real-or-random added the label tweak/refactor on Aug 7, 2025
  5. real-or-random commented at 4:25 PM on August 7, 2025: contributor

    Concept ACK

    These files will always be a bit of a mess but this is already much better.

  6. real-or-random requested review from Copilot on Aug 11, 2025
  7. in .github/workflows/ci.yml:137 in 8729f4e190 outdated
     132 | @@ -130,6 +133,8 @@ jobs:
     133 |      strategy:
     134 |        fail-fast: false
     135 |        matrix:
     136 | +        configuration:
     137 | +          - env_vars: {}
    


    Copilot commented at 12:14 PM on August 11, 2025:

    Adding an empty matrix configuration with just 'env_vars: {}' appears to serve no functional purpose for the i686_debian job. This adds unnecessary complexity without providing the matrix benefits that other jobs use.

    
    
  8. in .github/workflows/ci.yml:166 in 8729f4e190 outdated
     173 |  
     174 | +    strategy:
     175 | +      matrix:
     176 | +        configuration:
     177 | +          - env_vars: {}
     178 | +
    


    Copilot commented at 12:14 PM on August 11, 2025:

    Adding an empty matrix configuration with just 'env_vars: {}' appears to serve no functional purpose for the s390x_debian job. This adds unnecessary complexity without providing the matrix benefits that other jobs use.

    
    
  9. Copilot commented at 12:14 PM on August 11, 2025: none

    Pull Request Overview

    This PR introduces YAML anchors to reduce code duplication in the GitHub Actions CI workflow. The changes leverage GitHub Actions' newly added support for YAML anchors to implement the DRY (Don't Repeat Yourself) principle across multiple CI jobs.

    • Defines reusable step anchors for common operations (checkout, CI script execution, log printing)
    • Replaces duplicated step definitions with anchor references across multiple jobs
    • Adds matrix configurations to jobs that previously lacked them for consistency
  10. in .github/workflows/ci.yml:261 in 8729f4e190 outdated
     261 |  
     262 | +    strategy:
     263 | +      matrix:
     264 | +        configuration:
     265 | +          - env_vars: {}
     266 | +
    


    Copilot commented at 12:14 PM on August 11, 2025:

    Adding an empty matrix configuration with just 'env_vars: {}' appears to serve no functional purpose for the ppc64le_debian job. This adds unnecessary complexity without providing the matrix benefits that other jobs use.

    
    
  11. in .github/workflows/ci.yml:623 in 8729f4e190 outdated
     615 | @@ -686,6 +616,11 @@ jobs:
     616 |      runs-on: ubuntu-latest
     617 |      needs: docker_cache
     618 |  
     619 | +    strategy:
     620 | +      matrix:
     621 | +        configuration:
     622 | +          - env_vars: {}
     623 | +
    


    Copilot commented at 12:14 PM on August 11, 2025:

    Adding an empty matrix configuration with just 'env_vars: {}' appears to serve no functional purpose for the cpp_gcc_debian job. This adds unnecessary complexity without providing the matrix benefits that other jobs use.

    
    
  12. real-or-random approved
  13. real-or-random commented at 7:57 AM on August 12, 2025: contributor

    utACK 8729f4e190a151576c035b709eff686b1b54eda2

  14. real-or-random commented at 8:56 AM on October 14, 2025: contributor

    needs rebase

  15. ci: Use YAML anchor and aliases for repeated "Checkout" steps 574c2f3080
  16. ci: Bump `actions/checkout` version
    See https://github.com/actions/checkout/releases.
    a889cd93df
  17. ci: Use YAML anchor and aliases for repeated "Print logs" steps 4b644da199
  18. hebasto force-pushed on Oct 14, 2025
  19. ci, refactor: Generalize use of `matrix.configuration.env_vars` dff1bc107d
  20. ci: Use YAML anchor and aliases for repeated "CI script" steps 1decc49a1f
  21. ci: Drop default for `inputs.command` in `run-in-docker-action`
    This change decreases coupling.
    15d014804e
  22. hebasto force-pushed on Oct 14, 2025
  23. hebasto commented at 11:35 AM on October 14, 2025: member

    needs rebase

    Rebased.

    Additionally, the following changes have been made:

    1. Updated anchor names to use the ALL_CAPS style, matching Bitcoin Core.
    2. Added commit "ci: Bump actions/checkout version".
    3. Added commit "ci: Drop default for inputs.command in run-in-docker-action". See: #1756 (review).
  24. real-or-random approved
  25. real-or-random commented at 7:18 PM on October 14, 2025: contributor

    utACK 15d014804e5927b0f9dd8ed4fdc0be2a45f74e24

  26. real-or-random merged this on Oct 14, 2025
  27. real-or-random closed this on Oct 14, 2025

  28. hebasto deleted the branch on Oct 14, 2025
  29. fanquake referenced this in commit 3cbf7cb3e6 on Oct 15, 2025
  30. Fabcien referenced this in commit 256861f4ce on Feb 4, 2026
  31. Fabcien referenced this in commit 4b0569f6a3 on Feb 4, 2026
  32. Sjors referenced this in commit d5660d3a13 on Feb 16, 2026
  33. github-actions[bot] referenced this in commit c3f80fff5f on Mar 1, 2026
  34. github-actions[bot] referenced this in commit 4aeff8400e on Mar 1, 2026
  35. github-actions[bot] referenced this in commit 5f15eb0c55 on Mar 1, 2026
  36. 0x000000000019d6689c085ae165831e934ff76 referenced this in commit d54574beca on Mar 2, 2026
  37. csjones referenced this in commit fb3e16af04 on Mar 2, 2026
  38. real-or-random referenced this in commit 56751a4cf0 on Mar 2, 2026
  39. 0x000000000019d6689c085ae165831e934ff76 referenced this in commit 924c279a64 on Mar 2, 2026
  40. csjones referenced this in commit bf90997db1 on Mar 2, 2026
  41. vmta referenced this in commit 1ddc2f947f on Apr 26, 2026
  42. vmta referenced this in commit 56c40fe100 on Apr 27, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 06:52 UTC