Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a build docs workflow for testing doc building on PRs #44

Closed
wants to merge 5 commits into from
Closed
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
45 changes: 45 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build Docs

on:
pull_request:
branches: [ main ]
paths:
# Only build if there has been a change in the following files
- 'src/**.h'
- 'src/**.cpp'
- 'documentation/**.md'
- '.github/workflows/build-docs.yml'

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
runs-on: ubuntu-latest
env:
CXX: /usr/bin/g++-10
steps:
- uses: actions/checkout@v2

- name: Install Doxygen
# Install doxygen from apt
run: |
sudo apt-get update
sudo apt-get -y install doxygen graphviz

- name: Configure CMake
# Configure CMake in a 'build' subdirectory.
run: >
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_CXX_COMPILER=${{ env.CXX }}
-DBUILD_TESTS=OFF
-DBUILD_DOXYGEN=ON

- name: Build
# Build your program with the given configuration
run: >
cmake --build ${{github.workspace}}/build
--config ${{env.BUILD_TYPE}}
--target doxygen-docs
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,14 @@ on:
- 'src/**.h'
- 'src/**.cpp'
- 'documentation/**.md'
- '.github/workflows/documentation.yml'
- '.github/workflows/deploy_docs.yml'

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
env:
CXX: /usr/bin/g++-10
Expand All @@ -31,13 +28,20 @@ jobs:
sudo apt-get -y install doxygen graphviz

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=${{ env.CXX }} -DBUILD_TESTS=OFF
# Configure CMake in a 'build' subdirectory.
run: >
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_CXX_COMPILER=${{ env.CXX }}
-DBUILD_TESTS=OFF
-DBUILD_DOXYGEN=ON

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target doxygen-docs
run: >
cmake --build ${{github.workspace}}/build
--config ${{env.BUILD_TYPE}}
--target doxygen-docs

- name: Update Doxygen Pages
run: |
Expand Down