Skip to content

Commit 50e73c6

Browse files
committed
ci: Use YAML anchor and aliases for repeated "Checkout" steps
1 parent 74b8068 commit 50e73c6

File tree

1 file changed

+19
-35
lines changed

1 file changed

+19
-35
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ jobs:
108108
CC: ${{ matrix.cc }}
109109

110110
steps:
111-
- name: Checkout
111+
- &checkout
112+
name: Checkout
112113
uses: actions/checkout@v4
113114

114115
- name: CI script
@@ -145,8 +146,7 @@ jobs:
145146
CC: ${{ matrix.cc }}
146147

147148
steps:
148-
- name: Checkout
149-
uses: actions/checkout@v4
149+
- *checkout
150150

151151
- name: CI script
152152
uses: ./.github/actions/run-in-docker-action
@@ -177,8 +177,7 @@ jobs:
177177
CTIMETESTS: 'no'
178178

179179
steps:
180-
- name: Checkout
181-
uses: actions/checkout@v4
180+
- *checkout
182181

183182
- name: CI script
184183
uses: ./.github/actions/run-in-docker-action
@@ -217,8 +216,7 @@ jobs:
217216
CTIMETESTS: 'no'
218217

219218
steps:
220-
- name: Checkout
221-
uses: actions/checkout@v4
219+
- *checkout
222220

223221
- name: CI script
224222
env: ${{ matrix.configuration.env_vars }}
@@ -258,8 +256,7 @@ jobs:
258256
- 'clang-snapshot'
259257

260258
steps:
261-
- name: Checkout
262-
uses: actions/checkout@v4
259+
- *checkout
263260

264261
- name: CI script
265262
uses: ./.github/actions/run-in-docker-action
@@ -290,8 +287,7 @@ jobs:
290287
CTIMETESTS: 'no'
291288

292289
steps:
293-
- name: Checkout
294-
uses: actions/checkout@v4
290+
- *checkout
295291

296292
- name: CI script
297293
uses: ./.github/actions/run-in-docker-action
@@ -352,8 +348,7 @@ jobs:
352348
SECP256K1_TEST_ITERS: 2
353349

354350
steps:
355-
- name: Checkout
356-
uses: actions/checkout@v4
351+
- *checkout
357352

358353
- name: CI script
359354
env: ${{ matrix.env_vars }}
@@ -396,8 +391,7 @@ jobs:
396391
SYMBOL_CHECK: 'no'
397392

398393
steps:
399-
- name: Checkout
400-
uses: actions/checkout@v4
394+
- *checkout
401395

402396
- name: CI script
403397
env: ${{ matrix.configuration.env_vars }}
@@ -447,8 +441,7 @@ jobs:
447441
SYMBOL_CHECK: 'no'
448442

449443
steps:
450-
- name: Checkout
451-
uses: actions/checkout@v4
444+
- *checkout
452445

453446
- name: CI script
454447
env: ${{ matrix.configuration.env_vars }}
@@ -490,8 +483,7 @@ jobs:
490483
HOST: 'i686-w64-mingw32'
491484

492485
steps:
493-
- name: Checkout
494-
uses: actions/checkout@v4
486+
- *checkout
495487

496488
- name: CI script
497489
env: ${{ matrix.configuration.env_vars }}
@@ -531,8 +523,7 @@ jobs:
531523
- BUILD: 'distcheck'
532524

533525
steps:
534-
- name: Checkout
535-
uses: actions/checkout@v4
526+
- *checkout
536527

537528
- name: Install Homebrew packages
538529
run: |
@@ -583,8 +574,7 @@ jobs:
583574
- BUILD: 'distcheck'
584575

585576
steps:
586-
- name: Checkout
587-
uses: actions/checkout@v4
577+
- *checkout
588578

589579
- name: Install Homebrew packages
590580
run: |
@@ -635,8 +625,7 @@ jobs:
635625
cmake_options: '-T ClangCL'
636626

637627
steps:
638-
- name: Checkout
639-
uses: actions/checkout@v4
628+
- *checkout
640629

641630
- name: Generate buildsystem
642631
run: cmake -E env CFLAGS="/WX ${{ matrix.configuration.cpp_flags }}" cmake -B build -DSECP256K1_ENABLE_MODULE_RECOVERY=ON -DSECP256K1_BUILD_EXAMPLES=ON ${{ matrix.configuration.cmake_options }}
@@ -671,8 +660,7 @@ jobs:
671660
runs-on: windows-2022
672661

673662
steps:
674-
- name: Checkout
675-
uses: actions/checkout@v4
663+
- *checkout
676664

677665
- name: Add cl.exe to PATH
678666
uses: ilammy/msvc-dev-cmd@v1
@@ -699,8 +687,7 @@ jobs:
699687
ELLSWIFT: 'yes'
700688

701689
steps:
702-
- name: Checkout
703-
uses: actions/checkout@v4
690+
- *checkout
704691

705692
- name: CI script
706693
uses: ./.github/actions/run-in-docker-action
@@ -718,8 +705,7 @@ jobs:
718705
needs: docker_cache
719706

720707
steps:
721-
- name: Checkout
722-
uses: actions/checkout@v4
708+
- *checkout
723709

724710
- name: CI script
725711
uses: ./.github/actions/run-in-docker-action
@@ -738,8 +724,7 @@ jobs:
738724
options: --user root
739725

740726
steps:
741-
- name: Checkout
742-
uses: actions/checkout@v4
727+
- *checkout
743728

744729
- name: CI script
745730
run: |
@@ -750,8 +735,7 @@ jobs:
750735
runs-on: ubuntu-latest
751736

752737
steps:
753-
- name: Checkout
754-
uses: actions/checkout@v4
738+
- *checkout
755739

756740
- run: ./autogen.sh && ./configure --enable-dev-mode && make distcheck
757741

0 commit comments

Comments
 (0)