Skip to content

Commit

Permalink
Merge pull request #89 from eseiler/infra/tag_deps
Browse files Browse the repository at this point in the history
[INFRA] pin dependencies
  • Loading branch information
eseiler authored Oct 28, 2021
2 parents 47250ca + d999596 commit cf9ff4a
Show file tree
Hide file tree
Showing 16 changed files with 92 additions and 40 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
build_threads: 2
test_threads: 2
cxx_flags: "-std=c++20 -fsanitize=address"
ctest_exclude: "faust|moby"
ctest_include: "-im"
ctest_exclude: "-E 'faust|moby'"
ctest_include: "-R '-im'"

- name: "cereal gcc11"
cxx: "g++-11"
Expand Down Expand Up @@ -107,8 +107,8 @@ jobs:
build_threads: 2
test_threads: 2
cxx_flags: "-std=c++20 -fsanitize=address"
ctest_exclude: "faust|moby"
ctest_include: "-im"
ctest_exclude: "-E 'faust|moby'"
ctest_include: "-R '-im'"

- name: "cereal clang12"
cxx: "clang++-12"
Expand All @@ -118,6 +118,7 @@ jobs:
test_threads: 2
cxx_flags: "-std=c++20"
has_cereal: "1"
ctest_exclude: "-E 'k2-treap-test_k2-0.1.0.0'"

- name: "clang11"
cxx: "clang++-11"
Expand Down Expand Up @@ -196,7 +197,12 @@ jobs:
run: |
mkdir sdsl-build
cd sdsl-build
cmake ../sdsl -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_FLAGS="-pedantic -Wall -Wextra -Werror ${{ matrix.cxx_flags }}" -DSDSL_CEREAL=${{ matrix.has_cereal }} -DSDSL_HEADER_TEST=${{ matrix.header_test }}
cmake ../sdsl -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_FLAGS="-pedantic -Wall -Wextra -Werror ${{ matrix.cxx_flags }}" \
-DSDSL_CEREAL=${{ matrix.has_cereal }} \
-DSDSL_HEADER_TEST=${{ matrix.header_test }}
make -j${{ matrix.build_threads }} gtest_build
- name: Build tests
Expand All @@ -220,4 +226,9 @@ jobs:
- name: Run tests
run: |
cd sdsl-build
ctest . -j${{ matrix.test_threads }} --output-on-failure -E "${{ matrix.ctest_exclude }}" -R "${{ matrix.ctest_include }}"
ctest . -j${{ matrix.test_threads }} \
${{ matrix.ctest_exclude }} \
${{ matrix.ctest_include }} \
|| ctest . -j${{ matrix.test_threads }} \
--output-on-failure \
--rerun-failed
28 changes: 17 additions & 11 deletions .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
build_threads: 3
test_threads: 3
cxx_flags: "-std=c++20 -fsanitize=address"
ctest_exclude: "faust|moby"
ctest_include: "-im"
ctest_exclude: "-E 'faust|moby'"
ctest_include: "-R '-im'"

- name: "cereal clang12"
cxx: "clang++-12"
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: seqan/seqan3
ref: 79d2ba35359f7efd795853262280630a0aa9fd7e
ref: 141677c2ca0d24771d53bf2c6bc784c1e10eff90
path: seqan3
fetch-depth: 2
submodules: false
Expand All @@ -95,12 +95,8 @@ jobs:

- name: Install compiler ${{ matrix.cxx }}
env:
CXX: ${{ matrix.cxx }}
run: |
bash ./seqan3/.github/workflows/scripts/install_via_brew.sh llvm ${CXX/clang++-/}
install_prefix=$(brew --prefix llvm@${CXX/clang++-/})/bin
ln -s ${install_prefix}/clang++ ${install_prefix}/"${{ matrix.cxx }}" || true
echo "${install_prefix}/" >> $GITHUB_PATH
CC: ${{ matrix.cc }}
run: bash ./seqan3/.github/workflows/scripts/install_via_brew.sh $(echo ${CC/clang/llvm} | awk -F '-' '{print $1, $2}')

- name: Load ccache
uses: actions/cache@v2
Expand All @@ -125,7 +121,12 @@ jobs:
run: |
mkdir sdsl-build
cd sdsl-build
cmake ../sdsl -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_FLAGS="-pedantic -Wall -Wextra -Werror ${{ matrix.cxx_flags }}" -DSDSL_CEREAL=${{ matrix.has_cereal }} -DSDSL_HEADER_TEST=${{ matrix.header_test }}
cmake ../sdsl -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_FLAGS="-pedantic -Wall -Wextra -Werror ${{ matrix.cxx_flags }}" \
-DSDSL_CEREAL=${{ matrix.has_cereal }} \
-DSDSL_HEADER_TEST=${{ matrix.header_test }}
make -j${{ matrix.build_threads }} gtest_build
- name: Build tests
Expand All @@ -149,4 +150,9 @@ jobs:
- name: Run tests
run: |
cd sdsl-build
ctest . -j${{ matrix.test_threads }} --output-on-failure -E "${{ matrix.ctest_exclude }}" -R "${{ matrix.ctest_include }}"
ctest . -j${{ matrix.test_threads }} \
${{ matrix.ctest_exclude }} \
${{ matrix.ctest_include }} \
|| ctest . -j${{ matrix.test_threads }} \
--output-on-failure \
--rerun-failed
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Run clang-format
uses: DoozyX/clang-format-lint-action@v0.11
uses: DoozyX/clang-format-lint-action@v0.13
with:
source: '.'
exclude: './external'
extensions: 'h,hpp,hpp.cmake,cpp'
clangFormatVersion: 11
clangFormatVersion: 12
inplace: True
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
Expand Down
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
Development repository for SDSL Version 3
# SDSL v3 - Succinct Data Structure Library

[![linux status][1]][2]
[![macos status][3]][4]

[1]: https://img.shields.io/github/workflow/status/xxsds/sdsl-lite/SDSL%20CI%20on%20Linux/master?style=flat&logo=github&label=Linux%20CI "Open GitHub actions page"
[2]: https://github.com/xxsds/sdsl-lite/actions?query=branch%3Amaster
[3]: https://img.shields.io/github/workflow/status/xxsds/sdsl-lite/SDSL%20CI%20on%20macOS/master?style=flat&logo=github&label=macOS%20CI "Open GitHub actions page"
[4]: https://github.com/xxsds/sdsl-lite/actions?query=branch%3Amaster

## Main differences to [v2](https://github.com/simongog/sdsl-lite)

* header-only library
* support for serialisation via [cereal](https://github.com/USCiLab/cereal)
* compatible with C++17 and C++20

## Supported compilers

Other compiler may work, but are not tested within the continuous integration. In general, the latest minor release of each
listed major compiler version is supported.

* GCC 8, 9, 10, 11
* clang 9, 10, 11, 12

## Dependencies

As SDSL v3 is header-only, dependencies marked as `required` only apply to building tests/examples.

* required: [CMake >= 3.2](https://github.com/Kitware/CMake)
* required: [googletest 1.11.0](https://github.com/google/googletest/releases/tag/release-1.11.0)
* optional: [cereal 1.3.0](https://github.com/USCiLab/cereal)

cereal can be activated by passing `-DSDSL_CEREAL=1` to CMake.
3 changes: 3 additions & 0 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ endif()
macro (add_gtest)
set (SDSL_EXTERNAL_PROJECT_CMAKE_ARGS "")
list (APPEND SDSL_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}")
list (APPEND SDSL_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}")
list (APPEND SDSL_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}")
list (APPEND SDSL_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}")
list (APPEND SDSL_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
list (APPEND SDSL_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR}")
list (APPEND SDSL_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE}")
list (APPEND SDSL_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_POLICY_DEFAULT_CMP0025=NEW")

set (gtest_project_args ${SDSL_EXTERNAL_PROJECT_CMAKE_ARGS})
list (APPEND gtest_project_args "-DBUILD_GMOCK=0")
Expand Down
2 changes: 1 addition & 1 deletion external/cereal
Submodule cereal updated 139 files
2 changes: 1 addition & 1 deletion external/googletest
Submodule googletest updated 109 files
4 changes: 2 additions & 2 deletions test/bit_vector_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,13 @@ void do_serialisation(TypeParam const & l)
oarchive(l);
}

TypeParam in_l{};
{
TypeParam in_l{};
std::ifstream is{ temp_file, std::ios::binary };
in_archive_t iarchive{ is };
iarchive(in_l);
EXPECT_EQ(l, in_l);
}
EXPECT_EQ(l, in_l);
}

TYPED_TEST(bit_vector_test, cereal)
Expand Down
4 changes: 2 additions & 2 deletions test/csa_byte_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,13 @@ void do_serialisation(TypeParam const & l)
oarchive(l);
}

TypeParam in_l{};
{
TypeParam in_l{};
std::ifstream is{ temp_file, std::ios::binary };
in_archive_t iarchive{ is };
iarchive(in_l);
EXPECT_EQ(l, in_l);
}
EXPECT_EQ(l, in_l);
}

TYPED_TEST(csa_byte_test, cereal)
Expand Down
4 changes: 2 additions & 2 deletions test/csa_int_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,13 @@ void do_serialisation(TypeParam const & l)
oarchive(l);
}

TypeParam in_l{};
{
TypeParam in_l{};
std::ifstream is{ temp_file, std::ios::binary };
in_archive_t iarchive{ is };
iarchive(in_l);
EXPECT_EQ(l, in_l);
}
EXPECT_EQ(l, in_l);
}

TYPED_TEST(csa_int_test, cereal)
Expand Down
4 changes: 2 additions & 2 deletions test/cst_byte_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,13 +500,13 @@ void do_serialisation(TypeParam const & l)
oarchive(l);
}

TypeParam in_l{};
{
TypeParam in_l{};
std::ifstream is{ temp_file, std::ios::binary };
in_archive_t iarchive{ is };
iarchive(in_l);
EXPECT_EQ(l, in_l);
}
EXPECT_EQ(l, in_l);
}

TYPED_TEST(cst_byte_test, cereal)
Expand Down
4 changes: 2 additions & 2 deletions test/cst_int_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,13 +483,13 @@ void do_serialisation(TypeParam const & l)
oarchive(l);
}

TypeParam in_l{};
{
TypeParam in_l{};
std::ifstream is{ temp_file, std::ios::binary };
in_archive_t iarchive{ is };
iarchive(in_l);
EXPECT_EQ(l, in_l);
}
EXPECT_EQ(l, in_l);
}

TYPED_TEST(cst_int_test, cereal)
Expand Down
4 changes: 2 additions & 2 deletions test/k2_treap_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,13 @@ void do_serialisation(TypeParam const & l)
oarchive(l);
}

TypeParam in_l{};
{
TypeParam in_l{};
std::ifstream is{ temp_file, std::ios::binary };
in_archive_t iarchive{ is };
iarchive(in_l);
EXPECT_EQ(l, in_l);
}
EXPECT_EQ(l, in_l);
}

TYPED_TEST(k2_treap_test, cereal)
Expand Down
4 changes: 2 additions & 2 deletions test/rmq_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,13 @@ void do_serialisation(TypeParam const & l)
oarchive(l);
}

TypeParam in_l{};
{
TypeParam in_l{};
std::ifstream is{ temp_file, std::ios::binary };
in_archive_t iarchive{ is };
iarchive(in_l);
EXPECT_EQ(l, in_l);
}
EXPECT_EQ(l, in_l);
}

TYPED_TEST(rmq_test, cereal)
Expand Down
4 changes: 2 additions & 2 deletions test/wt_byte_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,13 +563,13 @@ void do_serialisation(TypeParam const & l)
oarchive(l);
}

TypeParam in_l{};
{
TypeParam in_l{};
std::ifstream is{ temp_file, std::ios::binary };
in_archive_t iarchive{ is };
iarchive(in_l);
EXPECT_EQ(l, in_l);
}
EXPECT_EQ(l, in_l);
}

TYPED_TEST(wt_byte_test, cereal)
Expand Down
4 changes: 2 additions & 2 deletions test/wt_int_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -842,13 +842,13 @@ void do_serialisation(TypeParam const & l)
oarchive(l);
}

TypeParam in_l{};
{
TypeParam in_l{};
std::ifstream is{ temp_file, std::ios::binary };
in_archive_t iarchive{ is };
iarchive(in_l);
EXPECT_EQ(l, in_l);
}
EXPECT_EQ(l, in_l);
}

TYPED_TEST(wt_int_test, cereal)
Expand Down

0 comments on commit cf9ff4a

Please sign in to comment.