mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-21 01:59:44 +00:00
bcae6f204a
Bumps the actions group with 3 updates: [actions/checkout](https://github.com/actions/checkout), [actions/cache](https://github.com/actions/cache) and [cloudflare/wrangler-action](https://github.com/cloudflare/wrangler-action). Updates `actions/checkout` from 6 to 7 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6...v7) Updates `actions/cache` from 5 to 6 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v5...v6) Updates `cloudflare/wrangler-action` from 3 to 4 - [Release notes](https://github.com/cloudflare/wrangler-action/releases) - [Changelog](https://github.com/cloudflare/wrangler-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/cloudflare/wrangler-action/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/cache dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: cloudflare/wrangler-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com>
89 lines
2.8 KiB
YAML
89 lines
2.8 KiB
YAML
name: Docs checker
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
|
|
|
jobs:
|
|
docs-checker:
|
|
name: New doxygen warnings checker
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 4
|
|
|
|
- name: Get pull-request commits
|
|
uses: OpenTTD/actions/checkout-pull-request@v6
|
|
|
|
- name: Install Doxygen
|
|
uses: ./.github/install-doxygen
|
|
|
|
- name: Build docs for PR
|
|
run: |
|
|
mkdir build
|
|
|
|
echo "::group::CMake"
|
|
cmake -S . -B build -DOPTION_DOCS_ONLY=ON -DOPTION_LINE_IN_DOXYGEN_WARNINGS=OFF -DOPTION_DOXYGEN_GS_WARN_FILE="Warnings.GS" -DOPTION_DOXYGEN_AI_WARN_FILE="Warnings.AI" -DOPTION_DOXYGEN_WARN_FILE="Warnings.source"
|
|
echo "::endgroup::"
|
|
|
|
echo "::group::Build Source"
|
|
cmake --build build --target docs_source
|
|
python3 .github/sort_doxygen_warnings.py build/Warnings.source doxygen_warnings.PR
|
|
echo "::endgroup::"
|
|
|
|
echo "::group::Build AI"
|
|
cmake --build build --target docs_ai
|
|
python3 .github/sort_doxygen_warnings.py build/Warnings.AI doxygen_AI_warnings.PR
|
|
echo "::endgroup::"
|
|
|
|
echo "::group::Build GS"
|
|
cmake --build build --target docs_game
|
|
python3 .github/sort_doxygen_warnings.py build/Warnings.GS doxygen_GS_warnings.PR
|
|
echo "::endgroup::"
|
|
|
|
rm -r build
|
|
|
|
- name: Build docs for base branch
|
|
run: |
|
|
git checkout HEAD^
|
|
mkdir build
|
|
|
|
echo "::group::CMake"
|
|
cmake -S . -B build -DOPTION_DOCS_ONLY=ON -DOPTION_LINE_IN_DOXYGEN_WARNINGS=OFF -DOPTION_DOXYGEN_GS_WARN_FILE="Warnings.GS" -DOPTION_DOXYGEN_AI_WARN_FILE="Warnings.AI" -DOPTION_DOXYGEN_WARN_FILE="Warnings.source"
|
|
echo "::endgroup::"
|
|
|
|
echo "::group::Build Source"
|
|
cmake --build build --target docs_source
|
|
python3 .github/sort_doxygen_warnings.py build/Warnings.source doxygen_warnings.base
|
|
echo "::endgroup::"
|
|
|
|
echo "::group::Build AI"
|
|
cmake --build build --target docs_ai
|
|
python3 .github/sort_doxygen_warnings.py build/Warnings.AI doxygen_AI_warnings.base
|
|
echo "::endgroup::"
|
|
|
|
echo "::group::Build GS"
|
|
cmake --build build --target docs_game
|
|
python3 .github/sort_doxygen_warnings.py build/Warnings.GS doxygen_GS_warnings.base
|
|
echo "::endgroup::"
|
|
|
|
rm -r build
|
|
|
|
- name: Compare doxygen warnings and errors
|
|
run: |
|
|
unset FAIL
|
|
|
|
diff doxygen_warnings.base doxygen_warnings.PR | grep '^>' && FAIL=1
|
|
diff doxygen_AI_warnings.base doxygen_AI_warnings.PR | grep '^>' && FAIL=1
|
|
diff doxygen_GS_warnings.base doxygen_GS_warnings.PR | grep '^>' && FAIL=1
|
|
|
|
if [ $FAIL ]; then
|
|
exit 1;
|
|
fi
|