forked from zillevdr/vdr-plugin-softhddevice-drm
-
Notifications
You must be signed in to change notification settings - Fork 6
96 lines (80 loc) · 2.68 KB
/
Copy pathdoxygen.yml
File metadata and controls
96 lines (80 loc) · 2.68 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Generate and deploy doxygen documentation
on:
push:
branches: drm-atomic-gles
workflow_dispatch:
inputs:
folder:
description: 'Folder for doxygen html output'
required: true
default: "srcdoc/html"
config_file:
description: 'Path to doxygen config file'
required: true
default: "doxygen/Doxyfile"
permissions:
contents: read
pages: write
id-token: write
env:
DOXYGEN_OUTPUT: srcdoc/html
DOXYGEN_CONFIG: doxygen/Doxyfile
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout plugin repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Compute git version
shell: bash
run: |
set -e
if git describe --tags --exact-match HEAD >/dev/null 2>&1 \
&& git diff --quiet \
&& git diff --cached --quiet; then
GIT_DESCRIBE_VERSION=""
else
HASH=$(git describe --tags --always --dirty --exclude "*" 2>/dev/null || echo "unknown")
GIT_DESCRIBE_VERSION="-$HASH"
fi
echo "GIT_DESCRIBE_VERSION=$GIT_DESCRIBE_VERSION" >> $GITHUB_ENV
- name: Setup pages
uses: actions/configure-pages@v5
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y graphviz doxygen
- name: Resolve inputs
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "DOXYGEN_OUTPUT=${{ inputs.folder }}" >> $GITHUB_ENV
echo "DOXYGEN_CONFIG=${{ inputs.config_file }}" >> $GITHUB_ENV
fi
- name: Configure doxygen
run: |
cp "$DOXYGEN_CONFIG" "$DOXYGEN_CONFIG.tmp"
BASE_VERSION=$(grep -R 'static const char \*const VERSION *=' softhddevice-drm-gles.cpp \
| awk '{ print $7 }' | sed 's/[";]//g' | head -n1)
PROJECT_VERSION="${BASE_VERSION}${GIT_DESCRIBE_VERSION}"
echo "PROJECT_NUMBER=$PROJECT_VERSION" >> "$DOXYGEN_CONFIG.tmp"
echo "Set documentation version nummer to $PROJECT_VERSION"
- name: Run doxygen
run: doxygen $DOXYGEN_CONFIG.tmp
- name: Create .nojekyll (ensures pages with underscores work on gh pages)
run: touch $DOXYGEN_OUTPUT/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: ${{ env.DOXYGEN_OUTPUT }}
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to github pages
id: deployment
uses: actions/deploy-pages@v4