Skip to content

figures: fix fireman speech — voice-key prefix, named-key localization, and .WAV case #362

figures: fix fireman speech — voice-key prefix, named-key localization, and .WAV case

figures: fix fireman speech — voice-key prefix, named-key localization, and .WAV case #362

name: Akhenaten integral tests
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
integral-tests:
name: Linux / integral tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y cmake build-essential libgl1-mesa-dev libssl-dev libasound2-dev libpulse-dev meson ninja-build nasm
- name: Configure and build
run: |
cmake --preset linux-gcc-release-make
cmake --build --preset linux-gcc-release-make -- -j$(nproc)
- name: Run integral tests
id: tests
env:
SDL_VIDEODRIVER: dummy
SDL_AUDIODRIVER: dummy
run: |
set +e
./build/akhenaten --integraltests --no-logo --no-resource --nosound --window --size 800x600
echo "rc=$?" >> "$GITHUB_OUTPUT"
exit 0
- name: Stage integral test log
if: always()
run: |
LOG_FILE="${XDG_DATA_HOME:-$HOME/.local/share}/Akhenaten/akhenaten-log.txt"
if [ -f "$LOG_FILE" ]; then
cp "$LOG_FILE" akhenaten-log.txt
fi
- name: Render summary
if: always()
run: |
{
echo "## Integral tests"
echo ""
if [ -f akhenaten-log.txt ]; then
echo "| Test | Result |"
echo "|------|--------|"
grep -E '\[test:[^]]+\] (PASS|FAIL)' akhenaten-log.txt \
| sed -E 's/.*\[test:([^]]+)\] (PASS|FAIL.*)/| \1 | \2 |/' \
|| echo "| _no tests ran_ | |"
echo ""
grep -E '\[integraltests\] [0-9]+ passed' akhenaten-log.txt \
| sed -E 's/.*\[integraltests\] /**/; s/$/**/' || true
else
echo "_log file not produced_"
fi
} >> "$GITHUB_STEP_SUMMARY"
- name: Emit failure annotations
if: always()
run: |
if [ -f akhenaten-log.txt ]; then
grep -E '\[test:[^]]+\] FAIL' akhenaten-log.txt \
| sed -E 's/.*\[test:([^]]+)\] FAIL(:.*)?/::error title=integraltest \1::test failed\2/' || true
fi
- name: Parse test counts
id: parse
if: always()
run: |
message="log missing"
color="lightgrey"
if [ -f akhenaten-log.txt ]; then
line=$(grep -E '\[integraltests\] [0-9]+ passed, [0-9]+ failed' akhenaten-log.txt | tail -1 || true)
if [ -n "$line" ]; then
passed=$(echo "$line" | sed -nE 's/.*\[integraltests\] ([0-9]+) passed.*/\1/p')
failed=$(echo "$line" | sed -nE 's/.*([0-9]+) failed.*/\1/p')
passed=${passed:-0}
failed=${failed:-0}
total=$((passed + failed))
if [ "$total" -eq 0 ]; then
message="no tests"
color="lightgrey"
elif [ "$failed" -eq 0 ]; then
message="${passed}/${total} passing"
color="brightgreen"
else
message="${passed}/${total} passing"
color="red"
fi
else
message="no summary"
color="lightgrey"
fi
fi
echo "message=$message" >> "$GITHUB_OUTPUT"
echo "color=$color" >> "$GITHUB_OUTPUT"
- name: Update tests badge gist
if: always() && github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.AKHENATEN_TESTS_GIST }}
gistID: 28104123b52e0fc76b56b8df8ca345e7
filename: akhenaten-tests.json
label: tests
message: ${{ steps.parse.outputs.message }}
color: ${{ steps.parse.outputs.color }}
- name: Show test log
if: always()
run: |
tail -n 200 akhenaten-log.txt || true
- name: Upload log
if: always()
uses: actions/upload-artifact@v4
with:
name: akhenaten-log
path: akhenaten-log.txt
retention-days: 14
- name: Fail if tests failed
if: steps.tests.outputs.rc != '0'
run: |
echo "integral tests exited with code ${{ steps.tests.outputs.rc }}"
exit 1