forked from KallistiOS/KallistiOS
-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (49 loc) · 1.7 KB
/
pr-docs-check.yml
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
name: Doxygen Check on PRs
on:
pull_request:
branches:
- master
paths:
- 'include/**'
- 'kernel/arch/dreamcast/include/**'
- 'addons/include/**'
- 'doc/**'
- 'README.md'
jobs:
doxygen:
runs-on: ubuntu-latest
env:
KOS_BASE: ${{ github.workspace }} # Sets KOS_BASE to the repository root
KOS_ARCH: dreamcast
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache Doxygen 1.11.0
uses: actions/cache@v4
id: cache-doxygen
with:
path: ./doxygen-1.11.0
key: doxygen-1.11.0-${{ runner.os }}
- name: Install Doxygen 1.11.0
run: |
if [ ! -f doxygen-1.11.0/bin/doxygen ]; then
sudo apt install -y wget
wget https://github.com/doxygen/doxygen/releases/download/Release_1_11_0/doxygen-1.11.0.linux.bin.tar.gz
tar -xzf doxygen-1.11.0.linux.bin.tar.gz
rm doxygen-1.11.0.linux.bin.tar.gz
fi
sudo cp doxygen-1.11.0/bin/* /usr/local/bin/
- name: Generate Doxygen Documentation and Display Warnings Only
run: |
# Run Doxygen and redirect all output to a temporary log
doxygen doc/DoxyfileCheck > doxygen_output.log 2>&1
# Count the warnings and store the count in a variable
warning_count=$(grep -c "warning:" doxygen_output.log)
# Extract only warnings and display them if any are found
if [ "$warning_count" -gt 1 ]; then
echo "Doxygen generated warnings:"
grep "warning:" doxygen_output.log
exit 1
else
echo "Doxygen documentation generated succesfully."
fi