Skip to content

Commit

Permalink
Update to Macos-13 runner (#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudo-rnd-thoughts authored Jan 8, 2025
1 parent 9ac229b commit 6b57d42
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 109 deletions.
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" }
]
}

0 comments on commit 6b57d42

Please sign in to comment.