Run minimal Atari probe on ST and STE #31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: qualification | |
| 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 canonical artifact using documented Hatari program argument | |
| run: | | |
| rm -f artifacts/M2PASS.TXT | |
| test -s artifacts/MINIMAL.PRG | |
| 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 \ | |
| /runtime/artifacts/MINIMAL.PRG & | |
| pid=$! | |
| found=0 | |
| for i in $(seq 1 45); do | |
| if [ -s artifacts/M2PASS.TXT ]; then | |
| found=1 | |
| break | |
| fi | |
| sleep 1 | |
| done | |
| if [ "$found" -ne 1 ]; then | |
| echo "=== docker logs ===" | |
| docker logs "$name" 2>&1 || true | |
| echo "=== host artifact inspection ===" | |
| file artifacts/HELLO.PRG artifacts/HELLO.TOS || true | |
| sha256sum artifacts/HELLO.PRG artifacts/HELLO.TOS || true | |
| find artifacts -maxdepth 2 -type f -printf '%P %s bytes\n' | sort || true | |
| fi | |
| docker kill "$name" >/dev/null 2>&1 || true | |
| wait "$pid" || true | |
| docker rm -f "$name" >/dev/null 2>&1 || true | |
| if docker logs "$name" 2>&1 | grep -qiE 'error|fatal|invalid|cannot|failed'; then | |
| echo "Hatari reported a runtime error" | |
| docker logs "$name" 2>&1 || true | |
| exit 1 | |
| fi | |
| test -s artifacts/MINIMAL.PRG | |
| - name: Verify Atari-side execution evidence | |
| 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 }}" |