ci: DRY workflow using anchors #1719

pull hebasto wants to merge 4 commits into bitcoin-core:master from hebasto:250807-yaml-anchors changing 1 files +60 −137
  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. ci: Use YAML anchor and aliases for repeated "Checkout" steps 50e73c6eee
  3. ci: Use YAML anchor and aliases for repeated "Print logs" steps ef3b5144f5
  4. ci, refactor: Generalize use of `matrix.configuration.env_vars` dcaf102fbc
  5. ci: Use YAML anchor and aliases for repeated "CI script" steps 8729f4e190
  6. hebasto force-pushed on Aug 7, 2025
  7. real-or-random added the label ci on Aug 7, 2025
  8. real-or-random added the label tweak/refactor on Aug 7, 2025
  9. 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.

  10. real-or-random requested review from Copilot on Aug 11, 2025
  11. in .github/workflows/ci.yml:137 in 8729f4e190
    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.

  12. in .github/workflows/ci.yml:166 in 8729f4e190
    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.

  13. 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
  14. in .github/workflows/ci.yml:261 in 8729f4e190
    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.

  15. in .github/workflows/ci.yml:623 in 8729f4e190
    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.

  16. real-or-random approved
  17. real-or-random commented at 7:57 am on August 12, 2025: contributor
    utACK 8729f4e190a151576c035b709eff686b1b54eda2

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: 2025-08-30 15:15 UTC

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