Repository navigation
76 lines (73 loc) · 2.52 KB
/
Copy pathdocumentation.yml
File metadata and controls
76 lines (73 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Documentation
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
check-docs:
name: Check documentation and examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Markdown links
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
config-file: '.github/markdown-link-check-config.json'
folder-path: '.'
file-extension: '.md'
- name: Build documented examples as C++17
run: |
cmake -S . -B build \
-DTHREADSCHEDULE_BUILD_EXAMPLES=ON \
-DTHREADSCHEDULE_BUILD_DOCS=OFF \
-DTHREADSCHEDULE_INSTALL=ON \
-DCMAKE_CXX_STANDARD=17
cmake --build build --parallel
- name: Build the C++20 jthread example
run: |
cmake -S . -B build-cxx20 \
-DTHREADSCHEDULE_BUILD_EXAMPLES=ON \
-DTHREADSCHEDULE_BUILD_DOCS=OFF \
-DCMAKE_CXX_STANDARD=20
cmake --build build-cxx20 --target jthread_example --parallel
./build-cxx20/examples/jthread_example
- name: Test the installed getting-started project
run: |
cmake --install build --prefix "$PWD/install"
cmake -S examples/getting_started -B getting-started-build \
-DCMAKE_PREFIX_PATH="$PWD/install"
cmake --build getting-started-build --parallel
ctest --test-dir getting-started-build --output-on-failure
- name: Validate release documentation
run: |
test -f docs/API.md
test -f docs/ADVANCED.md
test -f docs/COMPATIBILITY.md
test -f docs/CMAKE_REFERENCE.md
test -f docs/MIGRATION_V3.md
grep -q '#include <threadschedule/threadschedule.hpp>' README.md
deploy-docs:
name: Build and deploy Doxygen
if: github.ref == 'refs/heads/main'
needs: check-docs
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
- run: sudo apt-get update && sudo apt-get install -y doxygen graphviz
- run: cmake -S . -B build -DTHREADSCHEDULE_BUILD_DOCS=ON
- run: cmake --build build --target docs --parallel
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: build/docs/doxygen/html
- uses: actions/deploy-pages@v4