name: Native Linux reference diagnosis
on: workflow_dispatch
jobs:
reference:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.98.1
- name: Generate verified native Linux warm-start references
run: |
mkdir -p /tmp/godot /tmp/native-references
curl --fail --location --silent --show-error https://github.com/godotengine/godot/releases/download/4.7.2-stable/Godot_v4.7.2-stable_linux.x86_64.zip -o /tmp/godot/godot.zip
echo '9aa00f7a605200940bce3027a567b782f49bd8e940dd06ae9e987bd65aee1b1467edd56ed84fcdcbdd44354bf613bdbb4e5d2913e925850368e150c59ed54c65 /tmp/godot/godot.zip' | sha512sum --check
unzip -q /tmp/godot/godot.zip -d /tmp/godot
chmod +x /tmp/godot/Godot_v4.7.2-stable_linux.x86_64
/tmp/godot/Godot_v4.7.2-stable_linux.x86_64 --version
cp tests/goldens/*.json.gz /tmp/native-references/
for scenario in fabrik_warm ccd_warm jacobian_warm; do
/tmp/godot/Godot_v4.7.2-stable_linux.x86_64 --headless --fixed-fps 60 --quit-after 301 --path tools/goldens/godot_project --script dump.gd -- "$scenario" "/tmp/native-references/$scenario.json"
done
python3 - <<'PY'
import gzip, pathlib, json, hashlib
p=pathlib.Path('/tmp/native-references')
for f in p.glob('*.json'):
assert len(json.loads(f.read_bytes())['frames']) == 300
f.with_suffix('.json.gz').write_bytes(gzip.compress(f.read_bytes(),mtime=0))
expected=json.loads(pathlib.Path('tests/goldens/linux-x86_64/manifest.json').read_text())['sha256']
for name, sha in expected.items():
assert hashlib.sha256((p/name).read_bytes()).hexdigest() == sha, name
manifest={f.name:hashlib.sha256(f.read_bytes()).hexdigest() for f in p.glob('*.json.gz')}
(p/'manifest.json').write_text(json.dumps(manifest,indent=2))
PY
- name: Compare existing core against same-platform references
env:
SKELETON_GOLDENS: /tmp/native-references
run: cargo test --manifest-path tools/linux-reference/Cargo.toml -- --nocapture
- uses: actions/upload-artifact@v4
if: always()
with:
name: native-linux-references
path: /tmp/native-references