Skip to content

Commit

Permalink
[CI] Added run of unit tests (gtest)
Browse files Browse the repository at this point in the history
  • Loading branch information
DronCode committed Jan 23, 2024
1 parent ab3c95a commit 2f76de6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,24 @@ jobs:
cd build
cmake --build . --config MinSizeRel
# Make python packages (whl)
# Install Clang 16.0.4 (for testing env)
- name: Install Clang TestEnv
uses: egor-tensin/setup-clang@v1
with:
version: "16.0.4"
platform: x64

- name: Print Clang Info
run: clang++ --version

# Run Unit Tests
- name: RG3 Run unit tests
run: |
cd build
ctest . --verbose --output-on-failure
# Run Integration Tests TODO
# Make python packages (whl) TODO

# Make dist folder with pyd & pyi files.
- name: Create distribution package
Expand All @@ -103,9 +120,11 @@ jobs:
mv PyBind/rg3py.pyi dist
mv build/PyBind/MinSizeRel/rg3py.pyd dist
# Upload artifacts. TODO: Upload whl artifacts too!
# Upload artifacts
- name: Upload RG3 artifacts
uses: actions/upload-artifact@v2
with:
name: "RG3"
name: RG3_${{ runner.os }}_Python310
path: dist

# Upload WHL artifacts
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ add_subdirectory(Cpp)
add_subdirectory(LLVM)
add_subdirectory(PyBind)

# Unit tests
add_subdirectory(ThirdParty/googletest)
add_subdirectory(Tests/Unit)

add_subdirectory(Tests/Unit)
enable_testing()
add_test(NAME rg3_unit COMMAND $<TARGET_FILE:RG3_Unit> WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/Tests")

0 comments on commit 2f76de6

Please sign in to comment.