Skip to content

Fix minimal Atari runtime qualification harness #32

Fix minimal Atari runtime qualification harness

Fix minimal Atari runtime qualification harness #32

Workflow file for this run

name: qualification

Check failure on line 1 in .github/workflows/qualification.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/qualification.yml

Invalid workflow file

(Line: 76, Col: 9): 'run' is already defined
on:
push:
pull_request:
workflow_dispatch:
jobs:
infrastructure:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build atari-runtime image
run: docker build -t atari-runtime:m2 -f Containerfile .
- name: Runtime metadata
run: docker run --rm atari-runtime:m2 tools/runtime-info.sh
- name: Hatari CLI capabilities
run: docker run --rm atari-runtime:m2 sh -c 'hatari --help 2>&1 | tee /tmp/hatari-help.txt; grep -Ei "auto|run|program|gemdos|harddrive" /tmp/hatari-help.txt || true'
- name: Hatari + EmuTOS smoke
run: docker run --rm atari-runtime:m2 tools/smoke.sh
- name: Verify M2 helper
run: docker run --rm atari-runtime:m2 sh -n tools/qualify-m2.sh
m2-emulator:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
profile: [st, ste]
steps:
- uses: actions/checkout@v4
- name: Build atari-runtime image
run: docker build -t atari-runtime:m2 -f Containerfile .
- name: Download canonical atari-dev M2 artifact
env:
GH_TOKEN: ${{ github.token }}
run: |
mkdir -p artifacts
curl --fail --location -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github+json" -o /tmp/atari-dev-m2.zip https://api.github.com/repos/Ploos-AS/atari-dev/actions/artifacts/10564480386/zip
unzip -q /tmp/atari-dev-m2.zip -d artifacts
test -s artifacts/HELLO.TOS
sha256sum artifacts/HELLO.TOS
- name: Execute minimal probe using documented Hatari program argument
run: |
test -s artifacts/MINIMAL.PRG
name="atari-m2-${{ matrix.profile }}"
docker run --name "$name" \
-v "$PWD/artifacts:/runtime/artifacts" \
atari-runtime:m2 \
xvfb-run -a hatari \
--machine "${{ matrix.profile }}" \
--memsize 1 \
--tos /runtime/roms/emutos.img \
--run-vbls 600 \
/runtime/artifacts/MINIMAL.PRG &
pid=$!
sleep 20
echo "=== docker logs ==="
logs="$(docker logs "$name" 2>&1 || true)"
printf '%s\n' "$logs"
failed=0
if printf '%s\n' "$logs" | grep -qiE 'fatal|invalid|cannot execute|program.*error|bus error|address error|illegal instruction'; then
failed=1
fi
docker kill "$name" >/dev/null 2>&1 || true
wait "$pid" || true
docker rm -f "$name" >/dev/null 2>&1 || true
test "$failed" -eq 0
file artifacts/MINIMAL.PRG
printf 'Minimal Hatari + EmuTOS %s execution window: PASS\n' "${{ matrix.profile }}"
- name: Verify minimal runtime probe artifact
run: |
test -s artifacts/MINIMAL.PRG
file artifacts/MINIMAL.PRG
run: |
test -s artifacts/M2PASS.TXT
grep -Fx 'Ploos-AS atari-dev M2 execution PASS' artifacts/M2PASS.TXT
printf 'M2 Hatari + EmuTOS %s execution: PASS\n' "${{ matrix.profile }}"