Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
35f444e
formatting
Clueliss Aug 1, 2023
5b3890f
update to c++20
Clueliss Aug 1, 2023
2e66267
proper iterator deref types
Clueliss Aug 1, 2023
bab0712
eliminate some const casts
Clueliss Aug 1, 2023
47cc81f
cleanup sparse array
Clueliss Aug 2, 2023
703d4a5
seperate sparse hash file
Clueliss Aug 2, 2023
ba927dd
cleanup policies
Clueliss Aug 2, 2023
2cdf1a5
revert some things in sparse array
Clueliss Aug 2, 2023
1729915
remove last field from array and remove scoped alloc awareness from a…
Clueliss Aug 2, 2023
fa4efa2
utilize memmove
Clueliss Aug 2, 2023
bdb2ac9
more memmove
Clueliss Aug 2, 2023
43c26e4
attempt to optimize offset_to_index
Clueliss Aug 2, 2023
f4ec70b
port to doctest
Clueliss Aug 3, 2023
0c79106
sparse buckets array v1
Clueliss Aug 3, 2023
16273b8
sparse buckets array cleanup
Clueliss Aug 4, 2023
a9d8263
getting rid of more members
Clueliss Aug 4, 2023
64fa09a
throw out boost and update readme and stuff
Clueliss Aug 4, 2023
96802e8
optimize bucket array
Clueliss Aug 5, 2023
f082ce5
exclude .idea folder
Clueliss Aug 5, 2023
3f30390
rework folder structure
Clueliss Aug 5, 2023
0d3cab7
fix bugs
Clueliss Aug 7, 2023
6eeb9d2
prettify
Clueliss Aug 7, 2023
e6c42ad
Avoid iterator invalidation without effective insert
Clueliss Aug 7, 2023
db1246b
if constexpr
Clueliss Aug 7, 2023
8e48c62
try fix ci
Clueliss Aug 7, 2023
24ad3b0
try fix ci
Clueliss Aug 7, 2023
36be0fc
try fix ci
Clueliss Aug 7, 2023
47336df
try fix ci
Clueliss Aug 7, 2023
77aae68
try fix ci
Clueliss Aug 7, 2023
40d1524
try fix ci
Clueliss Aug 7, 2023
03844a4
try fix ci
Clueliss Aug 7, 2023
7e65d7f
try fix ci
Clueliss Aug 7, 2023
502eff3
try fix ci
Clueliss Aug 7, 2023
aa995f9
missing typename
Clueliss Aug 7, 2023
a43a320
missing include
Clueliss Aug 7, 2023
7bbc7cd
fix test package
Clueliss Aug 7, 2023
5add00e
comment out macos runners and only run on pr
Clueliss Aug 7, 2023
49941e0
no tsl debug
Clueliss Aug 7, 2023
fb4447a
address review 1
Clueliss Aug 8, 2023
d20ef3a
deprecate range erase
Clueliss Aug 8, 2023
73eafa4
small optim
Clueliss Aug 15, 2023
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
190 changes: 97 additions & 93 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,104 +1,108 @@
name: CI

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

jobs:
build:
strategy:
fail-fast: false
matrix:
config:
- {
name: linux-x64-clang-9,
os: ubuntu-18.04,
cxx: clang++-9,
cmake-build-type: Release
}
- {
name: macos-x64-gcc,
os: macos-10.15,
cxx: g++,
cmake-build-type: Release
}
- {
name: macos-x64-clang,
os: macos-10.15,
cxx: clang++,
cmake-build-type: Release
}
- {
name: linux-x64-clang-12-sanitize,
os: ubuntu-20.04,
cxx: clang++-12,
cxx-flags: "-fsanitize=address,undefined",
cmake-build-type: Release
}
- {
name: linux-x64-gcc-10-coverage,
os: ubuntu-20.04,
cxx: g++-10,
cxx-flags: --coverage,
gcov-tool: gcov-10,
cmake-build-type: Debug
}
- {
name: linux-x64-clang-11,
os: ubuntu-20.04,
cxx: clang++-11,
cmake-build-type: Release
}
- {
name: linux-x64-clang-12,
os: ubuntu-22.04,
cxx: clang++-12,
cmake-build-type: Release
}
- {
name: linux-x64-clang-13,
os: ubuntu-22.04,
cxx: clang++-13,
cmake-build-type: Release
}
- {
name: linux-x64-clang-14,
os: ubuntu-22.04,
cxx: clang++-14,
cmake-build-type: Release
}
- {
name: linux-x64-gcc-11,
os: ubuntu-22.04,
cxx: g++-11,
cmake-build-type: Release
}
name: ${{matrix.config.name}}
# These get queued but never actually run
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When merged, we should add issues with tag help-wanted to add windows and macos support to the CI.

#- name: macos-x64-gcc,
# os: macos-13.5,
# cxx: g++,
#- name: macos-x64-clang,
# os: macos-13.5,
# cxx: clang++,

- name: linux-x64-clang-14
os: ubuntu-22.04
cxx: clang++-14

- name: linux-x64-clang-15
os: ubuntu-22.04
cxx: clang++-15

- name: linux-x64-clang-16-sanitize
os: ubuntu-22.04
cxx: clang++-16
cxx-flags: -fsanitize=undefined -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls

- name: linux-x64-gcc-11-coverage
os: ubuntu-22.04
cxx: g++-11
cxx-flags: --coverage
gcov-tool: gcov-11

- name: linux-x64-gcc-12
os: ubuntu-22.04
cxx: g++-12

- name: linux-x64-gcc-13
os: ubuntu-22.04
cxx: g++-13

runs-on: ${{matrix.config.os}}
steps:
- uses: actions/checkout@v2

# Linux or macOS
- name: Install boost (Linux or macOS)
run: vcpkg install boost-test boost-container boost-interprocess
if: runner.os == 'Linux' || runner.os == 'macOS'

- name: Configure CMake (Linux or macOS)
run: cmake -DCMAKE_BUILD_TYPE=${{matrix.config.cmake-build-type}} -DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -S ${{github.workspace}}/tests -B ${{github.workspace}}/build
env:
CXX: ${{matrix.config.cxx}}
CXXFLAGS: ${{matrix.config.cxx-flags}}
if: runner.os == 'Linux' || runner.os == 'macOS'

- name: Build (Linux or macOS)
run: cmake --build ${{github.workspace}}/build --verbose
if: runner.os == 'Linux' || runner.os == 'macOS'

- name: Test (Linux or macOS)
run: ${{github.workspace}}/build/tsl_sparse_map_tests
if: runner.os == 'Linux' || runner.os == 'macOS'

- name: Coverage
run: |
sudo apt-get install -y lcov
lcov -c -b ${{github.workspace}}/include -d ${{github.workspace}}/build -o ${{github.workspace}}/coverage.info --no-external --gcov-tool ${{matrix.config.gcov-tool}}
bash <(curl -s https://codecov.io/bash) -f ${{github.workspace}}/coverage.info
if: ${{matrix.config.name == 'linux-x64-gcc-10-coverage'}}
- name: Add Repos for for gcc-13 and clang-16
run: |
# gcc-13
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
# clang-16
source /etc/os-release
echo "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-16 main" | sudo tee /etc/apt/sources.list.d/llvm-16.list
curl https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/llvm-16.gpg > /dev/null
sudo apt-get update -y
if: runner.os == 'Linux'

- name: Install compiler
id: install_cc
uses: rlalik/[email protected]
with:
compiler: ${{ matrix.config.cxx }}
if: runner.os == 'Linux'

- name: Check out sources
uses: actions/checkout@v3

- name: Install boost (Linux)
run: sudo apt-get install -y libboost-dev
if: runner.os == 'Linux'

- name: Install boost (macOS)
run: vcpkg install boost-interprocess
if: runner.os == 'macOS'

- name: Configure CMake (Linux)
run: cmake -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -B build
env:
CXX: ${{matrix.config.cxx}}
CXXFLAGS: ${{matrix.config.cxx-flags}}
if: runner.os == 'Linux'

- name: Configure CMake (macOS)
run: cmake -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -B build
env:
CXX: ${{matrix.config.cxx}}
CXXFLAGS: ${{matrix.config.cxx-flags}}
if: runner.os == 'macOS'

- name: Build
working-directory: build
run: cmake --build . --verbose --parallel 2
if: runner.os == 'Linux' || runner.os == 'macOS'

- name: Test
working-directory: build
run: ctest --parallel 2 --verbose
if: runner.os == 'Linux' || runner.os == 'macOS'

- name: Coverage
run: |
sudo apt-get install -y lcov
lcov -c -b ${{github.workspace}}/include -d ${{github.workspace}}/build -o ${{github.workspace}}/coverage.info --no-external --gcov-tool ${{matrix.config.gcov-tool}}
bash <(curl -s https://codecov.io/bash) -f ${{github.workspace}}/coverage.info
if: ${{matrix.config.name == 'linux-x64-gcc-11-coverage'}}
64 changes: 1 addition & 63 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,88 +80,26 @@ environment_run.sh.env
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
.idea/

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Intellij+all Patch ###
# Ignore everything but code style settings and run configurations
# that are supposed to be shared within teams.

.idea/*

!.idea/codeStyles
!.idea/runConfigurations

### Ninja ###
.ninja_deps
Expand Down
13 changes: 6 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@ project(dice-sparse-map
include(cmake/boilerplate_init.cmake)
boilerplate_init()

find_package(Boost REQUIRED)

add_library(${PROJECT_NAME} INTERFACE)
# Use dice::sparse_map as target, more consistent with other libraries conventions (Boost, Qt, ...)
add_library("${PROJECT_NAME}::${PROJECT_NAME}" ALIAS "${PROJECT_NAME}")

target_include_directories(${PROJECT_NAME}
INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>")

target_link_libraries(${PROJECT_NAME} INTERFACE
Boost::headers
)

if(MSVC)
target_sources(${PROJECT_NAME} INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/tsl-sparse-map.natvis>"
Expand All @@ -30,4 +24,9 @@ if (IS_TOP_LEVEL)
install_interface_library("${PROJECT_NAME}" "${PROJECT_NAME}" "${PROJECT_NAME}" "include")
endif ()


if (BUILD_TESTING AND IS_TOP_LEVEL)
message("Building testing")
include(CTest)
enable_testing()
add_subdirectory(tests)
endif ()
Loading