Refactor cmake convention (#64) #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Doxygen | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- '*' | |
env: | |
BUILD_DIRECTORY: build/doxygen | |
DOCKERFILE: docker/Dockerfile.doxygen | |
DOCKER_BUILDIMAGE: libcore-doxygen | |
DOCKER_BUILDIMAGE_WORKDIR: /mnt/workspace | |
jobs: | |
doxygen-build: | |
name: Doxygen Check | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
submodules: recursive | |
- name: Build docker image | |
run: | | |
docker build -t ${{ env.DOCKER_BUILDIMAGE }}:latest -f ${{ env.DOCKERFILE }} . | |
- name: Generate doxygen | |
run: | | |
docker run --rm -v $(pwd):${{ env.DOCKER_BUILDIMAGE_WORKDIR }} ${{ env.DOCKER_BUILDIMAGE }}:latest sh -c " \ | |
cmake -S . -B ${{ env.BUILD_DIRECTORY }} \ | |
-DCMAKE_BUILD_TYPE=Debug \ | |
-DCMAKE_C_COMPILER=clang-14 \ | |
-DCMAKE_CXX_COMPILER=clang++-14 \ | |
-Dlibcore_DOXYGEN_BUILD_ENABLED=ON | |
cmake --build ${{ env.BUILD_DIRECTORY }} --target doxygen -- --no-print-directory | |
doxygen ${{ env.BUILD_DIRECTORY }}/doxygen/Doxyfile | |
" |