mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 11:03:25 -08:00
* pin used actions plus some reordering and harmonization across files * [CI] Link the version string and RNG stub into the test targets The distribution libgtest.a now used by the Linux images makes the linker pull more translation units out of libcockatrice_network than the fetched googletest did. Those units reference VERSION_STRING and the global rng, which several test targets never defined, so the instrumented Ubuntu 26.04 legs failed at link: undefined reference to `VERSION_STRING' undefined reference to `rng' Add the generated version string source wherever a test links the network umbrella, and define the rng stub in the tests that pull the server game classes without declaring it. This matches what the neighbouring server tests already do. A full Debug build and ctest suite in the ci-ubuntu2604 image (system libgtest.a) is green: 841 tests pass. Fixes the nightly failures introduced by #6894. --------- Co-authored-by: Lukas Brübach <44814898+BruebachL@users.noreply.github.com>
79 lines
2.7 KiB
YAML
79 lines
2.7 KiB
YAML
name: Build Documentation
|
|
|
|
permissions:
|
|
contents: read # write permission to the destination repo come from 'deploy_key'
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'docs/**'
|
|
- '.github/workflows/documentation-build.yml'
|
|
- 'Doxyfile'
|
|
release:
|
|
types:
|
|
- published # publishing of stable releases and pre-releases
|
|
workflow_dispatch:
|
|
|
|
# Cancel earlier, unfinished runs of this workflow on the same branch (unless on release)
|
|
concurrency:
|
|
group: "${{ github.workflow }} @ ${{ github.ref_name }}"
|
|
cancel-in-progress: ${{ github.event_name != 'release' }}
|
|
|
|
env:
|
|
COCKATRICE_REF: ${{ github.ref_name }} # tag name if the commit is tagged, otherwise branch name
|
|
|
|
jobs:
|
|
docs:
|
|
name: "Doxygen"
|
|
runs-on: ubuntu-latest # https://github.com/actions/runner-images#available-images
|
|
|
|
steps:
|
|
- name: "Checkout"
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: "Install Graphviz"
|
|
shell: bash
|
|
run: |
|
|
sudo apt-get install -y graphviz
|
|
dot -V
|
|
|
|
- name: "Install Doxygen"
|
|
uses: ssciwr/doxygen-install@fa3e94d34131d3990b6b8ba939ab982964aa3758 # v2.0.3
|
|
with:
|
|
version: "1.18.0" # https://www.doxygen.nl/manual/changelog.html
|
|
|
|
- name: "Update Doxygen Configuration"
|
|
shell: bash
|
|
run: |
|
|
git diff Doxyfile
|
|
doxygen -u Doxyfile
|
|
if git diff --quiet Doxyfile; then
|
|
echo "::notice::No config changes in Doxyfile detected."
|
|
else
|
|
echo "::error::Config changes in Doxyfile detected! Please update the file by running 'doxygen -u Doxyfile'."
|
|
echo ""
|
|
git diff --color=always Doxyfile
|
|
exit 1
|
|
fi
|
|
|
|
- name: "Generate Documentation"
|
|
if: always()
|
|
shell: bash
|
|
run: doxygen Doxyfile
|
|
|
|
- name: "Deploy to cockatrice.github.io/docs"
|
|
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
|
|
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
|
|
with:
|
|
deploy_key: ${{ secrets.DOCS_DEPLOY_KEY }}
|
|
destination_dir: docs # docs will be available at https://cockatrice.github.io/docs/
|
|
external_repository: Cockatrice/cockatrice.github.io
|
|
publish_branch: master
|
|
publish_dir: ./docs-output/html
|
|
|
|
- name: Link to Documentation Page
|
|
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
|
|
shell: bash
|
|
run: echo "::notice title=New documentation published::Shortly available at https://cockatrice.github.io/docs/"
|