Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN if [ "${REINSTALL_CMAKE_VERSION_FROM_SOURCE}" != "none" ]; then \

# [Optional] Uncomment this section to install additional packages.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends lsb-release wget software-properties-common gnupg ninja-build
&& apt-get -y install --no-install-recommends lsb-release wget software-properties-common gnupg ninja-build doxygen graphviz

COPY ./reinstall-llvm.sh /tmp/

Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Documentation

on:
push:
branches: [main]

# Allow manual trigger from the Actions tab.
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build-docs:
name: Build Documentation
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Doxygen and Graphviz
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz

- name: Configure CMake
# We only need to configure so that Docs.cmake downloads the theme.
run: cmake --workflow --preset docs

- name: Upload artifact for Pages
uses: actions/upload-pages-artifact@v3
with:
path: build/docs/html

deploy:
name: Deploy to GitHub Pages
needs: build-docs
runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

include(CompileCommands)
include(Coverage)
include(Docs)

# Enable copying of compile_commands.json to project root
copy_compile_commands()
Expand Down
35 changes: 35 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,21 @@
"STRICT_BUILD": "OFF",
"ENABLE_COVERAGE": "ON"
}
},
{
"name": "config-docs",
"displayName": "Documentation",
"description": "Configure build for Doxygen documentation generation",
"binaryDir": "${sourceDir}/build/docs",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_C_COMPILER": "/usr/bin/gcc",
"CMAKE_CXX_COMPILER": "/usr/bin/g++",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/third/vcpkg/scripts/buildsystems/vcpkg.cmake",
"STRICT_BUILD": "OFF"
}
}
],
"buildPresets": [
Expand Down Expand Up @@ -108,6 +123,13 @@
"configurePreset": "config-coverage",
"displayName": "Coverage",
"description": "Build with code coverage enabled"
},
{
"name": "build-docs",
"configurePreset": "config-docs",
"displayName": "Documentation",
"description": "Build Doxygen documentation",
"targets": ["docs"]
}
],
"testPresets": [
Expand Down Expand Up @@ -214,6 +236,19 @@
"name": "test-coverage"
}
]
},
{
"name": "docs",
"steps": [
{
"type": "configure",
"name": "config-docs"
},
{
"type": "build",
"name": "build-docs"
}
]
}
]
}
Loading
Loading