Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ jobs:
run: |
mkdir "build"
cd "build"
cmake .. -DCMAKE_BUILD_TYPE="${{ matrix.type }}"
make -j"$(sysctl -n hw.ncpu)" shim
make check
cmake .. -DCMAKE_BUILD_TYPE="${{ matrix.type }}" -DENABLE_LIBCORRECT_TEST=ON
make -j"$(sysctl -n hw.ncpu)" shim test_runners
cd "tests"
ctest -C "${{ matrix.type }}" --output-on-failure
Windows:
strategy:
matrix:
Expand All @@ -77,7 +78,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -G "${{ matrix.vs_version.generator }}" -A "${{ matrix.architecture }}"
cmake .. -G "${{ matrix.vs_version.generator }}" -A "${{ matrix.architecture }}" -DENABLE_LIBCORRECT_TEST=ON
cmake --build . --config "${{ matrix.type }}" --target shim
cmake --build . --config "${{ matrix.type }}" --target test_runners
cd "tests"
Expand Down
14 changes: 9 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ project(Correct
DESCRIPTION "Forward Error Correction Library")

set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD_REQUIRED ON)

include(CheckLibraryExists)
include(CheckIncludeFiles)
include(CheckCSourceCompiles)
include(CMakePushCheckState)
include(CheckCCompilerFlag)

option(ENABLE_LIBCORRECT_TEST "Build tests" OFF)

# Compiler and build settings
if(MSVC)
set(LIBM "")
Expand Down Expand Up @@ -172,10 +174,12 @@ if(HAVE_SSE)
endif()

# Additional components
add_subdirectory(util)
add_subdirectory(tests)
add_subdirectory(tools)
# add_subdirectory(benchmarks)
if(ENABLE_LIBCORRECT_TEST)
add_subdirectory(util)
add_subdirectory(tests)
add_subdirectory(tools)
# add_subdirectory(benchmarks)
endif()

# Installation rules
include(GNUInstallDirs)
Expand Down
8 changes: 5 additions & 3 deletions container_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ for COMPILER in "$(which "gcc")" "$(which "clang")"; do
rm -rf "build"
mkdir "build"
cd "build"
cmake .. -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -DCMAKE_C_COMPILER="${COMPILER}"
make -j"$(nproc)" shim
make check
cmake .. -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -DCMAKE_C_COMPILER="${COMPILER}" -DENABLE_LIBCORRECT_TEST=ON
make -j"$(nproc)" shim test_runners
cd "tests"
ctest -C "${BUILD_TYPE}" --output-on-failure
cd -
cd -
done
done
Loading