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 gcovr 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 \ -DAKGL_COVERAGE=ON 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' - name: Upload coverage reports if: always() uses: actions/upload-artifact@v4 with: name: code-coverage path: build/coverage/ if-no-files-found: warn 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'