Skip to content

Commit

Permalink
Merge pull request #28 from maxortner01/documentation
Browse files Browse the repository at this point in the history
Merge pull request #27 from maxortner01/documentation
  • Loading branch information
maxortner01 committed Jun 20, 2024
2 parents c77490f + 4475620 commit 862049e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 30 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ jobs:
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: "Python env"
run: python3 -m venv ${{ steps.strings.outputs.build-output-dir }}/env &&
source ${{ steps.strings.outputs.build-output-dir }}/env/bin/activate &&
python3 -m pip install requests Wand

# Runs a single command using the runners shell
- name: Configure docs
run: cmake -B ${{ steps.strings.outputs.build-output-dir }} -DSL_BUILD_LIB=OFF -DSL_BUILD_DOCS=ON -S ${{ github.workspace }}
Expand All @@ -51,12 +56,15 @@ jobs:
run: cmake --build ${{ steps.strings.outputs.build-output-dir }}

- name: Run kcov
run: sudo ${{ steps.strings.outputs.build-output-dir }}/kcov-prefix/src/kcov-build/src/kcov --include-path=../include ${{ steps.strings.outputs.build-output-dir }}/cov_hello_test ${{ steps.strings.outputs.build-output-dir }}/hello_test &&
sudo ${{ steps.strings.outputs.build-output-dir }}/kcov-prefix/src/kcov-build/src/kcov --include-path=../include ${{ steps.strings.outputs.build-output-dir }}/cov_lua_file ${{ steps.strings.outputs.build-output-dir }}/lua_file &&
sudo ${{ steps.strings.outputs.build-output-dir }}/kcov-prefix/src/kcov-build/src/kcov --merge ${{ steps.strings.outputs.build-output-dir }}/coverage ${{ steps.strings.outputs.build-output-dir }}/cov_* &&
sudo rsync -av ${{ steps.strings.outputs.build-output-dir }}/coverage/. ${{ steps.strings.outputs.build-output-dir }}/docs/html --exclude=index.html &&
sudo cp ${{ steps.strings.outputs.build-output-dir }}/coverage/index.html ${{ steps.strings.outputs.build-output-dir }}/docs/html/coverage.html &&
sudo python3 ${{ github.workspace }}/docs/get_url.py ${{ steps.strings.outputs.build-output-dir }}/docs/html
run: sudo ${{ steps.strings.outputs.build-output-dir }}/kcov-prefix/src/kcov-build/src/kcov --include-path=${{ github.workspace }}/include ${{ steps.strings.outputs.build-output-dir }}/cov_hello_test ${{ steps.strings.outputs.build-output-dir }}/hello_test &&
sudo ${{ steps.strings.outputs.build-output-dir }}/kcov-prefix/src/kcov-build/src/kcov --include-path=${{ github.workspace }}/include ${{ steps.strings.outputs.build-output-dir }}/cov_lua_file ${{ steps.strings.outputs.build-output-dir }}/lua_file &&
sudo ${{ steps.strings.outputs.build-output-dir }}/kcov-prefix/src/kcov-build/src/kcov --merge ${{ steps.strings.outputs.build-output-dir }}/coverage ${{ steps.strings.outputs.build-output-dir }}/cov_*

- name: Run codacy-coverage-reporter
uses: codacy/[email protected]
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ${{ steps.strings.outputs.build-output-dir }}/coverage/kcov-merged/cobertura.xml

- name: Create GitHub Pages artifact
uses: actions/[email protected]
Expand Down
9 changes: 0 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,4 @@ if (SL_BUILD_DOCS)
else (DOXYGEN_FOUND)
message(FATAL_ERROR "Doxygen need to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND)
endif()

if (SL_CODE_COVERAGE AND SL_BUILD_DOCS)
add_custom_command(TARGET kcov
DEPENDS t3.txt doc_doxygen
COMMAND rsync -av ${CMAKE_CURRENT_BINARY_DIR}/coverage/. ${CMAKE_CURRENT_BINARY_DIR}/docs/html --exclude=index.html &&
cp ${CMAKE_CURRENT_BINARY_DIR}/coverage/index.html ${CMAKE_CURRENT_BINARY_DIR}/docs/html/coverage.html &&
python3 ${CMAKE_SOURCE_DIR}/docs/get_url.py ${CMAKE_CURRENT_BINARY_DIR}/docs/html # now we need to create the forward to the correct badge
)
endif()
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Simple Lua (for C++)
![tests](https://github.com/maxortner01/simple-lua/actions/workflows/cmake.yml/badge.svg)
![tests](https://simple-lua.maxortner.com/coverage-badge.html)

[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4e777b1081814652826ddf09b8594b1b)](https://app.codacy.com/gh/maxortner01/simple-lua/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)

[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/4e777b1081814652826ddf09b8594b1b)](https://app.codacy.com/gh/maxortner01/simple-lua/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)

This is a basic C++ interface for using a Lua runtime and getting data to and from Lua scripts. For detailed documentation [check out the docs page](https://simple-lua.maxortner.com).
14 changes: 0 additions & 14 deletions docs/get_url.py

This file was deleted.

0 comments on commit 862049e

Please sign in to comment.