Skip to content

Commit 98a4304

Browse files
committed
ci: Use bash by default for all platforms
This change enforces fail-fast behavior for all platforms. See: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
1 parent 257fd27 commit 98a4304

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

.github/workflows/ci.yml

+18-11
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ env:
2121
CI_FAILFAST_TEST_LEAVE_DANGLING: 1 # GHA does not care about dangling processes and setting this variable avoids killing the CI script itself on error
2222
MAKEJOBS: '-j10'
2323

24+
defaults:
25+
run:
26+
# Enforce fail-fast behavior for all platforms.
27+
# See: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
28+
shell: bash
29+
2430
jobs:
2531
test-each-commit:
2632
name: 'test each commit'
@@ -185,6 +191,7 @@ jobs:
185191
arch: x64
186192

187193
- name: Get tool information
194+
shell: pwsh
188195
run: |
189196
cmake -version | Tee-Object -FilePath "cmake_version"
190197
Write-Output "---"
@@ -194,6 +201,7 @@ jobs:
194201
Write-Host "PowerShell version $($PSVersionTable.PSVersion.ToString())"
195202
196203
- name: Using vcpkg with MSBuild
204+
shell: pwsh
197205
run: |
198206
Set-Location "$env:VCPKG_INSTALLATION_ROOT"
199207
Add-Content -Path "triplets\x64-windows.cmake" -Value "set(VCPKG_BUILD_TYPE release)"
@@ -213,8 +221,8 @@ jobs:
213221
key: ${{ github.job }}-vcpkg-binary-${{ hashFiles('cmake_version', 'msbuild_version', 'toolset_version', 'vcpkg.json') }}
214222

215223
- name: Generate build system
216-
run: |
217-
cmake -B build --preset vs2022-static -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" ${{ matrix.generate-options }}
224+
shell: pwsh
225+
run: cmake -B build --preset vs2022-static -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" ${{ matrix.generate-options }}
218226

219227
- name: Save vcpkg binary cache
220228
uses: actions/cache/save@v4
@@ -224,15 +232,15 @@ jobs:
224232
key: ${{ github.job }}-vcpkg-binary-${{ hashFiles('cmake_version', 'msbuild_version', 'toolset_version', 'vcpkg.json') }}
225233

226234
- name: Build
235+
shell: pwsh
227236
working-directory: build
228-
run: |
229-
cmake --build . -j $env:NUMBER_OF_PROCESSORS --config Release
237+
run: cmake --build . -j $env:NUMBER_OF_PROCESSORS --config Release
230238

231239
- name: Run test suite
232240
if: matrix.job-type == 'standard'
241+
shell: pwsh
233242
working-directory: build
234-
run: |
235-
ctest --output-on-failure --stop-on-failure -j $env:NUMBER_OF_PROCESSORS -C Release
243+
run: ctest --output-on-failure --stop-on-failure -j $env:NUMBER_OF_PROCESSORS -C Release
236244

237245
- name: Run functional tests
238246
if: matrix.job-type == 'standard'
@@ -249,9 +257,9 @@ jobs:
249257
- name: Clone corpora
250258
if: matrix.job-type == 'fuzz'
251259
run: |
252-
git clone --depth=1 https://github.com/bitcoin-core/qa-assets "$env:RUNNER_TEMP\qa-assets"
253-
Set-Location "$env:RUNNER_TEMP\qa-assets"
254-
Write-Host "Using qa-assets repo from commit ..."
260+
git clone --depth=1 https://github.com/bitcoin-core/qa-assets "${RUNNER_TEMP}\qa-assets"
261+
cd "${RUNNER_TEMP}\qa-assets"
262+
echo "Using qa-assets repo from commit ..."
255263
git log -1
256264
257265
- name: Run fuzz tests
@@ -260,8 +268,7 @@ jobs:
260268
env:
261269
BITCOINFUZZ: '${{ github.workspace }}\build\bin\Release\fuzz.exe'
262270
shell: cmd
263-
run: |
264-
py -3 test\fuzz\test_runner.py --par %NUMBER_OF_PROCESSORS% --loglevel DEBUG %RUNNER_TEMP%\qa-assets\fuzz_corpora
271+
run: py -3 test\fuzz\test_runner.py --par %NUMBER_OF_PROCESSORS% --loglevel DEBUG %RUNNER_TEMP%\qa-assets\fuzz_corpora
265272

266273
asan-lsan-ubsan-integer-no-depends-usdt:
267274
name: 'ASan + LSan + UBSan + integer, no depends, USDT'

0 commit comments

Comments
 (0)