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

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
138 changes: 40 additions & 98 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/action@v3.0.1

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 @@ -103,20 +68,10 @@ jobs:
# 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

- run: brew install llvm
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 +83,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 +111,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,21 +122,8 @@ 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
- run: brew install llvm
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 +152,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 +168,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,48 +189,52 @@ 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
- runs-on: macos-14-arm64
python: '3.9'
wheel-name: 'cp39-cp39-macosx_11_0_arm64'
arch: arm64
- runs-on: macos-14
- runs-on: macos-14-arm64
python: '3.10'
wheel-name: 'cp310-cp310-macosx_11_0_arm64'
arch: arm64
- runs-on: macos-14
- runs-on: macos-14-arm64
python: '3.11'
wheel-name: 'cp311-cp311-macosx_11_0_arm64'
arch: arm64
- runs-on: macos-14
- runs-on: macos-14-arm64
python: '3.12'
wheel-name: 'cp312-cp312-macosx_11_0_arm64'
arch: arm64
- runs-on: macos-14-arm64
python: '3.13'
wheel-name: 'cp313-cp313-macosx_11_0_arm64'
arch: arm64

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

Expand All @@ -313,7 +255,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/cibuildwheel@v2.21.3
uses: pypa/cibuildwheel@v2.21
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
Loading