Skip to content

Commit

Permalink
Fix testing
Browse files Browse the repository at this point in the history
  • Loading branch information
lucteo committed May 6, 2024
1 parent c375331 commit ad51a4b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
with:
checks: build test install warnings
cc: gcc
cmakeflags: -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=On
ctestflags: --test-dir /tmp/build/test
clang-format:
runs-on: ubuntu-latest
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test-gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ startTest "GCC compilation"
BUILDDIR="build/gh-checks/gcc/"
mkdir -p "${CURDIR}/../../${BUILDDIR}"

# Remove any cached version of conan profiles
rm -fR ${CURDIR}/../../build/gh-checks/conan-cache/profiles

# Run docker with action-cxx-toolkit to check our code
docker run ${DOCKER_RUN_PARAMS} \
-e INPUT_BUILDDIR="/github/workspace/${BUILDDIR}" \
-e INPUT_CC='gcc' \
-e INPUT_CHECKS='build test install warnings' \
-e INPUT_CMAKEFLAGS="-DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=On" \
-e INPUT_CTESTFLAGS="--test-dir /github/workspace/${BUILDDIR}/test" \
$IMAGENAME
status=$?
printStatus $status
11 changes: 10 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@ set(sourceFiles
"test_c_compilation.c"
)

find_package(Catch2 REQUIRED CONFIG)
Include(FetchContent)

FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.4.0 # or a later release
)

FetchContent_MakeAvailable(Catch2)


# Add the tests executable
add_executable(test.context_core_api ${sourceFiles})
Expand Down

0 comments on commit ad51a4b

Please sign in to comment.