Gprof #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |