From dd0baf0ef3e237233747bd7d46cd36b9dad774e6 Mon Sep 17 00:00:00 2001 From: isaac0804 Date: Sat, 3 Oct 2026 09:39:31 +0100 Subject: [PATCH] Tests compile numba kernels for a generic CPU, so CI plays the same rsim games Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01SACGSprm9GiBueqKdxsy2j --- conftest.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/conftest.py b/conftest.py index acade85f..ab3c2886 100644 --- a/conftest.py +++ b/conftest.py @@ -1,5 +1,14 @@ +import os + import pytest +# The planner's numba kernels are compiled with fastmath for the host CPU, so an rsim game played +# on CI's CPU can drift from the same game played locally, and a test that asserts how a game +# unfolds passes on one machine and fails on the other. Compile them for a generic x86-64 CPU in +# tests, so every machine runs the same code. Set before numba is imported; rsim worker +# processes inherit it. +os.environ.setdefault("NUMBA_CPU_NAME", "generic") + def pytest_addoption(parser): parser.addoption(