Skip to content

Commit b22c3ac

Browse files
committed
ci: Test Windows binaries with both enabled/disabled ext. signer support
1 parent fd4c6a1 commit b22c3ac

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,23 @@ jobs:
117117
key: ${{ github.job }}-ccache-${{ github.run_id }}
118118

119119
win64-native:
120-
name: 'Win64 native, VS 2022'
120+
name: ${{ matrix.config.name }}
121121
# Use latest image, but hardcode version to avoid silent upgrades (and breaks).
122122
# See: https://github.com/actions/runner-images#available-images.
123123
runs-on: windows-2022
124124

125125
# No need to run on the read-only mirror, unless it is a PR.
126126
if: github.repository != 'bitcoin-core/gui' || github.event_name == 'pull_request'
127127

128+
strategy:
129+
fail-fast: false
130+
matrix:
131+
config:
132+
- name: 'Win64, VS 2022 (ext.signer=ON)'
133+
external_signer_enabled: true
134+
- name: 'Win64, VS 2022 (ext.signer=OFF)'
135+
external_signer_enabled: false
136+
128137
env:
129138
CCACHE_MAXSIZE: '200M'
130139
CI_CCACHE_VERSION: '4.7.5'
@@ -252,6 +261,13 @@ jobs:
252261
- name: Generate project files
253262
run: py -3 build_msvc\msvc-autogen.py
254263

264+
- name: Disable external signer support
265+
if: ${{ !matrix.config.external_signer_enabled }}
266+
run: |
267+
Get-Content "src\config\bitcoin-config.h" | Where-Object {$_ -notmatch 'external\ signer\ support|ENABLE_EXTERNAL_SIGNER'} | Set-Content "${{ runner.temp }}\bitcoin-config.h"
268+
Remove-Item "src\config\bitcoin-config.h"
269+
Move-Item "${{ runner.temp }}\bitcoin-config.h" "src\config\bitcoin-config.h"
270+
255271
- name: Build
256272
shell: cmd
257273
run: |
@@ -263,7 +279,7 @@ jobs:
263279

264280
- name: Save Ccache cache
265281
uses: actions/cache/save@v3
266-
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
282+
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true' && matrix.config.external_signer_enabled
267283
with:
268284
path: ~/AppData/Local/ccache
269285
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache

0 commit comments

Comments
 (0)