From 4a60d23d764e44340024f20f0ea09d8e88120803 Mon Sep 17 00:00:00 2001 From: zbeucler2018 <49871927+zbeucler2018@users.noreply.github.com> Date: Mon, 5 Feb 2024 20:39:36 -0500 Subject: [PATCH 1/3] fix conditional order --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index afd086e8..b9d550bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,19 +4,19 @@ if(POLICY CMP0048) cmake_policy(SET CMP0048 NEW) endif() -if(UNIX) +if(APPLE) set(PYEXT_SUFFIX ".so" CACHE STRING "Suffix for Python extension modules") set(DYNLIB_SUFFIX - ".so" + ".dylib" CACHE STRING "Suffix for dynamic libraries") -elseif(APPLE) +elseif(UNIX) set(PYEXT_SUFFIX ".so" CACHE STRING "Suffix for Python extension modules") set(DYNLIB_SUFFIX - ".dylib" + ".so" CACHE STRING "Suffix for dynamic libraries") elseif(WIN32) set(PYEXT_SUFFIX @@ -234,7 +234,7 @@ add_core(nes fceumm) add_core(atari2600 stella) if(APPLE AND CMAKE_SYSTEM_PROCESSOR MATCHES "arm64") - message(warning "Detected Apple Silicon, skipping gambatte (gb)") + message(WARNING "Detected Apple Silicon, skipping gambatte (gb)") else() add_core(gb gambatte) endif() From c8f4c6844134641b06e98055e35fc4a2b7134e25 Mon Sep 17 00:00:00 2001 From: zackbeucler Date: Tue, 6 Aug 2024 21:43:06 -0400 Subject: [PATCH 2/3] rearange conditionals for siliconn support --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b9d550bc..93925566 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ endif() if(APPLE) set(PYEXT_SUFFIX - ".so" + ".dylib" CACHE STRING "Suffix for Python extension modules") set(DYNLIB_SUFFIX ".dylib" @@ -244,6 +244,7 @@ add_core(pce mednafen_pce_fast) add_core(32x picodrive) add_core(saturn mednafen_saturn) + set(CLEAN_CORES) foreach(core IN LISTS CORE_TARGETS) From 4fce2464f230318c690f612ad67da958363ffef9 Mon Sep 17 00:00:00 2001 From: zackbeucler Date: Thu, 8 Aug 2024 22:46:03 -0400 Subject: [PATCH 3/3] first pass at silicon ci testing --- .github/workflows/test-python.yml | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index cbd44b4a..0fa917b4 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -32,3 +32,41 @@ jobs: - name: Run tests run: | xvfb-run -s '-screen 0 1024x768x24' pytest + + build_macos: + runs-on: macos-14 + strategy: + matrix: + python-version: ['3.10', '3.11', '3.12'] + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install system packages + run: brew install pkg-config lua@5.1 libzip capnp cmake + + - name: Install python packages + run: python3 -m pip install --upgrade pip pytest + + - name: Build project + run: | + export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) + python3 -m pip install -e . + + - name: Run tests + run: | + xvfb-run -s '-screen 0 1024x768x24' pytest + + # - name: Build wheel + # run: python3 -m build --wheel --sdist + + # - name: Smoke Test + # run: | + # python3 -m pip uninstall stable-retro -y + # python3 -m pip install --no-cache dist/*.whl + # python3 -c 'import retro; env = retro.make("Airstriker-Genesis", render_mode="rgb_array"); env.reset(); print(env.step(env.action_space.sample())); env.close();' +