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

Merge release 1.4.0 from fork #38

Open
wants to merge 60 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
e49f40f
Merge pull request #1 from improbable-eng/master
tzaeschke Mar 24, 2021
5bc827b
Merge branch 'improbable-eng:master' into master
tzaeschke Jan 14, 2022
2ae1314
Merge branch 'improbable-eng:master' into master
tzaeschke Jan 26, 2022
4b540d4
Merge branch 'improbable-eng:master' into master
tzaeschke Feb 6, 2022
df29cb6
Improve build experience
tzaeschke Feb 16, 2022
4f6bfdd
Update README.md
tzaeschke Feb 16, 2022
291d960
Fix for each postlen / #2 (#3)
tzaeschke Feb 22, 2022
18cbb71
Fix/issue 4 fix key copy (#6)
tzaeschke Mar 2, 2022
ced5e27
Avoid find on remove node (#7)
tzaeschke Mar 2, 2022
45f2bf5
Fix/issue 9 entry union (#10)
tzaeschke Mar 9, 2022
5d76f97
Move postfix tfrom Node to Entry (#12)
tzaeschke Mar 9, 2022
80a5ceb
issue 11 cleanup (#13)
tzaeschke Mar 9, 2022
671f603
Update README.md
tzaeschke Mar 9, 2022
7a6b1d8
Fix/issue 14 b tree (#15)
tzaeschke Apr 1, 2022
039da73
Avoid std::uint16_t (#17)
tzaeschke Apr 1, 2022
8732b56
moveable PhTree (#20)
tzaeschke Apr 4, 2022
1078e35
Fix/19 clean up iterators (#23)
tzaeschke Apr 7, 2022
582fccf
Initial (#25)
tzaeschke Apr 8, 2022
899716d
FilterSphere issue (#28)
tzaeschke Apr 8, 2022
fb80406
Release v1.2.0 (#32)
tzaeschke Apr 14, 2022
277ad87
filters for multimaps (#30)
tzaeschke Apr 15, 2022
6eccd4f
Filters (#34)
tzaeschke Apr 18, 2022
0dc4465
Filters (#35)
tzaeschke Apr 18, 2022
25d2e1a
Add filters for box keys (#37)
tzaeschke Apr 18, 2022
5009b5e
Issue 38: remove std::optional (#41)
tzaeschke May 18, 2022
d6a58d1
Add try_emplace() (#42)
tzaeschke May 18, 2022
c2e3d8b
Cleaned up erase() (#47)
tzaeschke May 23, 2022
9d622c1
Fix slight problem with value initialization in entry.h (#49)
tzaeschke Jun 9, 2022
6b5759e
Issue 44: alternative multimap bucket (#48)
tzaeschke Jun 9, 2022
cb5dc1e
Fix/43 relocate (#45)
tzaeschke Jun 21, 2022
7992902
Cleanup unit tests (#54)
tzaeschke Jun 23, 2022
09583a6
issue 56 - support move-only/copy-only values (#57)
tzaeschke Jul 1, 2022
71c4054
Iterator cleanup (#58)
tzaeschke Jul 1, 2022
5569986
improved multimap consistency check (#59)
tzaeschke Jul 1, 2022
8ca44f0
Initial
tzaeschke Jul 24, 2022
6c7f74a
Undo erroneous commit
tzaeschke Jul 24, 2022
83db67c
Fix/60 MSVC 2019 issues (#64)
tzaeschke Aug 3, 2022
a25c7e0
Update phtree_test_issues.cc
tzaeschke Aug 3, 2022
629f5cc
Update README converter example
tzaeschke Aug 5, 2022
8adf018
Issue 51 relocate multimap v2 (#52)
tzaeschke Aug 5, 2022
0111120
separate folders for tests/benchmarks (#67)
tzaeschke Aug 5, 2022
789b60c
Fixed result counting in query_mm_d_benchmark.cc
tzaeschke Aug 16, 2022
91b99f4
Add flag to relocate() (#69)
tzaeschke Aug 16, 2022
0935cfe
cmake full build and VS 19 (#71)
tzaeschke Aug 23, 2022
5d1da3b
Initial
tzaeschke Aug 25, 2022
3c6689d
Initial
tzaeschke Aug 25, 2022
d89e32c
Fixed numerous MSVC warnings (#76)
tzaeschke Aug 28, 2022
a273622
v1.3.0 (#77)
tzaeschke Aug 28, 2022
2090229
Update README.md
tzaeschke Aug 28, 2022
2c9174f
#53 improve build scripts (#79)
tzaeschke Aug 31, 2022
163ca96
fix codecov = 0% (#81)
tzaeschke Aug 31, 2022
ebb0b45
Update README.md
tzaeschke Aug 31, 2022
bc15eb3
Update README.md
tzaeschke Sep 1, 2022
3d9f3b7
Update BUILD
tzaeschke Sep 2, 2022
9bbcd31
enable cmake import (#82)
tzaeschke Sep 8, 2022
c214f51
cmake find_package() (#84)
tzaeschke Sep 8, 2022
a97a173
BUILD
tzaeschke Sep 8, 2022
6ab31c6
BUILD
tzaeschke Sep 8, 2022
df56c62
BUILD
tzaeschke Sep 9, 2022
86311b6
BUILD
tzaeschke Sep 9, 2022
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
4 changes: 4 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ignore typical cmake build folders
build
out
cmake-build-debug
8 changes: 4 additions & 4 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ build:ubsan --linkopt="-lubsan"
test:ubsan --run_under=//tools/runners/sanitizers/ubsan

# MSAN is disabled for now, as there are false positives and we can't suppress them easily.
#build:msan --config=base-sanitizer
#build:msan --copt="-fsanitize=memory"
#build:msan --linkopt="-fsanitize=memory"
#test:msan --run_under=//tools/runners/sanitizers/msan
build:msan --config=base-sanitizer
build:msan --copt="-fsanitize=memory"
build:msan --linkopt="-fsanitize=memory"
test:msan --run_under=//tools/runners/sanitizers/msan

build:lint --define linting_only=true
22 changes: 16 additions & 6 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Bazel build

on: [push, pull_request]
on: [ push ]

jobs:
build:
Expand All @@ -16,11 +16,21 @@ jobs:
uses: actions/checkout@v2

- name: Setup bazel
# install bazelisk to install the appropriate bazel version
run: |
export PATH=$PATH:$HOME/bin && mkdir -p $HOME/bin
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.5.0/bazelisk-linux-amd64 && chmod +x bazelisk-linux-amd64 && mv bazelisk-linux-amd64 $HOME/bin/bazel
wget https://github.com/bazelbuild/buildtools/releases/download/0.22.0/buildifier && chmod +x buildifier && mv buildifier $HOME/bin/
uses: bazelbuild/setup-bazelisk@v2

- name: Mount bazel cache # Optional
uses: actions/cache@v3
with:
path: "~/.cache/bazel"
key: bazel

- name: Clang format
shell: bash
run: ./ci/linting/clang-format.sh

- name: Bazel format
shell: bash
run: ./ci/linting/buildifier.sh

- name: Build
shell: bash
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/cmake-codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CMake Codecov

on: [ push ]

env:
BUILD_TYPE: Debug

defaults:
run:
shell: bash

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: hendrikmuhs/[email protected]

- name: Install lcov
run: sudo apt-get install lcov -y

- name: Create Build Environment
run: |
cmake -E make_directory ${{github.workspace}}/build
cd build

- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPHTREE_CODE_COVERAGE=ON

- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE -j2

- name: Run tests
working-directory: ${{github.workspace}}/build
run: ctest -C $BUILD_TYPE

- name: Create and upload coverage
working-directory: ${{github.workspace}}/build
run: |
cd test/CMakeFiles/all_tests.dir/
lcov --directory . --capture -o coverage.info
lcov -r coverage.info */build/* */test/* */c++/* */gtest/* -o coverageFiltered.info
lcov --list coverageFiltered.info
bash <(curl -s https://codecov.io/bash) -f coverageFiltered.info || echo "Upload failed"

32 changes: 32 additions & 0 deletions .github/workflows/cmake-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CMake Windows build

on: [ push ]

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- uses: hendrikmuhs/[email protected]

- uses: ilammy/msvc-dev-cmd@v1

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}\out

- name: Configure CMake
working-directory: ${{github.workspace}}\out
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -S ${{github.workspace}} -B ${{github.workspace}}\out -DPHTREE_BUILD_EXAMPLES=ON -DPHTREE_BUILD_TESTS=ON

- name: Build
working-directory: ${{github.workspace}}\out
run: cmake --build . --config ${env:BUILD_TYPE} -j2

- name: Test
working-directory: ${{github.workspace}}\out
run: ctest -C ${env:BUILD_TYPE}
59 changes: 30 additions & 29 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
name: CMake build

on: [push, pull_request]
on: [ push ]

env:
BUILD_TYPE: Release

defaults:
run:
shell: bash

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build

- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{github.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE

- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE

- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# TODO Currently tests are run via bazel only.
run: ctest -C $BUILD_TYPE
- uses: actions/checkout@v2

- uses: hendrikmuhs/[email protected]

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build

- name: Configure CMake
working-directory: ${{github.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPHTREE_BUILD_ALL=ON

- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE -j2

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C $BUILD_TYPE

- name: Example
working-directory: ${{github.workspace}}/build
run: examples/Example
42 changes: 42 additions & 0 deletions .github/workflows/codcecov.yml_old
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Upload CodeCov Report
on: [ push ]
jobs:
run:
runs-on: windows-latest
name: Build, Test , Upload Code Coverage Report
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: ‘2’
id: checkout_code
- name: Setup MSBuild and add to PATH
uses: microsoft/[email protected]
id: setup_msbuild

- name: Generate Solution
run: cmake -G "Visual Studio 17 2022" -A x64 . -DPHTREE_CODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug

- name: Run MSBuild
id: run_msbuild
run: msbuild /p:Configuration=Debug /p:Platform=x64 /p:gtest_force_shared_crt=on phtree.sln
- name: Setup VSTest and add to PATH
uses: darenm/Setup-VSTest@v1
id: setup_vstest

- name: Setup OpenCppCoverage and add to PATH
id: setup_opencppcoverage
run: |
choco install OpenCppCoverage -y
echo "C:\Program Files\OpenCppCoverage" >> $env:GITHUB_PATH

- name: Generate Report
id: generate_test_report
shell: cmd
run: OpenCppCoverage.exe --modules phtree --export_type cobertura:phtree.xml -- "vstest.console.exe" test\Debug\all_tests.exe
- name: Upload Report to Codecov
uses: codecov/codecov-action@v3
with:
files: ./phtree.xml
fail_ci_if_error: true
functionalities: fix
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@
!.clang-format
!.gitignore
!.github
!*.yml
bazel-*
!bazel-*.sh
compile_commands.json
perf.data*
build
out
cygwin
CMakeSettings.json

**/cmake-build-debug/
34 changes: 34 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
package(default_visibility = ["//visibility:public"])

licenses(["notice"]) # Apache 2.0

# Expose license for external usage through bazel.
exports_files([
"LICENSE",
])

# Platform configuration definitions for select()

config_setting(
Expand Down Expand Up @@ -62,3 +69,30 @@ filegroup(
name = "dot_clang_format",
srcs = [".clang-format"],
)

cc_library(
name = "phtree",
srcs = glob(
include = [
"include/**/*.h",
],
),
hdrs = [
"include/phtree/converter.h",
"include/phtree/distance.h",
"include/phtree/filter.h",
"include/phtree/phtree.h",
"include/phtree/phtree_multimap.h",
],
includes = [
"include",
],
linkstatic = True,
visibility = [
"//visibility:public",
],
deps = [
"//include/phtree/common",
"//include/phtree/v16",
],
)
Loading