Merge pull request #516 from pmienk/master #657
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# Copyright (c) 2014-2023 libbitcoin-database developers (see COPYING). | |
# | |
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY | |
# | |
############################################################################### | |
name: Continuous Integration Build | |
on: [ pull_request, push, workflow_dispatch ] | |
jobs: | |
autotools: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-22.04 | |
cxx: "clang++-15" | |
link: "dynamic" | |
optimization: "debug" | |
assert: "debug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "" | |
cc: "clang-15" | |
flags: "-Og -fPIE" | |
options: "--enable-isystem" | |
packager: "apt" | |
packages: "" | |
- os: ubuntu-22.04 | |
cxx: "clang++-15" | |
link: "static" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "--build-icu --with-icu" | |
cc: "clang-15" | |
flags: "-Os -fPIE" | |
options: "--enable-isystem" | |
packager: "apt" | |
packages: "" | |
- os: ubuntu-22.04 | |
cxx: "g++-11" | |
link: "dynamic" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "" | |
cc: "gcc-11" | |
flags: "-Os -fPIE" | |
options: "--enable-isystem" | |
packager: "apt" | |
packages: "" | |
- os: ubuntu-22.04 | |
cxx: "g++-11" | |
link: "static" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "cov" | |
boost: "--build-boost" | |
icu: "--build-icu --with-icu" | |
cc: "gcc-11" | |
flags: "-Os -g --coverage -fPIE" | |
options: "--enable-isystem" | |
packager: "apt" | |
packages: "lcov" | |
- os: macos-latest | |
cxx: "clang++" | |
link: "dynamic" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "" | |
cc: "clang" | |
flags: "-Os -fPIE -DBOOST_NO_CXX98_FUNCTION_BASE" | |
options: "--enable-isystem" | |
packager: "brew" | |
packages: "icu4c" | |
- os: macos-latest | |
cxx: "clang++" | |
link: "static" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "" | |
cc: "clang" | |
flags: "-Os -fvisibility=hidden -fPIE -DBOOST_NO_CXX98_FUNCTION_BASE" | |
options: "--enable-isystem" | |
packager: "brew" | |
packages: "icu4c" | |
runs-on: ${{ matrix.os }} | |
env: | |
CC: '${{ matrix.cc }}' | |
CXX: '${{ matrix.cxx }}' | |
CFLAGS: '${{ matrix.flags }}' | |
CXXFLAGS: '${{ matrix.flags }}' | |
CI_REPOSITORY: '${{ github.repository }}' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Prepare toolchain [generic] | |
run: | | |
git config --global init.defaultBranch master | |
- name: Prepare toolchain [apt] | |
if: ${{ matrix.packager == 'apt' }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install git build-essential autoconf automake libtool pkg-config ${{ matrix.packages }} | |
- name: Prepare toolchain [brew] | |
if: ${{ matrix.packager == 'brew' }} | |
run: | | |
brew install autoconf automake libtool pkg-config ${{ matrix.packages }} | |
- name: Denormalize parameterization | |
shell: bash | |
run: | | |
WORKSPACE_SUBPATH="${GITHUB_WORKSPACE%libbitcoin-database}" | |
echo "LIBBITCOIN_SRC_PATH=${WORKSPACE_SUBPATH}" >> $GITHUB_ENV | |
if [[ ${{ matrix.assert }} == 'ndebug' ]]; then | |
echo "ASSERT_NDEBUG=--enable-ndebug" >> $GITHUB_ENV | |
else | |
echo "ASSERT_NDEBUG=--disable-ndebug" >> $GITHUB_ENV | |
fi | |
if [[ ${{ matrix.link }} == 'dynamic' ]]; then | |
echo "LINKAGE=--disable-static" >> $GITHUB_ENV | |
else | |
echo "LINKAGE=--disable-shared" >> $GITHUB_ENV | |
fi | |
if [[ ${{ matrix.link }} == 'dynamic' ]]; then | |
echo "LDFLAGS=-Wl,-rpath,${WORKSPACE_SUBPATH}prefix/lib" >> $GITHUB_ENV | |
fi | |
- name: Display Compiler details | |
shell: bash | |
run: | | |
${CC} -v | |
${CXX} -v | |
- name: Display CPU details | |
if: ${{ (runner.os == 'Linux') }} | |
shell: bash | |
run: | | |
lscpu | |
- name: Execute install.sh | |
run: > | |
./install.sh | |
--build-dir=${{ env.LIBBITCOIN_SRC_PATH }} ${{ matrix.options }} | |
--prefix=${{ env.LIBBITCOIN_SRC_PATH }}prefix | |
${{ env.LINKAGE }} | |
${{ env.ASSERT_NDEBUG }} | |
${{ matrix.boost }} | |
${{ matrix.icu }} | |
- name: Coveralls Calculation | |
if: ${{ matrix.coverage == 'cov' }} | |
run: | | |
lcov --directory . --capture --output-file coverage.info | |
lcov --remove coverage.info "/usr/*" "${{ env.LIBBITCOIN_SRC_PATH }}prefix/*" "${{ github.workspace }}/examples/*" "${{ github.workspace }}/test/*" --output-file coverage.info | |
lcov --list coverage.info | |
- name: Coveralls.io Upload | |
if: ${{ matrix.coverage == 'cov' }} | |
uses: coverallsapp/[email protected] | |
with: | |
format: lcov | |
files: "./coverage.info" | |
github-token: ${{ secrets.github_token }} | |
- name: Failure display available binaries | |
if: ${{ failure() }} | |
run: | | |
ls -la /usr/bin | |
- name: Failure display selected compiler version | |
if: ${{ failure() }} | |
run: | | |
${CC} -v | |
${CXX} -v | |
- name: Failure display default compiler version | |
if: ${{ failure() }} | |
run: | | |
clang -v | |
gcc -v | |
- name: Failure display env | |
if: ${{ failure() }} | |
run: | | |
env | |
- name: Failure list libdir | |
if: ${{ failure() }} | |
run: | | |
ls -la ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib | |
- name: Failure display boost bootstrap.log [--build-boost] | |
if: ${{ failure() && (matrix.boost == '--build-boost') }} | |
run: | | |
cat ${{ github.workspace }}/build/build-*/bootstrap.log | |
- name: Failure display otool output | |
if: ${{ failure() && startsWith(matrix.os, 'macos') }} | |
run: | | |
otool -L ${{ github.workspace }}/test/.libs/libbitcoin-database-test | |
- name: Failure display DYLD_PRINT_LIBRARIES | |
if: ${{ failure() && startsWith(matrix.os, 'macos') }} | |
run: | | |
DYLD_PRINT_LIBRARIES=1 ${{ github.workspace }}/test/.libs/libbitcoin-database-test | |
- name: Failure display pkgconfig | |
if: ${{ failure() }} | |
run: | | |
ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/ | |
cat ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/*.pc | |
cmake: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-22.04 | |
cxx: "clang++-15" | |
link: "dynamic" | |
optimization: "debug" | |
assert: "debug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "" | |
cc: "clang-15" | |
flags: "-Og -fPIE" | |
options: "" | |
packager: "apt" | |
packages: "" | |
- os: ubuntu-22.04 | |
cxx: "clang++-15" | |
link: "static" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "--build-icu --with-icu" | |
cc: "clang-15" | |
flags: "-Os -fPIE" | |
options: "" | |
packager: "apt" | |
packages: "" | |
- os: ubuntu-22.04 | |
cxx: "g++-11" | |
link: "dynamic" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "" | |
cc: "gcc-11" | |
flags: "-Os -fPIE" | |
options: "" | |
packager: "apt" | |
packages: "" | |
- os: ubuntu-22.04 | |
cxx: "g++-11" | |
link: "static" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "--build-icu --with-icu" | |
cc: "gcc-11" | |
flags: "-Os -fPIE" | |
options: "" | |
packager: "apt" | |
packages: "" | |
- os: macos-latest | |
cxx: "clang++" | |
link: "dynamic" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "" | |
cc: "clang" | |
flags: "-Os -fPIE -DBOOST_NO_CXX98_FUNCTION_BASE" | |
options: "" | |
packager: "brew" | |
packages: "icu4c" | |
- os: macos-latest | |
cxx: "clang++" | |
link: "static" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "" | |
cc: "clang" | |
flags: "-Os -fvisibility=hidden -fPIE -DBOOST_NO_CXX98_FUNCTION_BASE" | |
options: "" | |
packager: "brew" | |
packages: "icu4c" | |
runs-on: ${{ matrix.os }} | |
env: | |
CC: '${{ matrix.cc }}' | |
CXX: '${{ matrix.cxx }}' | |
CFLAGS: '${{ matrix.flags }}' | |
CXXFLAGS: '${{ matrix.flags }}' | |
CI_REPOSITORY: '${{ github.repository }}' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Prepare toolchain [generic] | |
run: | | |
git config --global init.defaultBranch master | |
- name: Prepare toolchain [apt] | |
if: ${{ matrix.packager == 'apt' }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install git build-essential autoconf automake libtool pkg-config ${{ matrix.packages }} | |
- name: Prepare toolchain [brew] | |
if: ${{ matrix.packager == 'brew' }} | |
run: | | |
brew install autoconf automake libtool pkg-config ${{ matrix.packages }} | |
- name: Denormalize parameterization | |
shell: bash | |
run: | | |
WORKSPACE_SUBPATH="${GITHUB_WORKSPACE%libbitcoin-database}" | |
echo "LIBBITCOIN_SRC_PATH=${WORKSPACE_SUBPATH}" >> $GITHUB_ENV | |
if [[ ${{ matrix.packager }} == 'brew' ]]; then | |
echo "CMAKE_LIBRARY_PATH=/usr/local/lib" >> $GITHUB_ENV | |
fi | |
if [[ ${{ matrix.assert }} == 'ndebug' ]]; then | |
echo "ASSERT_NDEBUG=--enable-ndebug -Denable-ndebug=yes" >> $GITHUB_ENV | |
else | |
echo "ASSERT_NDEBUG=--disable-ndebug -Denable-ndebug=no" >> $GITHUB_ENV | |
fi | |
if [[ ${{ matrix.link }} == 'dynamic' ]]; then | |
echo "LINKAGE=--disable-static" >> $GITHUB_ENV | |
else | |
echo "LINKAGE=--disable-shared" >> $GITHUB_ENV | |
fi | |
if [[ ${{ matrix.link }} == 'dynamic' ]]; then | |
echo "LDFLAGS=-Wl,-rpath,${WORKSPACE_SUBPATH}prefix/lib" >> $GITHUB_ENV | |
fi | |
- name: Display Compiler details | |
shell: bash | |
run: | | |
${CC} -v | |
${CXX} -v | |
- name: Display CPU details | |
if: ${{ (runner.os == 'Linux') }} | |
shell: bash | |
run: | | |
lscpu | |
- name: Execute install-cmake.sh | |
run: > | |
./install-cmake.sh | |
--build-dir=${{ env.LIBBITCOIN_SRC_PATH }} ${{ matrix.options }} | |
--prefix=${{ env.LIBBITCOIN_SRC_PATH }}prefix | |
${{ env.LINKAGE }} | |
${{ env.ASSERT_NDEBUG }} | |
${{ matrix.boost }} | |
${{ matrix.icu }} | |
- name: Coveralls Calculation | |
if: ${{ matrix.coverage == 'cov' }} | |
run: | | |
lcov --directory . --capture --output-file coverage.info | |
lcov --remove coverage.info "/usr/*" "${{ env.LIBBITCOIN_SRC_PATH }}prefix/*" "${{ github.workspace }}/examples/*" "${{ github.workspace }}/test/*" --output-file coverage.info | |
lcov --list coverage.info | |
- name: Coveralls.io Upload | |
if: ${{ matrix.coverage == 'cov' }} | |
uses: coverallsapp/[email protected] | |
with: | |
format: lcov | |
files: "./coverage.info" | |
github-token: ${{ secrets.github_token }} | |
- name: Failure display available binaries | |
if: ${{ failure() }} | |
run: | | |
ls -la /usr/bin | |
- name: Failure display selected compiler version | |
if: ${{ failure() }} | |
run: | | |
${CC} -v | |
${CXX} -v | |
- name: Failure display default compiler version | |
if: ${{ failure() }} | |
run: | | |
clang -v | |
gcc -v | |
- name: Failure display env | |
if: ${{ failure() }} | |
run: | | |
env | |
- name: Failure list libdir | |
if: ${{ failure() }} | |
run: | | |
ls -la ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib | |
- name: Failure display boost bootstrap.log [--build-boost] | |
if: ${{ failure() && (matrix.boost == '--build-boost') }} | |
run: | | |
cat ${{ github.workspace }}/build/build-*/bootstrap.log | |
- name: Failure display otool output | |
if: ${{ failure() && startsWith(matrix.os, 'macos') }} | |
run: | | |
otool -L ${{ github.workspace }}/test/.libs/libbitcoin-database-test | |
- name: Failure display DYLD_PRINT_LIBRARIES | |
if: ${{ failure() && startsWith(matrix.os, 'macos') }} | |
run: | | |
DYLD_PRINT_LIBRARIES=1 ${{ github.workspace }}/test/.libs/libbitcoin-database-test | |
- name: Failure display pkgconfig | |
if: ${{ failure() }} | |
run: | | |
ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/ | |
cat ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/*.pc | |
- name: Failure display cmake specific libraries | |
if: ${{ failure() }} | |
run: | | |
ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/cmake | |
- name: Failure display cmake LastTest.log | |
if: ${{ failure() }} | |
run: | | |
cat ${{ github.workspace }}/Testing/Temporary/LastTest.log | |
preset: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-22.04 | |
preset: "nix-gnu-debug-shared" | |
cxx: "clang++-15" | |
link: "dynamic" | |
optimization: "debug" | |
assert: "debug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "" | |
cc: "clang-15" | |
flags: "-Og -fPIE" | |
options: "" | |
packager: "apt" | |
packages: "" | |
- os: ubuntu-22.04 | |
preset: "nix-gnu-release-static-size" | |
cxx: "clang++-15" | |
link: "static" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "--build-icu --with-icu" | |
cc: "clang-15" | |
flags: "-Os -fPIE" | |
options: "" | |
packager: "apt" | |
packages: "" | |
- os: ubuntu-22.04 | |
preset: "nix-gnu-release-shared-size" | |
cxx: "g++-11" | |
link: "dynamic" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "" | |
cc: "gcc-11" | |
flags: "-Os -fPIE" | |
options: "" | |
packager: "apt" | |
packages: "" | |
runs-on: ${{ matrix.os }} | |
env: | |
CC: '${{ matrix.cc }}' | |
CXX: '${{ matrix.cxx }}' | |
CFLAGS: '${{ matrix.flags }}' | |
CXXFLAGS: '${{ matrix.flags }}' | |
CI_REPOSITORY: '${{ github.repository }}' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Prepare toolchain [generic] | |
run: | | |
git config --global init.defaultBranch master | |
- name: Prepare toolchain [apt] | |
if: ${{ matrix.packager == 'apt' }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install git build-essential autoconf automake libtool pkg-config ${{ matrix.packages }} | |
- name: Prepare toolchain [brew] | |
if: ${{ matrix.packager == 'brew' }} | |
run: | | |
brew install autoconf automake libtool pkg-config ${{ matrix.packages }} | |
- name: Denormalize parameterization | |
shell: bash | |
run: | | |
WORKSPACE_SUBPATH="${GITHUB_WORKSPACE%libbitcoin-database}" | |
echo "LIBBITCOIN_SRC_PATH=${WORKSPACE_SUBPATH}" >> $GITHUB_ENV | |
if [[ ${{ matrix.packager }} == 'brew' ]]; then | |
echo "CMAKE_LIBRARY_PATH=/usr/local/lib" >> $GITHUB_ENV | |
fi | |
if [[ ${{ matrix.assert }} == 'ndebug' ]]; then | |
echo "ASSERT_NDEBUG=--enable-ndebug -Denable-ndebug=yes" >> $GITHUB_ENV | |
else | |
echo "ASSERT_NDEBUG=--disable-ndebug -Denable-ndebug=no" >> $GITHUB_ENV | |
fi | |
if [[ ${{ matrix.link }} == 'dynamic' ]]; then | |
echo "LINKAGE=--disable-static" >> $GITHUB_ENV | |
else | |
echo "LINKAGE=--disable-shared" >> $GITHUB_ENV | |
fi | |
if [[ ${{ matrix.link }} == 'dynamic' ]]; then | |
echo "LDFLAGS=-Wl,-rpath,${WORKSPACE_SUBPATH}prefix/${{ matrix.preset }}/lib" >> $GITHUB_ENV | |
fi | |
- name: Display Compiler details | |
shell: bash | |
run: | | |
${CC} -v | |
${CXX} -v | |
- name: Display CPU details | |
if: ${{ (runner.os == 'Linux') }} | |
shell: bash | |
run: | | |
lscpu | |
- name: Execute install-cmakepresets.sh | |
run: > | |
./install-cmakepresets.sh | |
--build-dir=${{ env.LIBBITCOIN_SRC_PATH }} ${{ matrix.options }} | |
--prefix=${{ env.LIBBITCOIN_SRC_PATH }}prefix/${{ matrix.preset }} | |
--preset=${{ matrix.preset }} | |
${{ env.LINKAGE }} | |
${{ env.ASSERT_NDEBUG }} | |
${{ matrix.boost }} | |
${{ matrix.icu }} | |
- name: Coveralls Calculation | |
if: ${{ matrix.coverage == 'cov' }} | |
run: | | |
lcov --directory . --capture --output-file coverage.info | |
lcov --remove coverage.info "/usr/*" "${{ env.LIBBITCOIN_SRC_PATH }}prefix/*" "${{ github.workspace }}/examples/*" "${{ github.workspace }}/test/*" --output-file coverage.info | |
lcov --list coverage.info | |
- name: Coveralls.io Upload | |
if: ${{ matrix.coverage == 'cov' }} | |
uses: coverallsapp/[email protected] | |
with: | |
format: lcov | |
files: "./coverage.info" | |
github-token: ${{ secrets.github_token }} | |
- name: Failure display available binaries | |
if: ${{ failure() }} | |
run: | | |
ls -la /usr/bin | |
- name: Failure display selected compiler version | |
if: ${{ failure() }} | |
run: | | |
${CC} -v | |
${CXX} -v | |
- name: Failure display default compiler version | |
if: ${{ failure() }} | |
run: | | |
clang -v | |
gcc -v | |
- name: Failure display env | |
if: ${{ failure() }} | |
run: | | |
env | |
- name: Failure list libdir | |
if: ${{ failure() }} | |
run: | | |
ls -la ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib | |
- name: Failure display boost bootstrap.log [--build-boost] | |
if: ${{ failure() && (matrix.boost == '--build-boost') }} | |
run: | | |
cat ${{ github.workspace }}/build/build-*/bootstrap.log | |
- name: Failure display otool output | |
if: ${{ failure() && startsWith(matrix.os, 'macos') }} | |
run: | | |
otool -L ${{ github.workspace }}/test/.libs/libbitcoin-database-test | |
- name: Failure display DYLD_PRINT_LIBRARIES | |
if: ${{ failure() && startsWith(matrix.os, 'macos') }} | |
run: | | |
DYLD_PRINT_LIBRARIES=1 ${{ github.workspace }}/test/.libs/libbitcoin-database-test | |
- name: Failure display pkgconfig | |
if: ${{ failure() }} | |
run: | | |
ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/ | |
cat ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/*.pc | |
- name: Failure display cmake specific libraries | |
if: ${{ failure() }} | |
run: | | |
ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/cmake | |
- name: Failure display cmake LastTest.log | |
if: ${{ failure() }} | |
run: | | |
cat ${{ github.workspace }}/Testing/Temporary/LastTest.log | |
msbuild: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-latest | |
configuration: "StaticDebug" | |
platform: "x64" | |
version: "vs2022" | |
tests: "*" | |
- os: windows-latest | |
configuration: "StaticRelease" | |
platform: "x64" | |
version: "vs2022" | |
tests: "*" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
with: | |
msbuild-architecture: x64 | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Initialize SDK | |
shell: powershell | |
run: | | |
try { | |
Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?LinkId=323507" -OutFile "sdksetup.exe" | |
$FeatureList = "OptionId.WindowsDesktopSoftwareDevelopmentKit OptionId.NetFxSoftwareDevelopmentKit" | |
$Args = "/q /norestart /features $FeatureList" | |
$setup = Start-Process -PassThru -FilePath "sdksetup.exe" -ArgumentList $Args | |
$setup.WaitForExit() | |
if ($setup.ExitCode -ne 0) { | |
Write-Host "Test execution failure: " $setup.ExitCode -ForegroundColor Red; | |
exit $setup.ExitCode; | |
} | |
} | |
catch { | |
$ERR = $_; | |
Write-Host "Initialization failure: " $ERR -ForegroundColor Red; | |
exit $ERR; | |
} | |
- name: Execute build | |
run: .\build.cmd .. ${{ matrix.platform }} ${{ matrix.configuration }} x64 ${{ matrix.version }} | |
- name: Execute tests | |
shell: powershell | |
run: | | |
Write-Host "Locating test executables..." -ForegroundColor Yellow; | |
$BC_TEST_EXES = @(Get-ChildItem -Path "$env:${{ github.workspace }}\bin" -recurse | Where-Object { $_.Name -eq "libbitcoin-database-test.exe" }); | |
If ($BC_TEST_EXES.Count -ne 1) { | |
Write-Host "Failure, invalid count of test executables." -ForegroundColor Red; | |
exit 1; | |
} | |
Write-Host "Found single test executable: " $BC_TEST_EXES.FullName -ForegroundColor Green; | |
$BC_TEST_SINGLETON = $BC_TEST_EXES.FullName; | |
Write-Host "Executing $BC_TEST_SINGLETON $env:BOOST_UNIT_TEST_OPTIONS" -ForegroundColor Yellow; | |
try { | |
Invoke-Expression "$BC_TEST_SINGLETON --log_level=warning --run_test=${{ matrix.tests }} $env:BOOST_UNIT_TEST_OPTIONS" | |
} | |
catch { | |
$ERR = $_; | |
Write-Host "Test execution failure: " $ERR -ForegroundColor Red; | |
exit $ERR; | |
} | |
Write-Host "Test execution complete." -ForegroundColor Green; |