Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate artifacts. #267

Merged
merged 4 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,10 @@ jobs:

- name: Coveralls.io Upload
if: ${{ matrix.coverage == 'cov' }}
uses: pmienk/coveralls-github-action@master
uses: coverallsapp/github-action@v2.2.3
with:
path-to-lcov: "./coverage.info"
format: lcov
files: "./coverage.info"
github-token: ${{ secrets.github_token }}

- name: Failure display available binaries
Expand Down Expand Up @@ -420,9 +421,10 @@ jobs:

- name: Coveralls.io Upload
if: ${{ matrix.coverage == 'cov' }}
uses: pmienk/coveralls-github-action@master
uses: coverallsapp/github-action@v2.2.3
with:
path-to-lcov: "./coverage.info"
format: lcov
files: "./coverage.info"
github-token: ${{ secrets.github_token }}

- name: Failure display available binaries
Expand Down Expand Up @@ -622,9 +624,10 @@ jobs:

- name: Coveralls.io Upload
if: ${{ matrix.coverage == 'cov' }}
uses: pmienk/coveralls-github-action@master
uses: coverallsapp/github-action@v2.2.3
with:
path-to-lcov: "./coverage.info"
format: lcov
files: "./coverage.info"
github-token: ${{ secrets.github_token }}

- name: Failure display available binaries
Expand Down Expand Up @@ -719,7 +722,7 @@ jobs:

steps:
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x64

Expand Down Expand Up @@ -749,7 +752,7 @@ jobs:
}

- name: Execute build
run: .\build.cmd .. ${{ matrix.platform }} ${{ matrix.configuration }} ${{ matrix.version }}
run: .\build.cmd .. ${{ matrix.platform }} ${{ matrix.configuration }} x64 ${{ matrix.version }}

- name: Execute tests
shell: powershell
Expand All @@ -764,7 +767,7 @@ jobs:
$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"
Invoke-Expression "$BC_TEST_SINGLETON --log_level=warning --run_test=${{ matrix.tests }} $env:BOOST_UNIT_TEST_OPTIONS"
}
catch {
$ERR = $_;
Expand Down
6 changes: 3 additions & 3 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ SET "relative_path_base=%~1"
call cd /d "%relative_path_base%"
SET "path_base=%cd%"
SET "nuget_pkg_path=%path_base%\.nuget\packages"
SET "msbuild_args=/verbosity:minimal /p:Platform=%~2 /p:Configuration=%~3"
SET "proj_version=%~4"
SET "msbuild_args=/verbosity:minimal /p:Platform=%~2 /p:Configuration=%~3 /p:PreferredToolArchitecture=%~4"
SET "proj_version=%~5"
SET "msbuild_exe=msbuild"
IF EXIST "%~5" SET "msbuild_exe=%~5"
IF EXIST "%~6" SET "msbuild_exe=%~6"

call :pending "Build initialized..."
IF NOT EXIST "%nuget_pkg_path%" (
Expand Down
17 changes: 9 additions & 8 deletions builds/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,55 +45,55 @@ set( CMAKE_CXX_STANDARD_REQUIRED ON )
# Warn on all stuff.
check_cxx_compiler_flag( "-Wall" HAS_FLAG_WALL )
if ( HAS_FLAG_WALL )
add_compile_options( "-Wall" )
add_compile_options( $<$<COMPILE_LANGUAGE:CXX>:-Wall> )
else()
message( FATAL_ERROR "Compiler does not support -Wall" )
endif()

# Warn on extra stuff.
check_cxx_compiler_flag( "-Wextra" HAS_FLAG_WEXTRA )
if ( HAS_FLAG_WEXTRA )
add_compile_options( "-Wextra" )
add_compile_options( $<$<COMPILE_LANGUAGE:CXX>:-Wextra> )
else()
message( FATAL_ERROR "Compiler does not support -Wextra" )
endif()

# Disallow warning on style order of declarations.
check_cxx_compiler_flag( "-Wno-reorder" HAS_FLAG_WNO-REORDER )
if ( HAS_FLAG_WNO-REORDER )
add_compile_options( "-Wno-reorder" )
add_compile_options( $<$<COMPILE_LANGUAGE:CXX>:-Wno-reorder> )
else()
message( FATAL_ERROR "Compiler does not support -Wno-reorder" )
endif()

# Suppress warning for incomplete field initialization.
check_cxx_compiler_flag( "-Wno-missing-field-initializers" HAS_FLAG_WNO-MISSING-FIELD-INITIALIZERS )
if ( HAS_FLAG_WNO-MISSING-FIELD-INITIALIZERS )
add_compile_options( "-Wno-missing-field-initializers" )
add_compile_options( $<$<COMPILE_LANGUAGE:CXX>:-Wno-missing-field-initializers> )
else()
message( FATAL_ERROR "Compiler does not support -Wno-missing-field-initializers" )
endif()

# Conform to style.
check_cxx_compiler_flag( "-Wno-missing-braces" HAS_FLAG_WNO-MISSING-BRACES )
if ( HAS_FLAG_WNO-MISSING-BRACES )
add_compile_options( "-Wno-missing-braces" )
add_compile_options( $<$<COMPILE_LANGUAGE:CXX>:-Wno-missing-braces> )
else()
message( FATAL_ERROR "Compiler does not support -Wno-missing-braces" )
endif()

# Ignore comments within comments or commenting of backslash extended lines.
check_cxx_compiler_flag( "-Wno-comment" HAS_FLAG_WNO-COMMENT )
if ( HAS_FLAG_WNO-COMMENT )
add_compile_options( "-Wno-comment" )
add_compile_options( $<$<COMPILE_LANGUAGE:CXX>:-Wno-comment> )
else()
message( FATAL_ERROR "Compiler does not support -Wno-comment" )
endif()

# Suppress warning for copy of implicitly generated copy constructor.
check_cxx_compiler_flag( "-Wno-deprecated-copy" HAS_FLAG_WNO-DEPRECATED-COPY )
if ( HAS_FLAG_WNO-DEPRECATED-COPY )
add_compile_options( "-Wno-deprecated-copy" )
add_compile_options( $<$<COMPILE_LANGUAGE:CXX>:-Wno-deprecated-copy> )
else()
message( FATAL_ERROR "Compiler does not support -Wno-deprecated-copy" )
endif()
Expand All @@ -102,7 +102,7 @@ endif()
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
check_cxx_compiler_flag( "-Wno-mismatched-tags" HAS_FLAG_WNO-MISMATCHED-TAGS )
if ( HAS_FLAG_WNO-MISMATCHED-TAGS )
add_compile_options( "-Wno-mismatched-tags" )
add_compile_options( $<$<COMPILE_LANGUAGE:CXX>:-Wno-mismatched-tags> )
else()
message( FATAL_ERROR "Compiler does not support -Wno-mismatched-tags" )
endif()
Expand Down Expand Up @@ -301,6 +301,7 @@ if (with-tests)

add_test( NAME libbitcoin-protocol-test COMMAND libbitcoin-protocol-test
--run_test=*
--log_level=warning
--show_progress=no
--detect_memory_leak=0
--report_level=no
Expand Down
4 changes: 2 additions & 2 deletions builds/cmake/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
"description": "Factored size optimization settings.",
"hidden": true,
"cacheVariables": {
"CMAKE_C_FLAGS": "$env{CMAKE_C_FLAGS} -Os -s",
"CMAKE_CXX_FLAGS": "$env{CMAKE_CXX_FLAGS} -Os -s"
"CMAKE_C_FLAGS": "$env{CMAKE_C_FLAGS} -Os",
"CMAKE_CXX_FLAGS": "$env{CMAKE_CXX_FLAGS} -Os"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PreprocessorDefinitions Condition="'$(DefaultLinkage)' == 'dynamic'">BOOST_TEST_DYN_LINK;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<PostBuildEvent Condition="'$(DebugOrRelease)' == 'release'">
<Command>"$(TargetPath)" --run_test=* --show_progress=no --build_info=yes</Command>
<Command>"$(TargetPath)" --log_level=warning --run_test=* --show_progress=no --build_info=yes</Command>
</PostBuildEvent>
</ItemDefinitionGroup>

Expand Down
43 changes: 42 additions & 1 deletion builds/msvc/vs2022/libbitcoin-system.import.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,36 @@
<ItemGroup Label="BuildOptionsExtension">
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)libbitcoin-system.import.xml" />
</ItemGroup>

<!-- Options -->

<!-- These create non-portability. -->
<!-- These will compile to the target regardless of the compiling platform. -->
<!-- That will result in a crash of test/executable execution if mismatched. -->
<PropertyGroup>
<Option-avx512>false</Option-avx512>
<Option-avx2>true</Option-avx2>
<Option-sse41>true</Option-sse41>
<Option-shani>false</Option-shani>
<Option-neon>false</Option-neon>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<!-- order matters -->
<EnableEnhancedInstructionSet Condition="'$(Option-avx2)' == 'true'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet Condition="'$(Option-avx512)' == 'true'">AdvancedVectorExtensions512</EnableEnhancedInstructionSet>
</ClCompile>
</ItemDefinitionGroup>

<!-- Messages -->

<Target Name="OptionInfo" BeforeTargets="PrepareForBuild">
<Message Text="Option-avx512 : $(Option-avx512)" Importance="high"/>
<Message Text="Option-avx2 : $(Option-avx2)" Importance="high"/>
<Message Text="Option-sse41 : $(Option-sse41)" Importance="high"/>
<Message Text="Option-shani : $(Option-shani)" Importance="high"/>
<Message Text="Option-neon : $(Option-neon)" Importance="high"/>
</Target>

<!-- Linkage -->

Expand All @@ -18,11 +48,22 @@
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\..\..\libbitcoin-system\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<!-- WITH_ICU always defined in Visual Studio builds. -->
<!-- NOMINMAX enables use of std::min/max without conflict. -->
<!-- BOOST_EXCEPTION_DISABLE must be set here to be captured by all includes. -->
<!-- WIN32_LEAN_AND_MEAN avoids inclusion of certain headers, winsock.h conflicts with boost and protocol use of winsock2.h. -->
<PreprocessorDefinitions>WITH_ICU;WIN32_LEAN_AND_MEAN;NOMINMAX;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Linkage-libbitcoin-system)' == 'static' Or '$(Linkage-libbitcoin-system)' == 'ltcg'">BC_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile>
<!-- Enable use of CPU intrinsics. -->
<PreprocessorDefinitions Condition="'$(Option-avx512)' == 'true'">WITH_AVX512;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Option-avx2)' == 'true'">WITH_AVX2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Option-sse41)' == 'true'">WITH_SSE41;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Option-shani)' == 'true'">WITH_SHANI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Option-neon)' == 'true'">WITH_NEON;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<!-- 4099: warns about missing PDB files. -->
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
</Link>
<Link>
<AdditionalDependencies Condition="'$(Linkage-libbitcoin-system)' != ''">libbitcoin-system.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
Expand Down
32 changes: 32 additions & 0 deletions builds/msvc/vs2022/libbitcoin-system.import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,36 @@
<EnumValue Name="ltcg" DisplayName="Static using link time compile generation (LTCG)" />
</EnumProperty>
</Rule>
<Rule Name="libbitcoin-system-options-uiextension" PageTemplate="tool" DisplayName="Bitcoin System Options" SwitchPrefix="/" Order="1">
<Rule.Categories>
<Category Name="avx512" DisplayName="avx512" />
<Category Name="avx2" DisplayName="avx2" />
<Category Name="sse41" DisplayName="sse41" />
<Category Name="shani" DisplayName="shani" />
<Category Name="neon" DisplayName="neon" />
</Rule.Categories>
<Rule.DataSource>
<DataSource Persistence="ProjectFile" ItemType="" />
</Rule.DataSource>
<EnumProperty Name="Option-avx512" DisplayName="Enable AVX512 Intrinsics" Description="Use AVX512 intrinsics." Category="avx512">
<EnumValue Name="false" DisplayName="No" />
<EnumValue Name="true" DisplayName="Yes" />
</EnumProperty>
<EnumProperty Name="Option-avx2" DisplayName="Enable AVX2 Intrinsics" Description="Use AVX2 intrinsics." Category="avx2">
<EnumValue Name="false" DisplayName="No" />
<EnumValue Name="true" DisplayName="Yes" />
</EnumProperty>
<EnumProperty Name="Option-sse41" DisplayName="Enable SSE4.1 Intrinsics" Description="Use SSE4.1 intrinsics." Category="sse41">
<EnumValue Name="false" DisplayName="No" />
<EnumValue Name="true" DisplayName="Yes" />
</EnumProperty>
<EnumProperty Name="Option-shani" DisplayName="Enable SHA Native Intrinsics" Description="Use SHA native intrinsics." Category="shani">
<EnumValue Name="false" DisplayName="No" />
<EnumValue Name="true" DisplayName="Yes" />
</EnumProperty>
<EnumProperty Name="Option-neon" DisplayName="Enable ARM Neon Intrinsics" Description="Use ARM Neon intrinsics." Category="neon">
<EnumValue Name="false" DisplayName="No" />
<EnumValue Name="true" DisplayName="Yes" />
</EnumProperty>
</Rule>
</ProjectSchemaDefinitions>
42 changes: 42 additions & 0 deletions install-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,12 @@ build_from_tarball_boost()
display_message "BOOST_OPTIONS : $*"
display_message "--------------------------------------------------------------------"

guessed_toolset=`./tools/build/src/engine/build.sh --guess-toolset`
CXXFLAGS="-w" ./tools/build/src/engine/build.sh ${guessed_toolset} --cxxflags="-w"
cp tools/build/src/engine/b2 .

./bootstrap.sh \
"--with-bjam=./b2" \
"--prefix=$PREFIX" \
"--with-icu=$ICU_PREFIX"

Expand All @@ -881,6 +886,7 @@ build_from_tarball_boost()
"$BOOST_CXXFLAGS" \
"$BOOST_LINKFLAGS" \
"link=$BOOST_LINK" \
"warnings=off" \
"boost.locale.iconv=$BOOST_ICU_ICONV" \
"boost.locale.posix=$BOOST_ICU_POSIX" \
"-sNO_BZIP2=1" \
Expand All @@ -904,15 +910,32 @@ build_from_tarball_boost()
build_all()
{
unpack_from_tarball "$ZMQ_ARCHIVE" "$ZMQ_URL" gzip "$BUILD_ZMQ"
local SAVE_CPPFLAGS="$CPPFLAGS"
export CPPFLAGS="$CPPFLAGS ${ZMQ_FLAGS[@]}"
build_from_tarball "$ZMQ_ARCHIVE" . "$PARALLEL" "$BUILD_ZMQ" "${ZMQ_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS
export CPPFLAGS=$SAVE_CPPFLAGS
unpack_from_tarball "$ICU_ARCHIVE" "$ICU_URL" gzip "$BUILD_ICU"
local SAVE_CPPFLAGS="$CPPFLAGS"
export CPPFLAGS="$CPPFLAGS ${ICU_FLAGS[@]}"
build_from_tarball "$ICU_ARCHIVE" source "$PARALLEL" "$BUILD_ICU" "${ICU_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS
export CPPFLAGS=$SAVE_CPPFLAGS
unpack_from_tarball "$BOOST_ARCHIVE" "$BOOST_URL" bzip2 "$BUILD_BOOST"
local SAVE_CPPFLAGS="$CPPFLAGS"
export CPPFLAGS="$CPPFLAGS ${BOOST_FLAGS[@]}"
build_from_tarball_boost "$BOOST_ARCHIVE" "$PARALLEL" "$BUILD_BOOST" "${BOOST_OPTIONS[@]}"
export CPPFLAGS=$SAVE_CPPFLAGS
create_from_github libbitcoin secp256k1 version8 "yes"
local SAVE_CPPFLAGS="$CPPFLAGS"
export CPPFLAGS="$CPPFLAGS ${SECP256K1_FLAGS[@]}"
build_from_github secp256k1 "$PARALLEL" false "yes" "${SECP256K1_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS
export CPPFLAGS=$SAVE_CPPFLAGS
create_from_github libbitcoin libbitcoin-system master "yes"
local SAVE_CPPFLAGS="$CPPFLAGS"
export CPPFLAGS="$CPPFLAGS ${BITCOIN_SYSTEM_FLAGS[@]}"
build_from_github_cmake libbitcoin-system "$PARALLEL" false "yes" "${BITCOIN_SYSTEM_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS_CMAKE "$@"
export CPPFLAGS=$SAVE_CPPFLAGS
local SAVE_CPPFLAGS="$CPPFLAGS"
export CPPFLAGS="$CPPFLAGS ${BITCOIN_PROTOCOL_FLAGS[@]}"
if [[ ! ($CI == true) ]]; then
create_from_github libbitcoin libbitcoin-protocol master "yes"
build_from_github_cmake libbitcoin-protocol "$PARALLEL" true "yes" "${BITCOIN_PROTOCOL_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS_CMAKE "$@"
Expand All @@ -923,6 +946,7 @@ build_all()
pop_directory
pop_directory
fi
export CPPFLAGS=$SAVE_CPPFLAGS
}


Expand All @@ -944,6 +968,24 @@ set_with_boost_prefix

remove_install_options

# Define build flags.
#==============================================================================
# Define zmq flags.
#------------------------------------------------------------------------------
ZMQ_FLAGS=(
"-w")

# Define icu flags.
#------------------------------------------------------------------------------
ICU_FLAGS=(
"-w")

# Define secp256k1 flags.
#------------------------------------------------------------------------------
SECP256K1_FLAGS=(
"-w")


# Define build options.
#==============================================================================
# Define zmq options.
Expand Down
Loading
Loading