Skip to content

Commit

Permalink
v1.0.0 (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
improbable-til authored Mar 23, 2021
1 parent d959668 commit 5d4b09b
Show file tree
Hide file tree
Showing 98 changed files with 10,709 additions and 2,264 deletions.
13 changes: 10 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# general build options
build --compilation_mode=dbg
build --host_compilation_mode=fastbuild
build --verbose_failures
build --experimental_strict_action_env
build --experimental_guard_against_concurrent_changes
Expand All @@ -18,6 +19,7 @@ build --enable_runfiles --build_runfile_links
test --test_output=errors

build:release --compilation_mode=opt
build:release --host_compilation_mode=opt

build:ci --keep_going
build:ci --announce_rc
Expand All @@ -28,15 +30,17 @@ build:linux --copt="-fvisibility=hidden"
build:linux --copt="-fno-omit-frame-pointer" # for friendlier stack traces
build:linux --copt="-Wno-error"
build:linux --copt="-mavx"
build:linux --copt="-Wsequence-point"
build:linux --copt="-Wsign-compare"
build:linux --cxxopt="-std=c++17"
build:linux --linkopt="-lm"
build:linux --linkopt="-latomic"
build:linux --linkopt="-ldl"

build:linux-release --config=release
build:linux-release --config=linux
build:linux-release --copt="-O3"

build:benchmark --config=linux-release
build:benchmark --copt="-g" # To get code references in vtune

build:macos --copt="-fvisibility=hidden"
build:macos --copt="-Wno-error"
build:macos --cxxopt="-std=c++17"
Expand All @@ -49,13 +53,16 @@ build:windows --features=static_link_msvcrt
# the remote cache to never be hit due to differing build graph hashes.
build:windows --action_env TMP=C:/Windows/Temp
build:windows --action_env TEMP=C:/Windows/Temp
build:windows --cxxopt="/DWIN32_LEAN_AND_MEAN"

# Config for when tests are running in a "slow" environment such as Valgrind or TSan
build:slow-tests --copt="-DIMPROBABLE_SLOW_TEST"

# Valgrind config.
build:valgrind-memcheck --config=linux
build:valgrind-memcheck --config=slow-tests
test:valgrind-memcheck --run_under=//tools/runners/sanitizers/valgrind-memcheck
run:valgrind-memcheck --run_under=//tools/runners/sanitizers/valgrind-memcheck

# Sanitizer configs; for an overview of the sanitizers, see https://github.com/google/sanitizers/wiki
# For more specific information on sanitizers:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Bazel build

on: [push]

jobs:
build:
name: Run bazel
runs-on: ubuntu-latest

defaults:
run:
shell: bash

steps:
- name: Checkout
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/
- name: Build
shell: bash
run: bazel build ...

- name: Test
shell: bash
run: bazel test ...
40 changes: 40 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CMake build

on: [push]

env:
BUILD_TYPE: Release

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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
!.bazelversion
!.clang-format
!.gitignore
!.travis.yml
!.github
bazel-*
!bazel-*.sh
compile_commands.json
perf.data*
build

56 changes: 0 additions & 56 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ config_setting(
constraint_values = ["@bazel_tools//platforms:osx"],
)

config_setting(
name = "macos_not_ios",
constraint_values = ["@bazel_tools//platforms:osx"],
)

config_setting(
name = "windows",
constraint_values = ["@bazel_tools//platforms:windows"],
Expand All @@ -33,6 +38,11 @@ config_setting(
},
)

config_setting(
name = "windows-x86_64",
constraint_values = ["@bazel_tools//platforms:windows"],
)

# Buildifier

sh_binary(
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,33 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
- Nothing yet.


## [1.0.0] - 2021-03-23
### Added
- API: `MultiMap`: A wrapper that makes PH-Tree behave as a multi-map.
- API: `erase(iterator)`
- API: `emplace_hint(iterator, ...)`
- API for `PhTreeF` and `PhTreeBoxF`: 32bit floating point options
- Support for custom key classes

### Changed
- BREAKING CHANGE: The query functions now require a query box as input (instead of a min/max point pair)
- BREAKING CHANGE: `phtree_box_d.h` has been removed, please use `phtree.h instead.
- BREAKING CHANGE: `phtree_d.h` has been removed, please use `phtree.h` instead.
- BREAKING CHANGE: Data converters (IEEE, Multiply, etc) are now structs i.o. functions/functors
- BREAKING CHANGE: `PhFilterNoOp` has been renamed to `FilterNoOp`
- BREAKING CHANGE: kNN queries now always require the distance function to be specified.
- BREAKING CHANGE: Preprocessors have been refactored and renamed to Converter/ScalarConverter
- Moved CI builds from Travis to GitHub actions

### Removed
- Nothing.

### Fixed
- GCC warnings from `-Wsign-compare` and `-Wsequence-point`.


## 0.1.0 - 2020-07-02
### Added
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.14)

# set the project name
project(PH_Tree_Main VERSION 0.1.0
project(PH_Tree_Main VERSION 1.0.0
DESCRIPTION "PH-Tree C++"
LANGUAGES CXX)

Expand All @@ -12,7 +12,7 @@ endif()
# specify the C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -fpermissive")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")

add_subdirectory(phtree)
Expand Down
Loading

0 comments on commit 5d4b09b

Please sign in to comment.