Skip to content

Commit

Permalink
fixing issue with broken tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Dec 16, 2023
1 parent 9c6d778 commit 88a8b4a
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
./alpine.sh apk add build-base cmake g++ linux-headers git bash
- name: cmake
run: |
./alpine.sh cmake -B build_for_alpine
./alpine.sh cmake -DENABLE_ROARING_TESTS=ON -B build_for_alpine
- name: build
run: |
./alpine.sh cmake --build build_for_alpine
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/macos-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ jobs:
run: |
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=destination ..
cmake -DCMAKE_INSTALL_PREFIX:PATH=destination -DENABLE_ROARING_TESTS=ON ..
cmake --build .
ctest . --output-on-failure
cmake --install .
cd ../tests/installation/find && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=../../../build/destination .. && cmake --build .
- name: Build and Test (shared)
run: |
cmake -DBUILD_SHARED_LIBS=ON -B buildshared -DCMAKE_INSTALL_PREFIX:PATH=destinationshared
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX:PATH=destinationshared -DENABLE_ROARING_TESTS=ON -B buildshared
cmake --build buildshared
cmake --install buildshared
cd tests/installation/find
Expand All @@ -35,7 +35,7 @@ jobs:
run: |
mkdir builddebug
cd builddebug
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=destination ..
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=destination -DENABLE_ROARING_TESTS=ON ..
cmake --build .
ctest . --output-on-failure
cmake --install .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/s390x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
apt-get update -q -y
apt-get install -y cmake make g++
run: |
cmake -DCMAKE_BUILD_TYPE=Release -B build
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_ROARING_TESTS=ON -B build
cmake --build build -j=2
ctest --output-on-failure --test-dir build
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=destination ..
cmake -DCMAKE_INSTALL_PREFIX:PATH=destination -DENABLE_ROARING_TESTS=ON ..
cmake --build .
ctest . --output-on-failure
cmake --install .
Expand All @@ -31,7 +31,7 @@ jobs:
run: |
mkdir builddebug
cd builddebug
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=destination ..
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=destination -DENABLE_ROARING_TESTS=ON ..
cmake --build .
ctest . --output-on-failure
cmake --install .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-debug-sani-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DROARING_SANITIZE=ON ..
cmake -DCMAKE_BUILD_TYPE=Debug -DROARING_SANITIZE=ON -DENABLE_ROARING_TESTS=ON ..
cmake --build .
ctest . --output-on-failure
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu-gcc10-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
run: |
mkdir build
cd build
cmake ..
cmake --build .
cmake -DENABLE_ROARING_TESTS=ON ..
cmake --build .
ctest . --output-on-failure
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu-legacy-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
run: |
mkdir build
cd build
cmake -DROARING_DISABLE_AVX=ON -DCMAKE_INSTALL_PREFIX:PATH=destination ..
cmake --build .
cmake -DROARING_DISABLE_AVX=ON -DCMAKE_INSTALL_PREFIX:PATH=destination -DENABLE_ROARING_TESTS=ON ..
cmake --build
ctest . --output-on-failure
cmake --install .
cd ../tests/installation/find && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=../../../build/destination .. && cmake --build .
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-noexcept-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
run: |
mkdir build
cd build
cmake -DCMAKE_CXX_FLAGS=-fno-exceptions -DROARING_EXCEPTIONS=OFF ..
cmake -DCMAKE_CXX_FLAGS=-fno-exceptions -DROARING_EXCEPTIONS=OFF -DENABLE_ROARING_TESTS=ON ..
cmake --build .
ctest . --output-on-failure
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-sani-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
run: |
mkdir build
cd build
cmake -DROARING_SANITIZE=ON ..
cmake -DROARING_SANITIZE=ON -DENABLE_ROARING_TESTS=ON ..
cmake --build .
ctest . --output-on-failure
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-sani-thread-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
run: |
mkdir build
cd build
cmake -DROARING_SANITIZE_THREADS=ON ..
cmake -DROARING_SANITIZE_THREADS=ON -DENABLE_ROARING_TESTS=ON ..
cmake --build .
ctest . --output-on-failure
2 changes: 1 addition & 1 deletion .github/workflows/vs16-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Configure
run: |
mkdir build
cd build && cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} ..
cd build && cmake -DENABLE_ROARING_TESTS=ON -G "${{matrix.gen}}" -A ${{matrix.arch}} ..
- name: Build
run: cmake --build build --config Release
- name: Run basic tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vs17-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Configure
run: |
mkdir build
cd build && cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} ..
cd build && cmake -DENABLE_ROARING_TESTS=ON -G "${{matrix.gen}}" -A ${{matrix.arch}} ..
- name: Build
run: cmake --build build --config Release
- name: Run basic tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vs17-clang-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Configure
run: |
mkdir build
cd build && cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -T ClangCL ..
cd build && cmake -DENABLE_ROARING_TESTS=ON -G "${{matrix.gen}}" -A ${{matrix.arch}} -T ClangCL ..
- name: Build
run: cmake --build build --config Release --parallel
- name: Run basic tests
Expand Down
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,17 @@ option(ROARING_BUILD_C_TESTS_AS_CPP "Build test C files using C++ compilation" O
option(ROARING_SANITIZE "Sanitize addresses" OFF)
option(ROARING_SANITIZE_THREADS "Sanitize threads" OFF)

option(ENABLE_ROARING_TESTS "If OFF, disable unit tests altogether" ${BUILD_TESTING})
option(ENABLE_ROARING_TESTS "If OFF, disable unit tests altogether" ON)
if(NOT ENABLE_ROARING_TESTS)
message(STATUS "Tests are disabled, you can enabled them by setting ENABLE_ROARING_TESTS to ON")
endif()

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/tools/cmake")

include(cmake/CPM.cmake)
find_package(CTargets)
find_package(Options)
find_package(LTO)
include(cmake/CPM.cmake)

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/roaring.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/roaring.pc" @ONLY)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ Linux or macOS users might follow the following instructions if they have a rece

1. Pull the library in a directory
```
wget https://github.com/RoaringBitmap/CRoaring/releases/download/v2.0.3/roaring.c
wget https://github.com/RoaringBitmap/CRoaring/releases/download/v2.0.3/roaring.h
wget https://github.com/RoaringBitmap/CRoaring/releases/download/v2.0.3/roaring.hh
wget https://github.com/RoaringBitmap/CRoaring/releases/download/v2.0.4/roaring.c
wget https://github.com/RoaringBitmap/CRoaring/releases/download/v2.0.4/roaring.h
wget https://github.com/RoaringBitmap/CRoaring/releases/download/v2.0.4/roaring.hh
```
2. Create a new file named `demo.c` with this content:
```C
Expand Down

0 comments on commit 88a8b4a

Please sign in to comment.