Skip to content

Commit 275b9f8

Browse files
committed
ci: Beman.Optional demo
1 parent 9afeded commit 275b9f8

File tree

3 files changed

+70
-3
lines changed

3 files changed

+70
-3
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -676,10 +676,35 @@ jobs:
676676
mkdir -p ../build/docs-local
677677
cp -vr build/site/* ../build/docs-local
678678
679-
- name: Generate Demos
679+
- name: Clone Beman.Optional
680+
uses: actions/checkout@v4
681+
with:
682+
repository: steve-downey/optional
683+
ref: main
684+
path: beman-optional
685+
686+
- name: Patch Demo Projects
687+
shell: bash
680688
run: |
689+
set -euo pipefail
681690
set -x
682691
692+
for project in beman-optional; do
693+
src="./examples/third-party/$project"
694+
dst="./$project"
695+
696+
[ -d "$src" ] || { echo "Source not found: $src" >&2; exit 1; }
697+
mkdir -p "$dst"
698+
699+
# Mirror contents of $src into $dst, overwriting existing files
700+
tar -C "$src" -cf - . | tar -C "$dst" -xpf -
701+
done
702+
703+
704+
- name: Generate Demos
705+
run: |
706+
set -x
707+
683708
declare -a generators=(
684709
"adoc"
685710
"xml"
@@ -691,16 +716,18 @@ jobs:
691716
for generator in "${generators[@]}"; do
692717
[[ $generator = xml && $variant = multi ]] && continue
693718
[[ $variant = multi ]] && multipage="true" || multipage="false"
694-
# mrdocs boost.url demo
719+
# boost.url demo
695720
mrdocs --config="$(pwd)/boost/libs/url/doc/mrdocs.yml" "../CMakeLists.txt" --output="$(pwd)/demos/boost-url/$variant/$generator" --multipage=$multipage --generator="$generator" --log-level=debug
696721
echo "Number of files in demos/boost-url/$variant/$generator: $(find demos/boost-url/$variant/$generator -type f | wc -l)"
722+
# beman.optional demo
723+
mrdocs --config="$(pwd)/beman-optional/docs/mrdocs.yml" --output="$(pwd)/demos/beman-optional/$variant/$generator" --multipage=$multipage --generator="$generator" --log-level=debug
697724
# mrdocs documenting mrdocs demo
698725
mrdocs --config="$(pwd)/docs/mrdocs.yml" "$(pwd)/CMakeLists.txt" --output="$(pwd)/demos/mrdocs/$variant/$generator" --multipage=$multipage --generator="$generator" --log-level=debug
699726
done
700727
701728
# Render the asciidoc files to html using asciidoctor
702729
if [[ ${{ runner.os }} == 'Linux' ]]; then
703-
for project in boost-url mrdocs; do
730+
for project in boost-url beman-optional mrdocs; do
704731
root="$(pwd)/demos/$project/$variant"
705732
src="$root/adoc"
706733
dst="$root/adoc-asciidoc"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
source-root: ..
2+
input:
3+
- ../include
4+
exclude:
5+
- ../include/beman/optional/detail
6+
exclude-patterns:
7+
- ../include/beman/optional/detail/**
8+
includes:
9+
- ../include
10+
file-patterns:
11+
- '*.hpp'
12+
include-symbols:
13+
- 'beman::optional::**'
14+
implementation-defined:
15+
- 'beman::optional::detail'
16+
multipage: true
17+
generator: adoc

examples/third-party/projects.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[
2+
{
3+
"name": "Boost.URL",
4+
"id": "boost-url",
5+
"repository": "https://www.github.com/boostorg/url",
6+
"branch": "develop",
7+
"config": "doc/mrdocs.yml"
8+
},
9+
{
10+
"name": "Beman.Optional",
11+
"id": "beman-optional",
12+
"repository": "https://www.github.com/steve-downey/optional",
13+
"branch": "main",
14+
"config": "docs/mrdocs.yml"
15+
},
16+
{
17+
"name": "Mr.Docs",
18+
"id": "mrdocs",
19+
"repository": "https://www.github.com/cppalliance/mrdocs",
20+
"branch": "develop",
21+
"config": "docs/mrdocs.yml"
22+
}
23+
]

0 commit comments

Comments
 (0)