Skip to content

Add a safe version of parsing broma files so that the code doesn't have to exit #41

Add a safe version of parsing broma files so that the code doesn't have to exit

Add a safe version of parsing broma files so that the code doesn't have to exit #41

Workflow file for this run

name: 'Generate Broma docs'
on: [push, pull_request]
env:
HDOC_VERSION: '1.4.1'
jobs:
build-hdoc:
runs-on: ubuntu-latest
steps:
- name: Restore cached hdoc binary
id: hdoc-cache
uses: actions/cache/restore@v4
with:
path: build
key: ${{ env.HDOC_VERSION }}
- name: Checkout hdoc repo
if: steps.hdoc-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: 'hdoc/hdoc'
ref: ${{ env.HDOC_VERSION }}
- name: Install build dependencies
if: steps.hdoc-cache.outputs.cache-hit != 'true'
run: |
sudo apt-get install -y clang llvm meson xxd libssl-dev libclang-dev libclang-cpp-dev
- name: Build hdoc
if: steps.hdoc-cache.outputs.cache-hit != 'true'
run: |
meson setup build
ninja -C build
- name: Upload hdoc binary to cache
if: steps.hdoc-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: build
key: ${{ env.HDOC_VERSION }}
- name: Upload hdoc binary
uses: actions/upload-artifact@v4
with:
name: hdoc
path: build/hdoc
build:
runs-on: ubuntu-latest
needs: build-hdoc
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Get compile_commands.json
run: CMAKE_EXPORT_COMPILE_COMMANDS=1 cmake -B build
- name: Download hdoc binary
uses: actions/download-artifact@v4
with:
name: hdoc
- name: Install hdoc dependencies
run: |
sudo apt-get install -y llvm libssl-dev libclang-cpp-dev
- name: Run hdoc
run: |
chmod +x ./hdoc
./hdoc --verbose
- name: Upload docs
uses: actions/upload-pages-artifact@v3
with:
path: doc-build/
upload:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- name: Deploy docs
id: deploy
uses: actions/deploy-pages@v4