Skip to content

refactor: migrate to modules and support module-based document genera… #9

refactor: migrate to modules and support module-based document genera…

refactor: migrate to modules and support module-based document genera… #9

Workflow file for this run

name: generate-docs
on:
push:
branches: ["main"]
pull_request:
workflow_dispatch:
jobs:
generate:
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Checkout clore
uses: actions/checkout@v6
- name: Setup pixi
uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.67.0
activate-environment: true
cache: true
locked: true
- name: Restore compiler cache
uses: actions/cache@v5
with:
path: .cache/sccache
key: Windows-sccache-${{ github.sha }}
restore-keys: |
Windows-sccache-
- name: Restore configure artifacts cache
id: restore-configure-cache
uses: actions/cache/restore@v5
with:
path: |
build/RelWithDebInfo/.llvm
build/RelWithDebInfo/include
build/RelWithDebInfo/_deps
build/RelWithDebInfo/*.tar.*
key: >-
Windows-configure-RelWithDebInfo-${{
hashFiles('pixi.lock', 'pixi.toml', '**/CMakeLists.txt', 'cmake/**/*.cmake')
}}-${{ github.sha }}
restore-keys: |
Windows-configure-RelWithDebInfo-${{ hashFiles('pixi.lock', 'pixi.toml', '**/CMakeLists.txt', 'cmake/**/*.cmake') }}-
- name: Start sccache
run: sccache --start-server
- name: Configure
run: pixi run cmake-config
- name: Save configure artifacts cache
if: success()
uses: actions/cache/save@v5
with:
path: |
build/RelWithDebInfo/.llvm
build/RelWithDebInfo/include
build/RelWithDebInfo/_deps
build/RelWithDebInfo/*.tar.*
key: ${{ steps.restore-configure-cache.outputs.cache-primary-key }}
- name: Build
run: pixi run cmake-build
- name: Generate documentation
run: |
./build/RelWithDebInfo/bin/clore `
--compile-commands build/RelWithDebInfo/compile_commands.json `
--source-dir src `
--output-dir generated `
--log-level info `
--dry-run
- name: Package documentation
run: Compress-Archive -Path generated/* -DestinationPath clore-docs.zip
- name: Upload documentation artifact
uses: actions/upload-artifact@v7
with:
name: clore-docs
path: clore-docs.zip
retention-days: 30