Skip to content
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
3 changes: 3 additions & 0 deletions ci/lint/05_before_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
export LC_ALL=C

git fetch --unshallow
git fetch https://github.com/bitcoin-core/crc32c-subtree.git
git fetch https://github.com/bitcoin-core/ctaes.git
git fetch https://github.com/bitcoin-core/secp256k1.git
7 changes: 3 additions & 4 deletions ci/lint/06_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ if [ "$EVENT_TYPE" = "pull_request" ]; then
fi
export COMMIT_RANGE

#test/lint/git-subtree-check.sh src/crypto/ctaes
#test/lint/git-subtree-check.sh src/secp256k1
#test/lint/git-subtree-check.sh src/univalue
test/lint/git-subtree-check.sh src/crypto/ctaes
test/lint/git-subtree-check.sh src/secp256k1
#test/lint/git-subtree-check.sh src/leveldb
#test/lint/git-subtree-check.sh src/crc32c
test/lint/git-subtree-check.sh src/crc32c
#test/lint/check-doc.py
#test/lint/check-rpc-mappings.py .
test/lint/lint-all.sh
Expand Down
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,8 @@ case $host in
AC_MSG_ERROR("windres not found")
fi

CPPFLAGS="$CPPFLAGS -DSECP256K1_STATIC"

CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0601"
case $host in
i?86-*) WINDOWS_BITS=32 ;;
Expand Down
9 changes: 3 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ if(SYSTEM_SECP256K1)
else()
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)

set(SECP256K1_BUILD_SHARED OFF)
set(SECP256K1_BUILD_STATIC ON)
set(SECP256K1_DISABLE_SHARED ON CACHE BOOL "" FORCE)
set(SECP256K1_ENABLE_MODULE_ECDH OFF)
set(SECP256K1_ENABLE_MODULE_RECOVERY ON)
set(SECP256K1_ENABLE_MODULE_EXTRAKEYS OFF)
set(SECP256K1_ENABLE_MODULE_SCHNORRSIG OFF)
set(SECP256K1_ENABLE_MODULE_MUSIG OFF)
set(SECP256K1_VALGRIND OFF)

set(SECP256K1_BUILD_BENCHMARK OFF)
Expand All @@ -78,10 +78,7 @@ else()
endif()

add_subdirectory(secp256k1 EXCLUDE_FROM_ALL)
target_include_directories(secp256k1_static PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/secp256k1/include>
)
set(LIBSECP256K1 secp256k1_static)
set(LIBSECP256K1 secp256k1)
endif()

if(SYSTEM_UNIVALUE)
Expand Down
4 changes: 2 additions & 2 deletions src/bdb53/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ if(WIN32)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
list(APPEND BDB_FLAGS
CFLAGS=-Wno-implicit-function-declaration
"CFLAGS=-Wno-implicit-function-declaration -Wno-incompatible-pointer-types"
)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
list(APPEND BDB_FLAGS
CFLAGS=-Wno-error=implicit-int
"CFLAGS=-Wno-error=implicit-int -Wno-incompatible-pointer-types"
)
endif()

Expand Down
38 changes: 0 additions & 38 deletions src/crc32c/.appveyor.yml

This file was deleted.

102 changes: 102 additions & 0 deletions src/crc32c/.github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Copyright 2021 The CRC32C Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. See the AUTHORS file for names of contributors.

name: ci
on: [push, pull_request]

permissions:
contents: read

jobs:
build-and-test:
name: >-
CI
${{ matrix.os }}
${{ matrix.compiler }}
${{ matrix.optimized && 'release' || 'debug' }}
${{ matrix.shared_lib && 'shared' || 'static' }}
${{ matrix.use_glog && 'glog' || 'no-glog' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
compiler: [clang, gcc, msvc]
os: [ubuntu-latest, macos-latest, windows-latest]
optimized: [true, false]
shared_lib: [true, false]
use_glog: [true, false]
exclude:
# Our glog config doesn't work with shared libraries.
- use_glog: true
shared_lib: true
# MSVC only works on Windows.
- os: ubuntu-latest
compiler: msvc
- os: macos-latest
compiler: msvc
# Not testing with GCC on macOS.
- os: macos-latest
compiler: gcc
# Only testing with MSVC on Windows.
- os: windows-latest
compiler: clang
- os: windows-latest
compiler: gcc
# Not testing fringe configurations (glog, shared libraries) on Windows.
- os: windows-latest
use_glog: true
- os: windows-latest
shared_lib: true
include:
- compiler: clang
CC: clang
CXX: clang++
- compiler: gcc
CC: gcc
CXX: g++
- compiler: msvc
CC:
CXX:

env:
CMAKE_BUILD_DIR: ${{ github.workspace }}/build
CMAKE_BUILD_TYPE: ${{ matrix.optimized && 'RelWithDebInfo' || 'Debug' }}
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
BINARY_SUFFIX: ${{ startsWith(matrix.os, 'windows') && '.exe' || '' }}
BINARY_PATH: >-
${{ format(
startsWith(matrix.os, 'windows') && '{0}\build\{1}\' || '{0}/build/',
github.workspace,
matrix.optimized && 'RelWithDebInfo' || 'Debug') }}

steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: Generate build config
run: >-
cmake -S "${{ github.workspace }}" -B "${{ env.CMAKE_BUILD_DIR }}"
-DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }}
-DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/install_test/
-DBUILD_SHARED_LIBS=${{ matrix.shared_lib && '1' || '0' }}
-DCRC32C_USE_GLOG=${{ matrix.use_glog && '1' || '0' }}

- name: Build
run: >-
cmake --build "${{ env.CMAKE_BUILD_DIR }}"
--config "${{ env.CMAKE_BUILD_TYPE }}"

- name: Run C++ API Tests
run: ${{ env.BINARY_PATH }}crc32c_tests${{ env.BINARY_SUFFIX }}

- name: Run C API Tests
run: ${{ env.BINARY_PATH }}crc32c_capi_tests${{ env.BINARY_SUFFIX }}

- name: Run Benchmarks
run: ${{ env.BINARY_PATH }}crc32c_bench${{ env.BINARY_SUFFIX }}

- name: Test CMake installation
run: cmake --build "${{ env.CMAKE_BUILD_DIR }}" --target install
1 change: 1 addition & 0 deletions src/crc32c/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Editors.
*.sw*
.DS_Store
/.cache
/.vscode

# Build directory.
Expand Down
76 changes: 0 additions & 76 deletions src/crc32c/.travis.yml

This file was deleted.

13 changes: 10 additions & 3 deletions src/crc32c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,10 @@ target_include_directories(crc32c
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

target_compile_definitions(crc32c
PRIVATE
CRC32C_HAVE_CONFIG_H=1
set_property(
TARGET crc32c_arm64 crc32c_sse42 crc32c
APPEND
PROPERTY COMPILE_DEFINITIONS CRC32C_HAVE_CONFIG_H
)

set_target_properties(crc32c
Expand Down Expand Up @@ -367,6 +368,12 @@ if(CRC32C_BUILD_TESTS)
# Warnings as errors in Visual Studio for this project's targets.
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set_property(TARGET crc32c_capi_tests APPEND PROPERTY COMPILE_OPTIONS "/WX")

# The Windows SDK version currently on CI produces warnings when some
# headers are #included using C99 compatibility mode or above. This
# workaround can be removed once the Windows SDK on our CI is upgraded.
set_property(TARGET crc32c_capi_tests
APPEND PROPERTY COMPILE_OPTIONS "/wd5105")
endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")

add_test(NAME crc32c_capi_tests COMMAND crc32c_capi_tests)
Expand Down
3 changes: 1 addition & 2 deletions src/crc32c/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# CRC32C

[![Build Status](https://travis-ci.org/google/crc32c.svg?branch=master)](https://travis-ci.org/google/crc32c)
[![Build Status](https://ci.appveyor.com/api/projects/status/moiq7331pett4xuj/branch/master?svg=true)](https://ci.appveyor.com/project/pwnall/crc32c)
[![Build Status](https://github.com/google/crc32c/actions/workflows/build.yml/badge.svg)](https://github.com/google/crc32c/actions/workflows/build.yml)

New file format authors should consider
[HighwayHash](https://github.com/google/highwayhash). The initial version of
Expand Down
Loading
Loading