Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Macos-13 runner #582

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5bcbb33
Update to python 3.9+
pseudo-rnd-thoughts Nov 28, 2024
9ff0fe3
Attempt update to MacOS 13 and MacOS 14-arm64
pseudo-rnd-thoughts Nov 28, 2024
6a45f48
Update installed packages
pseudo-rnd-thoughts Nov 28, 2024
213d163
Revert cmake changes
pseudo-rnd-thoughts Nov 28, 2024
2963542
Remove deps
pseudo-rnd-thoughts Nov 29, 2024
3fa6eda
Re-add vcpkg install for building wheels
pseudo-rnd-thoughts Nov 29, 2024
227451b
Add setup msbuild on macos
pseudo-rnd-thoughts Nov 29, 2024
09260a8
Remove msbuild setup and add xcode-select install and llvm
pseudo-rnd-thoughts Nov 29, 2024
e63d425
Revert to pre-commit/[email protected]
pseudo-rnd-thoughts Nov 29, 2024
f4bb7a5
Fix pypa/cibuildwheels version and xcode install
pseudo-rnd-thoughts Nov 29, 2024
9912f98
Remove xcode-select install
pseudo-rnd-thoughts Nov 29, 2024
7dde3bd
Remove -y from brew install
pseudo-rnd-thoughts Nov 29, 2024
4eb9150
Add `cmake_policy` and remove `CMAKE_CXX_STANDARD`
pseudo-rnd-thoughts Nov 29, 2024
ad75526
Revert `cmake_policy` and `CMAKE_CXX_STANDARD` and update Python vers…
pseudo-rnd-thoughts Nov 29, 2024
c43e6a3
Add debug to cat the log file
pseudo-rnd-thoughts Jan 7, 2025
79626df
Add new debug
pseudo-rnd-thoughts Jan 8, 2025
eb99997
Update sdl2 version
pseudo-rnd-thoughts Jan 8, 2025
67752e1
Revert sdl2 version change and add cmake flags to disable the error
pseudo-rnd-thoughts Jan 8, 2025
c4b6093
pre-commit
pseudo-rnd-thoughts Jan 8, 2025
360c96e
Update sdl2 version to 2.0.22
pseudo-rnd-thoughts Jan 8, 2025
7e4207b
Update sdl2 version to 2.24.2
pseudo-rnd-thoughts Jan 8, 2025
d8b3f81
Re-enable the rest of the ci
pseudo-rnd-thoughts Jan 8, 2025
009d247
Revert accidental change to sdl2 version, back to 2.24.2
pseudo-rnd-thoughts Jan 8, 2025
7a07559
Update macos-14-arm64 to macos-14
pseudo-rnd-thoughts Jan 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 33 additions & 97 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: pre-commit/[email protected]

build-scratch:
name: ${{ matrix.runs-on }} • py${{ matrix.python }}
name: "${{ matrix.runs-on }} • py${{ matrix.python }}"
needs: pre-commit
defaults:
run:
Expand All @@ -40,54 +40,19 @@ jobs:
fail-fast: false
matrix:
include:
# To minimise the computational resources, we only use a single python version and the final test-wheels for all python versions
# To minimise the computational resources, we only use a single python version and the final test-wheels for all python versions
- runs-on: ubuntu-latest
python: '3.8'
python: '3.12'
triplet: x64-linux-mixed
# - runs-on: ubuntu-latest
# python: '3.9'
# triplet: x64-linux-mixed
# - runs-on: ubuntu-latest
# python: '3.10'
# triplet: x64-linux-mixed
# - runs-on: ubuntu-latest
# python: '3.11'
# triplet: x64-linux-mixed
# - runs-on: ubuntu-latest
# python: '3.12'
# triplet: x64-linux-mixed

- runs-on: macos-12 # macos latest is macos-14-arm64 running on M1 chips which doesn't have python support
python: '3.8'
- runs-on: macos-13
python: '3.12'
triplet: x64-osx-mixed
# - runs-on: macos-12
# python: '3.9'
# triplet: x64-osx-mixed
# - runs-on: macos-12
# python: '3.10'
# triplet: x64-osx-mixed
# - runs-on: macos-12
# python: '3.11'
# triplet: x64-osx-mixed
# - runs-on: macos-12
# python: '3.12'
# triplet: x64-osx-mixed

- runs-on: windows-latest
python: '3.8'
python: '3.12'
triplet: x64-windows
# - runs-on: windows-latest
# python: '3.9'
# triplet: x64-windows
# - runs-on: windows-latest
# python: '3.10'
# triplet: x64-windows
# - runs-on: windows-latest
# python: '3.11'
# triplet: x64-windows
# - runs-on: windows-latest
# python: '3.12'
# triplet: x64-windows

env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
runs-on: ${{ matrix.runs-on }}
Expand All @@ -99,24 +64,11 @@ jobs:
with:
python-version: ${{ matrix.python }}

- name: Install test dependencies
- name: Install windows cmake
# TODO(jfarebro): There's a bug with Windows cmake and PEP517 builds via pip install.
# As a temporary workaround installing cmake outside of the isolated env seems to work.
run: python -m pip install --user cmake

- uses: microsoft/setup-msbuild@v2
if: runner.os == 'Windows'
# TODO(jfarebro): 02/16/2023 - There's a bug where pkg-config isn't installed on the macOS
# runner. See: https://github.com/actions/runner-images/pull/7125
- name: Install pkg-config on macOS
if: runner.os == 'macOS'
run: brew install pkg-config
- uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: "8150939b69720adc475461978e07c2d2bf5fb76e"
# There's a permissions issue with the cache
# https://github.com/microsoft/vcpkg/issues/20121
doNotCache: true

- name: Download and unpack ROMs
run: ./scripts/download_unpack_roms.sh
Expand All @@ -128,21 +80,22 @@ jobs:
run: python -m pytest

build-wheels:
name: ${{ matrix.runs-on }} • ${{ matrix.arch }}
name: "${{ matrix.runs-on }} • ${{ matrix.arch }}"
needs: pre-commit
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
include:
- runs-on: ubuntu-latest
arch: x86_64
- runs-on: windows-latest
arch: AMD64
- runs-on: macos-12
- runs-on: macos-13
arch: x86_64
- runs-on: macos-12
- runs-on: macos-13
arch: arm64
runs-on: ${{ matrix.runs-on }}

Expand All @@ -155,7 +108,6 @@ jobs:
uses: docker/setup-buildx-action@v3
with:
install: true

- name: Build Docker image with vcpkg
if: runner.os == 'linux'
# using build-push-action (without push) to make use of cache arguments
Expand All @@ -167,22 +119,6 @@ jobs:
push: false
load: true

- uses: microsoft/setup-msbuild@v2
if: runner.os == 'Windows'
# TODO(jfarebro): 02/16/2023 - There's a bug where pkg-config isn't installed on the macOS
# runner. See: https://github.com/actions/runner-images/pull/7125
- name: Install pkg-config on macOS
if: runner.os == 'macOS'
run: brew install pkg-config

- uses: lukka/run-vcpkg@v11
if: runner.os != 'linux'
with:
vcpkgGitCommitId: "8150939b69720adc475461978e07c2d2bf5fb76e"
# There's a permissions issue with the cache
# https://github.com/microsoft/vcpkg/issues/20121
doNotCache: true

- name: Download and unpack ROMs
run: ./scripts/download_unpack_roms.sh

Expand Down Expand Up @@ -210,10 +146,6 @@ jobs:
# ale_py-0.x.x-cp310-cp310-macosx_11_0_arm64.whl
# ale_py-0.x.x-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
# ale_py-0.x.x-cp310-cp310-win_amd64.whl
- runs-on: ubuntu-latest
python: '3.8'
wheel-name: 'cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64'
arch: 'x86_64'
- runs-on: ubuntu-latest
python: '3.9'
wheel-name: 'cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64'
Expand All @@ -230,11 +162,11 @@ jobs:
python: '3.12'
wheel-name: 'cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64'
arch: 'x86_64'
- runs-on: ubuntu-latest
python: '3.13'
wheel-name: 'cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64'
arch: 'x86_64'

- runs-on: windows-latest
python: '3.8'
wheel-name: 'cp38-cp38-win_amd64'
arch: AMD64
- runs-on: windows-latest
python: '3.9'
wheel-name: 'cp39-cp39-win_amd64'
Expand All @@ -251,32 +183,32 @@ jobs:
python: '3.12'
wheel-name: 'cp312-cp312-win_amd64'
arch: AMD64
- runs-on: windows-latest
python: '3.13'
wheel-name: 'cp313-cp313-win_amd64'
arch: AMD64

- runs-on: macos-12
python: '3.8'
wheel-name: 'cp38-cp38-macosx_10_15_x86_64'
arch: x86_64
- runs-on: macos-12
- runs-on: macos-13
python: '3.9'
wheel-name: 'cp39-cp39-macosx_10_15_x86_64'
arch: x86_64
- runs-on: macos-12
- runs-on: macos-13
python: '3.10'
wheel-name: 'cp310-cp310-macosx_10_15_x86_64'
arch: x86_64
- runs-on: macos-12
- runs-on: macos-13
python: '3.11'
wheel-name: 'cp311-cp311-macosx_10_15_x86_64'
arch: x86_64
- runs-on: macos-12
- runs-on: macos-13
python: '3.12'
wheel-name: 'cp312-cp312-macosx_10_15_x86_64'
arch: x86_64
- runs-on: macos-13
python: '3.13'
wheel-name: 'cp313-cp313-macosx_10_15_x86_64'
arch: x86_64

- runs-on: macos-14
python: '3.8'
wheel-name: 'cp38-cp38-macosx_11_0_arm64'
arch: arm64
- runs-on: macos-14
python: '3.9'
wheel-name: 'cp39-cp39-macosx_11_0_arm64'
Expand All @@ -293,6 +225,10 @@ jobs:
python: '3.12'
wheel-name: 'cp312-cp312-macosx_11_0_arm64'
arch: arm64
- runs-on: macos-14
python: '3.13'
wheel-name: 'cp313-cp313-macosx_11_0_arm64'
arch: arm64

runs-on: ${{ matrix.runs-on }}

Expand All @@ -313,7 +249,7 @@ jobs:
run: python -m pip install ale_py-0.10.1-${{ matrix.wheel-name }}.whl

- name: Install Gymnasium and pytest
run: python -m pip install gymnasium>=1.0.0a2 pytest
run: python -m pip install gymnasium>=1.0.0 pytest

- name: Test
run: python -m pytest
2 changes: 1 addition & 1 deletion .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
run: ./scripts/download_unpack_roms.sh

- name: Build wheels
uses: pypa/[email protected].3
uses: pypa/[email protected]
env:
CIBW_ARCHS: "${{ matrix.arch }}"

Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-symlinks
- id: destroyed-symlinks
Expand Down Expand Up @@ -36,17 +36,17 @@ repos:
- --show-source
- --statistics
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
rev: v3.19.0
hooks:
- id: pyupgrade
args: ["--py38-plus"]
args: ["--py39-plus"]
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/python/black
rev: 24.8.0
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/pycqa/pydocstyle
Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ The Python interface `ale-py` supports the following configurations:

| Platform | Architecture | Python Version |
|:--------:|:------------:|:--------------:|
| Linux | x64 | 3.8+ |
| macOS | x64, arm64 | 3.8+ |
| Windows | AMD64 | 3.8+ |
| Linux | x64 | 3.9+ |
| macOS | x64, arm64 | 3.9+ |
| Windows | AMD64 | 3.9+ |


To install the Python interface from PyPi simply run:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build-backend = "setuptools.build_meta"
name = "ale-py"
description = "The Arcade Learning Environment (ALE) - a platform for AI research."
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = {text = "GPLv2"}
keywords = ["reinforcement-learning", "arcade-learning-environment", "atari"]
authors = [
Expand All @@ -28,11 +28,11 @@ classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
Expand Down
3 changes: 2 additions & 1 deletion src/ale/python/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
from __future__ import annotations

from collections import defaultdict
from typing import Any, Callable, Mapping, NamedTuple, Sequence
from collections.abc import Mapping, Sequence
from typing import Any, Callable, NamedTuple

import ale_py.roms as roms
import gymnasium
Expand Down
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
},
"builtin-baseline": "9aa0d66373ce3a6868d12353d0d4960db0d4bd18",
"overrides": [
{ "name": "sdl2", "version": "2.0.16" }
{ "name": "sdl2", "version": "2.24.2" }
]
}
Loading