Skip to content

Commit 2107015

Browse files
committed
Update github workflow to deploy github page #15
1 parent ffeff9e commit 2107015

1 file changed

Lines changed: 20 additions & 15 deletions

File tree

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
2-
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
31
name: CMake on a single platform
42

53
on:
@@ -9,34 +7,41 @@ on:
97
branches: [ "main" ]
108

119
env:
12-
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
1310
BUILD_TYPE: Release
1411

1512
jobs:
1613
build:
17-
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
18-
# You can convert this to a matrix build if you need cross-platform coverage.
19-
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
2014
runs-on: ubuntu-latest
2115

2216
steps:
2317
- uses: actions/checkout@v3
2418

25-
- name: Install xmllint
26-
run: sudo apt-get install -y xsltproc
19+
- name: Install dependencies
20+
run: |
21+
sudo apt-get install -y xsltproc doxygen lcov
2722
2823
- name: Configure CMake
29-
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
30-
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
3124
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
3225

3326
- name: Build
34-
# Build your program with the given configuration
3527
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
3628

3729
- name: Test
3830
working-directory: ${{github.workspace}}/build
39-
# Execute tests defined by the CMake configuration.
40-
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
41-
run: ctest -C ${{env.BUILD_TYPE}}
42-
31+
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure
32+
33+
- name: Generate Doxygen Documentation
34+
run: doxygen doc/Doxyfile
35+
36+
- name: Run tests and generate coverage
37+
run: |
38+
lcov --capture --directory ${{github.workspace}}/build --output-file coverage.info
39+
genhtml coverage.info --output-directory coverage
40+
41+
- name: Deploy Doxygen Documentation and Coverage to GitHub Pages
42+
uses: peaceiris/actions-gh-pages@v3
43+
with:
44+
github_token: ${{ secrets.GITHUB_TOKEN }}
45+
publish_dir: |
46+
./doc/html
47+
./coverage

0 commit comments

Comments
 (0)