Add file, structure, global, and function documentation across all libakgl-owned headers and sources, including parameter contracts and likely AKERR/AKGL_ERR exceptions. Add a strict Doxyfile and build the generated API documentation in Gitea CI with warnings treated as failures. Co-authored-by: Codex (GPT-5) <noreply@openai.com>
81 lines
2.7 KiB
YAML
81 lines
2.7 KiB
YAML
name: libakgl CI Build
|
|
run-name: ${{ gitea.actor }} libakgl test
|
|
on: [push]
|
|
|
|
jobs:
|
|
cmake_build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
- name: Install build dependencies
|
|
run: |
|
|
sudo apt-get update -y
|
|
sudo apt-get install -y \
|
|
cmake doxygen gcc pkg-config \
|
|
libasound2-dev libfreetype-dev libharfbuzz-dev \
|
|
libpng-dev libtiff-dev libwebp-dev \
|
|
libudev-dev libx11-dev libxcursor-dev libxext-dev \
|
|
libxfixes-dev libxi-dev libxrandr-dev libxrender-dev \
|
|
libxss-dev libxtst-dev
|
|
- name: Configure and build
|
|
run: |
|
|
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
|
|
cmake --build build --parallel
|
|
- name: Build API documentation
|
|
run: doxygen Doxyfile
|
|
- name: Test (JUnit)
|
|
run: |
|
|
export LD_LIBRARY_PATH="$PWD/build:$PWD/build/deps/SDL:$PWD/build/deps/SDL_image:$PWD/build/deps/SDL_mixer:$PWD/build/deps/SDL_ttf"
|
|
ctest \
|
|
--test-dir build \
|
|
-E '^character$' \
|
|
--output-on-failure \
|
|
--output-junit "$(pwd)/ctest-junit.xml"
|
|
- name: Publish test results
|
|
if: always()
|
|
uses: mikepenz/action-junit-report@v4
|
|
with:
|
|
report_paths: 'ctest-junit.xml'
|
|
annotate_only: true
|
|
detailed_summary: true
|
|
include_passed: true
|
|
fail_on_failure: 'true'
|
|
|
|
mutation_test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
- name: Install mutation-test dependencies
|
|
run: |
|
|
sudo apt-get update -y
|
|
sudo apt-get install -y \
|
|
cmake gcc pkg-config python3 \
|
|
libasound2-dev libfreetype-dev libharfbuzz-dev \
|
|
libpng-dev libtiff-dev libwebp-dev \
|
|
libudev-dev libx11-dev libxcursor-dev libxext-dev \
|
|
libxfixes-dev libxi-dev libxrandr-dev libxrender-dev \
|
|
libxss-dev libxtst-dev
|
|
# Keep CI bounded to a focused source file. Run the default target locally
|
|
# for the complete libakgl-owned src/ tree.
|
|
- name: Mutation testing
|
|
run: |
|
|
python3 scripts/mutation_test.py \
|
|
--target src/staticstring.c \
|
|
--junit mutation-junit.xml \
|
|
--threshold 50
|
|
- name: Publish mutation results
|
|
if: always()
|
|
uses: mikepenz/action-junit-report@v4
|
|
with:
|
|
report_paths: 'mutation-junit.xml'
|
|
annotate_only: true
|
|
detailed_summary: true
|
|
include_passed: true
|
|
fail_on_failure: 'false'
|