Merge pull request #139 from pmienk/version3 #69
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-consensus 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-20.04 | |
cxx: "clang++" | |
link: "dynamic" | |
optimization: "size" | |
assert: "debug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "" | |
cc: "clang" | |
flags: "-Os -fPIE" | |
options: "--enable-isystem" | |
packager: "apt" | |
packages: "" | |
- os: ubuntu-20.04 | |
cxx: "clang++" | |
link: "static" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "--build-icu --with-icu" | |
cc: "clang" | |
flags: "-Os -fPIE" | |
options: "--enable-isystem" | |
packager: "apt" | |
packages: "" | |
- os: ubuntu-20.04 | |
cxx: "g++" | |
link: "dynamic" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "" | |
cc: "gcc" | |
flags: "-Os -fPIE" | |
options: "--enable-isystem" | |
packager: "apt" | |
packages: "" | |
- os: ubuntu-20.04 | |
cxx: "g++" | |
link: "static" | |
optimization: "debug" | |
assert: "ndebug" | |
coverage: "cov" | |
boost: "--build-boost" | |
icu: "--build-icu --with-icu" | |
cc: "gcc" | |
flags: "-Og -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: "--build-icu --with-icu" | |
cc: "clang" | |
flags: "-Os -fPIE" | |
options: "--enable-isystem" | |
packager: "brew" | |
packages: "" | |
- os: macos-latest | |
cxx: "clang++" | |
link: "static" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "--build-icu --with-icu" | |
cc: "clang" | |
flags: "-Os -fvisibility=hidden -fPIE" | |
options: "--enable-isystem" | |
packager: "brew" | |
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-consensus}" | |
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/*" "${{ github.workspace }}/src/clone/*" --output-file coverage.info | |
lcov --list coverage.info | |
- name: Coveralls.io Upload | |
if: ${{ matrix.coverage == 'cov' }} | |
uses: pmienk/coveralls-github-action@master | |
with: | |
path-to-lcov: "./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() && (matrix.os == 'macos-latest') }} | |
run: | | |
otool -L ${{ github.workspace }}/test/.libs/libbitcoin-consensus-test | |
- name: Failure display DYLD_PRINT_LIBRARIES | |
if: ${{ failure() && (matrix.os == 'macos-latest') }} | |
run: | | |
DYLD_PRINT_LIBRARIES=1 ${{ github.workspace }}/test/.libs/libbitcoin-consensus-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-20.04 | |
cxx: "clang++" | |
link: "dynamic" | |
optimization: "size" | |
assert: "debug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "" | |
cc: "clang" | |
flags: "-Os -fPIE" | |
options: "" | |
packager: "apt" | |
packages: "" | |
- os: ubuntu-20.04 | |
cxx: "clang++" | |
link: "static" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "--build-icu --with-icu" | |
cc: "clang" | |
flags: "-Os -fPIE" | |
options: "" | |
packager: "apt" | |
packages: "" | |
- os: ubuntu-20.04 | |
cxx: "g++" | |
link: "dynamic" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "" | |
cc: "gcc" | |
flags: "-Os -fPIE" | |
options: "" | |
packager: "apt" | |
packages: "" | |
- os: ubuntu-20.04 | |
cxx: "g++" | |
link: "static" | |
optimization: "debug" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "--build-icu --with-icu" | |
cc: "gcc" | |
flags: "-Og -fPIE" | |
options: "" | |
packager: "apt" | |
packages: "" | |
- os: macos-latest | |
cxx: "clang++" | |
link: "dynamic" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "--build-icu --with-icu" | |
cc: "clang" | |
flags: "-Os -fPIE" | |
options: "" | |
packager: "brew" | |
packages: "" | |
- os: macos-latest | |
cxx: "clang++" | |
link: "static" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "--build-icu --with-icu" | |
cc: "clang" | |
flags: "-Os -fvisibility=hidden -fPIE" | |
options: "" | |
packager: "brew" | |
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-consensus}" | |
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/*" "${{ github.workspace }}/src/clone/*" --output-file coverage.info | |
lcov --list coverage.info | |
- name: Coveralls.io Upload | |
if: ${{ matrix.coverage == 'cov' }} | |
uses: pmienk/coveralls-github-action@master | |
with: | |
path-to-lcov: "./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() && (matrix.os == 'macos-latest') }} | |
run: | | |
otool -L ${{ github.workspace }}/test/.libs/libbitcoin-consensus-test | |
- name: Failure display DYLD_PRINT_LIBRARIES | |
if: ${{ failure() && (matrix.os == 'macos-latest') }} | |
run: | | |
DYLD_PRINT_LIBRARIES=1 ${{ github.workspace }}/test/.libs/libbitcoin-consensus-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-20.04 | |
preset: "nix-gnu-debug-shared" | |
cxx: "clang++" | |
link: "dynamic" | |
optimization: "size" | |
assert: "debug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "" | |
cc: "clang" | |
flags: "-Os -fPIE" | |
options: "" | |
packager: "apt" | |
packages: "" | |
- os: ubuntu-20.04 | |
preset: "nix-gnu-release-static-size" | |
cxx: "clang++" | |
link: "static" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "--build-icu --with-icu" | |
cc: "clang" | |
flags: "-Os -fPIE" | |
options: "" | |
packager: "apt" | |
packages: "" | |
- os: ubuntu-20.04 | |
preset: "nix-gnu-release-shared-size" | |
cxx: "g++" | |
link: "dynamic" | |
optimization: "size" | |
assert: "ndebug" | |
coverage: "nocov" | |
boost: "--build-boost" | |
icu: "" | |
cc: "gcc" | |
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-consensus}" | |
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/*" "${{ github.workspace }}/src/clone/*" --output-file coverage.info | |
lcov --list coverage.info | |
- name: Coveralls.io Upload | |
if: ${{ matrix.coverage == 'cov' }} | |
uses: pmienk/coveralls-github-action@master | |
with: | |
path-to-lcov: "./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() && (matrix.os == 'macos-latest') }} | |
run: | | |
otool -L ${{ github.workspace }}/test/.libs/libbitcoin-consensus-test | |
- name: Failure display DYLD_PRINT_LIBRARIES | |
if: ${{ failure() && (matrix.os == 'macos-latest') }} | |
run: | | |
DYLD_PRINT_LIBRARIES=1 ${{ github.workspace }}/test/.libs/libbitcoin-consensus-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: "StaticRelease" | |
platform: "Win32" | |
version: "vs2022" | |
tests: "*" | |
- os: windows-latest | |
configuration: "StaticDebug" | |
platform: "Win32" | |
version: "vs2022" | |
tests: "*" | |
- os: windows-latest | |
configuration: "StaticRelease" | |
platform: "x64" | |
version: "vs2022" | |
tests: "*" | |
- os: windows-latest | |
configuration: "StaticDebug" | |
platform: "x64" | |
version: "vs2022" | |
tests: "*" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Add msbuild to PATH | |
uses: microsoft/[email protected] | |
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 }} ${{ 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-consensus-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 --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; |