From 5bcbb336b7837008d91a7244c93db666a0aa67a2 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Thu, 28 Nov 2024 12:28:21 +0000 Subject: [PATCH 01/24] Update to python 3.9+ --- .github/workflows/ci.yml | 45 ++++------------------------------ .pre-commit-config.yaml | 8 +++--- pyproject.toml | 4 +-- src/ale/python/registration.py | 3 ++- 4 files changed, 13 insertions(+), 47 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36beb83b7..94f04bb61 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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.9' 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' + python: '3.9' 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.9' 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 }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0e8ade971..838efbaa8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 5c1970409..5870de928 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = [ @@ -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", ] diff --git a/src/ale/python/registration.py b/src/ale/python/registration.py index 55fc72d40..9c0dcdd77 100644 --- a/src/ale/python/registration.py +++ b/src/ale/python/registration.py @@ -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 From 9ff0fe34d034868d36574832ee9ef828ecf6f2a9 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Thu, 28 Nov 2024 13:10:10 +0000 Subject: [PATCH 02/24] Attempt update to MacOS 13 and MacOS 14-arm64 --- .github/workflows/ci.yml | 59 +++++++++++++++++++------------------- .github/workflows/pypi.yml | 2 +- docs/getting-started.md | 6 ++-- 3 files changed, 34 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94f04bb61..e79960514 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: python: '3.9' triplet: x64-linux-mixed - - runs-on: macos-12 # macos latest is macos-14-arm64 running on M1 chips which doesn't have python support + - runs-on: macos-13 python: '3.9' triplet: x64-osx-mixed @@ -99,15 +99,16 @@ jobs: 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-14-arm64 arch: arm64 runs-on: ${{ matrix.runs-on }} @@ -152,7 +153,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 }}" @@ -175,10 +176,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' @@ -195,11 +192,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' @@ -216,48 +213,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 }} @@ -278,7 +279,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 diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index c4d2a3005..92e309e78 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -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 }}" diff --git a/docs/getting-started.md b/docs/getting-started.md index 322738c37..dd046527b 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -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: From 6a45f48cd31a9cdf3ce601e96a940ed922512a30 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Thu, 28 Nov 2024 21:35:08 +0000 Subject: [PATCH 03/24] Update installed packages --- .github/workflows/ci.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e79960514..431c1048f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -64,24 +64,24 @@ jobs: with: python-version: ${{ matrix.python }} - - name: Install test dependencies - # 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 +# - name: Install test dependencies +# # 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 + + - run: cmake --version - 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 + + - run: vcpkg --version + +# - 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 @@ -93,7 +93,7 @@ jobs: run: python -m pytest build-wheels: - name: ${{ matrix.runs-on }} • ${{ matrix.arch }} + name: "${{ matrix.runs-on }} • ${{ matrix.arch }}" needs: pre-commit defaults: run: From 213d16300720b1d8f29be561cf3a72263ba94d21 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Thu, 28 Nov 2024 21:59:36 +0000 Subject: [PATCH 04/24] Revert cmake changes --- .github/workflows/ci.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 431c1048f..7f61dd895 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,10 +64,11 @@ jobs: with: python-version: ${{ matrix.python }} -# - name: Install test dependencies -# # 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 + - name: Install test dependencies + # 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 + if: runner.os == 'Windows' - run: cmake --version @@ -108,7 +109,7 @@ jobs: arch: AMD64 - runs-on: macos-13 arch: x86_64 - - runs-on: macos-14-arm64 + - runs-on: macos-13 arch: arm64 runs-on: ${{ matrix.runs-on }} @@ -137,9 +138,6 @@ jobs: 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' From 29635420344439ec28d2bd39d70c4691d3f7aede Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Fri, 29 Nov 2024 00:49:24 +0000 Subject: [PATCH 05/24] Remove deps --- .github/workflows/ci.yml | 66 ++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f61dd895..2a6a2154d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,12 +70,8 @@ jobs: run: python -m pip install --user cmake if: runner.os == 'Windows' - - run: cmake --version - - - uses: microsoft/setup-msbuild@v2 - if: runner.os == 'Windows' - - - run: vcpkg --version +# - uses: microsoft/setup-msbuild@v2 +# if: runner.os == 'Windows' # - uses: lukka/run-vcpkg@v11 # with: @@ -116,36 +112,34 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Docker Buildx - if: runner.os == 'linux' - id: buildx - 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 - uses: docker/build-push-action@v6 - with: - context: . - file: .github/docker/manylinux-vcpkg.Dockerfile - tags: manylinux-vcpkg:latest - 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 - - - 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: Set up Docker Buildx +# if: runner.os == 'linux' +# id: buildx +# 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 +# uses: docker/build-push-action@v6 +# with: +# context: . +# file: .github/docker/manylinux-vcpkg.Dockerfile +# tags: manylinux-vcpkg:latest +# push: false +# load: true +# +# - uses: microsoft/setup-msbuild@v2 +# if: runner.os == 'Windows' +# +# - 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 From 3fa6eda517f60a78fe53dc25354f60dd3de9e738 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Fri, 29 Nov 2024 11:47:47 +0000 Subject: [PATCH 06/24] Re-add vcpkg install for building wheels --- .github/workflows/ci.yml | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a6a2154d..9af58cbd2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,24 +112,23 @@ jobs: steps: - uses: actions/checkout@v4 -# - name: Set up Docker Buildx -# if: runner.os == 'linux' -# id: buildx -# 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 -# uses: docker/build-push-action@v6 -# with: -# context: . -# file: .github/docker/manylinux-vcpkg.Dockerfile -# tags: manylinux-vcpkg:latest -# push: false -# load: true -# + - name: Set up Docker Buildx + if: runner.os == 'linux' + id: buildx + 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 + uses: docker/build-push-action@v6 + with: + context: . + file: .github/docker/manylinux-vcpkg.Dockerfile + tags: manylinux-vcpkg:latest + push: false + load: true + # - uses: microsoft/setup-msbuild@v2 # if: runner.os == 'Windows' # From 227451b54ee31779cdd9da366f79e14136df7362 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Fri, 29 Nov 2024 11:59:20 +0000 Subject: [PATCH 07/24] Add setup msbuild on macos --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9af58cbd2..02e65c69c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,8 +70,8 @@ jobs: run: python -m pip install --user cmake if: runner.os == 'Windows' -# - uses: microsoft/setup-msbuild@v2 -# if: runner.os == 'Windows' + - uses: microsoft/setup-msbuild@v2 + if: runner.os == 'macOS' # - uses: lukka/run-vcpkg@v11 # with: @@ -129,8 +129,8 @@ jobs: push: false load: true -# - uses: microsoft/setup-msbuild@v2 -# if: runner.os == 'Windows' + - uses: microsoft/setup-msbuild@v2 + if: runner.os == 'macOS' # # - uses: lukka/run-vcpkg@v11 # if: runner.os != 'linux' From 09260a874e61297f508c53986dc9578cc532088e Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Fri, 29 Nov 2024 12:08:02 +0000 Subject: [PATCH 08/24] Remove msbuild setup and add xcode-select install and llvm --- .github/workflows/ci.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02e65c69c..3121a47f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.12' - - uses: pre-commit/action@v3.0.1 + - uses: pre-commit/action@v3 build-scratch: name: "${{ matrix.runs-on }} • py${{ matrix.python }}" @@ -70,7 +70,9 @@ jobs: run: python -m pip install --user cmake if: runner.os == 'Windows' - - uses: microsoft/setup-msbuild@v2 + - run: xcode-select --install -y + if: runner.os == 'macOS' + - run: brew install -y llvm if: runner.os == 'macOS' # - uses: lukka/run-vcpkg@v11 @@ -129,9 +131,11 @@ jobs: push: false load: true - - uses: microsoft/setup-msbuild@v2 + - run: xcode-select --install -y + if: runner.os == 'macOS' + - run: brew install -y llvm if: runner.os == 'macOS' -# + # - uses: lukka/run-vcpkg@v11 # if: runner.os != 'linux' # with: @@ -144,7 +148,7 @@ jobs: run: ./scripts/download_unpack_roms.sh - name: Build wheels - uses: pypa/cibuildwheel@v2.21 + uses: pypa/cibuildwheel@v2 env: CIBW_ARCHS: "${{ matrix.arch }}" From e63d425f173a331ff374426eaf2e5a9c753adda8 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Fri, 29 Nov 2024 12:13:07 +0000 Subject: [PATCH 09/24] Revert to pre-commit/action@3.0.1 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3121a47f9..803aa2df0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.12' - - uses: pre-commit/action@v3 + - uses: pre-commit/action@v3.0.1 build-scratch: name: "${{ matrix.runs-on }} • py${{ matrix.python }}" From f4bb7a5a1f1b5285cc3ae14a75a780fd8afa0453 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Fri, 29 Nov 2024 12:25:32 +0000 Subject: [PATCH 10/24] Fix pypa/cibuildwheels version and xcode install --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 803aa2df0..f111240fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,7 +70,7 @@ jobs: run: python -m pip install --user cmake if: runner.os == 'Windows' - - run: xcode-select --install -y + - run: xcode-select --install if: runner.os == 'macOS' - run: brew install -y llvm if: runner.os == 'macOS' @@ -131,7 +131,7 @@ jobs: push: false load: true - - run: xcode-select --install -y + - run: xcode-select --install if: runner.os == 'macOS' - run: brew install -y llvm if: runner.os == 'macOS' @@ -148,7 +148,7 @@ jobs: run: ./scripts/download_unpack_roms.sh - name: Build wheels - uses: pypa/cibuildwheel@v2 + uses: pypa/cibuildwheel@v2.21.3 env: CIBW_ARCHS: "${{ matrix.arch }}" From 9912f98a1c652d9b7f8e3da2246230b3238f8474 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Fri, 29 Nov 2024 12:27:59 +0000 Subject: [PATCH 11/24] Remove xcode-select install --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f111240fb..4a549fac0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,8 +70,6 @@ jobs: run: python -m pip install --user cmake if: runner.os == 'Windows' - - run: xcode-select --install - if: runner.os == 'macOS' - run: brew install -y llvm if: runner.os == 'macOS' @@ -131,8 +129,6 @@ jobs: push: false load: true - - run: xcode-select --install - if: runner.os == 'macOS' - run: brew install -y llvm if: runner.os == 'macOS' From 7dde3bda03be97722da6477bc70acf0e90cf5218 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Fri, 29 Nov 2024 12:32:12 +0000 Subject: [PATCH 12/24] Remove -y from brew install --- .github/workflows/ci.yml | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a549fac0..8883e7894 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,16 +70,9 @@ jobs: run: python -m pip install --user cmake if: runner.os == 'Windows' - - run: brew install -y llvm + - run: brew install llvm if: runner.os == 'macOS' -# - 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 @@ -129,17 +122,9 @@ jobs: push: false load: true - - run: brew install -y llvm + - run: brew install llvm if: runner.os == 'macOS' -# - 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 From 4eb9150c6df8f46188d96f1f29c4548599d3e55c Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Fri, 29 Nov 2024 13:29:20 +0000 Subject: [PATCH 13/24] Add `cmake_policy` and remove `CMAKE_CXX_STANDARD` --- src/ale/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ale/CMakeLists.txt b/src/ale/CMakeLists.txt index af7b8b83e..b05ff4616 100644 --- a/src/ale/CMakeLists.txt +++ b/src/ale/CMakeLists.txt @@ -1,8 +1,10 @@ # Include src/ and cmake binary directory (for version.hpp) include_directories(BEFORE ${PROJECT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}) +cmake_policy(VERSION 3.10) + # Project specific target properties -set(CMAKE_CXX_STANDARD 17) +# set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED TRUE) set(CMAKE_CXX_EXTENSIONS FALSE) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) From ad755262324354f67ada89fb493048b0362f039b Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Fri, 29 Nov 2024 13:34:36 +0000 Subject: [PATCH 14/24] Revert `cmake_policy` and `CMAKE_CXX_STANDARD` and update Python version to 3.12 --- .github/workflows/ci.yml | 6 +++--- src/ale/CMakeLists.txt | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8883e7894..d5c0ec4de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,15 +42,15 @@ jobs: include: # 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.9' + python: '3.12' triplet: x64-linux-mixed - runs-on: macos-13 - python: '3.9' + python: '3.12' triplet: x64-osx-mixed - runs-on: windows-latest - python: '3.9' + python: '3.12' triplet: x64-windows env: diff --git a/src/ale/CMakeLists.txt b/src/ale/CMakeLists.txt index b05ff4616..af7b8b83e 100644 --- a/src/ale/CMakeLists.txt +++ b/src/ale/CMakeLists.txt @@ -1,10 +1,8 @@ # Include src/ and cmake binary directory (for version.hpp) include_directories(BEFORE ${PROJECT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}) -cmake_policy(VERSION 3.10) - # Project specific target properties -# set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED TRUE) set(CMAKE_CXX_EXTENSIONS FALSE) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) From c43e6a3cb27e22024c89aa652941a008b015860f Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Tue, 7 Jan 2025 22:36:08 +0000 Subject: [PATCH 15/24] Add debug to cat the log file --- .github/workflows/ci.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5c0ec4de..99600099d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,15 +70,16 @@ jobs: run: python -m pip install --user cmake if: runner.os == 'Windows' - - run: brew install llvm - if: runner.os == 'macOS' - - name: Download and unpack ROMs run: ./scripts/download_unpack_roms.sh - name: Build run: python -m pip install --verbose .[test] + - name: debug + if: always() && runner.os == 'macOS' + run: cat /usr/local/share/vcpkg/buildtrees/sdl2/install-x64-osx-mixed-dbg-out.log + - name: Test run: python -m pytest @@ -122,9 +123,6 @@ jobs: push: false load: true - - run: brew install llvm - if: runner.os == 'macOS' - - name: Download and unpack ROMs run: ./scripts/download_unpack_roms.sh From 79626dfeeff15298d7930b4b04c9093d2ce43e13 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Wed, 8 Jan 2025 12:18:00 +0000 Subject: [PATCH 16/24] Add new debug --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99600099d..98e66178b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ 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 @@ -80,6 +80,10 @@ jobs: if: always() && runner.os == 'macOS' run: cat /usr/local/share/vcpkg/buildtrees/sdl2/install-x64-osx-mixed-dbg-out.log + - name: debug vcpkg + if: always() && runner.os == 'macOS' + run: cat /Users/runner/work/Arcade-Learning-Environment/Arcade-Learning-Environment/build/temp.macosx-10.13-universal2-cpython-312/ale_py._ale_py/vcpkg-manifest-install.log + - name: Test run: python -m pytest From eb99997d5c4719ea2420fbe5bc145a2768dd87c8 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Wed, 8 Jan 2025 12:27:16 +0000 Subject: [PATCH 17/24] Update sdl2 version --- vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcpkg.json b/vcpkg.json index 2066d9522..4de666264 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -13,6 +13,6 @@ }, "builtin-baseline": "9aa0d66373ce3a6868d12353d0d4960db0d4bd18", "overrides": [ - { "name": "sdl2", "version": "2.0.16" } + { "name": "sdl2", "version": "2.30.11" } ] } From 67752e11ef60632369fc5907626517ce59a4050a Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Wed, 8 Jan 2025 12:31:47 +0000 Subject: [PATCH 18/24] Revert sdl2 version change and add cmake flags to disable the error --- cmake/custom-triplets/x64-osx-mixed.cmake | 3 +++ vcpkg.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/custom-triplets/x64-osx-mixed.cmake b/cmake/custom-triplets/x64-osx-mixed.cmake index 1e6998b65..3eee4d193 100644 --- a/cmake/custom-triplets/x64-osx-mixed.cmake +++ b/cmake/custom-triplets/x64-osx-mixed.cmake @@ -14,3 +14,6 @@ else() set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_CRT_LINKAGE static) endif() + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-declaration-after-statement") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-declaration-after-statement") \ No newline at end of file diff --git a/vcpkg.json b/vcpkg.json index 4de666264..2066d9522 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -13,6 +13,6 @@ }, "builtin-baseline": "9aa0d66373ce3a6868d12353d0d4960db0d4bd18", "overrides": [ - { "name": "sdl2", "version": "2.30.11" } + { "name": "sdl2", "version": "2.0.16" } ] } From c4b60938bb8b5d6f7996b6e81cf6a4896614e577 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Wed, 8 Jan 2025 12:33:17 +0000 Subject: [PATCH 19/24] pre-commit --- cmake/custom-triplets/x64-osx-mixed.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/custom-triplets/x64-osx-mixed.cmake b/cmake/custom-triplets/x64-osx-mixed.cmake index 3eee4d193..02ffaf7fc 100644 --- a/cmake/custom-triplets/x64-osx-mixed.cmake +++ b/cmake/custom-triplets/x64-osx-mixed.cmake @@ -16,4 +16,4 @@ else() endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-declaration-after-statement") -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-declaration-after-statement") \ No newline at end of file +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-declaration-after-statement") From 360c96e4e76e09e6728c441ced43a919fab95e97 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Wed, 8 Jan 2025 12:39:52 +0000 Subject: [PATCH 20/24] Update sdl2 version to 2.0.22 --- cmake/custom-triplets/x64-osx-mixed.cmake | 3 --- vcpkg.json | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/cmake/custom-triplets/x64-osx-mixed.cmake b/cmake/custom-triplets/x64-osx-mixed.cmake index 02ffaf7fc..1e6998b65 100644 --- a/cmake/custom-triplets/x64-osx-mixed.cmake +++ b/cmake/custom-triplets/x64-osx-mixed.cmake @@ -14,6 +14,3 @@ else() set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_CRT_LINKAGE static) endif() - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-declaration-after-statement") -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-declaration-after-statement") diff --git a/vcpkg.json b/vcpkg.json index 2066d9522..dc6041ced 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -13,6 +13,6 @@ }, "builtin-baseline": "9aa0d66373ce3a6868d12353d0d4960db0d4bd18", "overrides": [ - { "name": "sdl2", "version": "2.0.16" } + { "name": "sdl2", "version": "2.0.22" } ] } From 7e4207ba2087a7962dd5f87031f763a9c1b79f82 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Wed, 8 Jan 2025 12:43:17 +0000 Subject: [PATCH 21/24] Update sdl2 version to 2.24.2 --- .github/workflows/ci.yml | 360 +++++++++++++++++++-------------------- vcpkg.json | 2 +- 2 files changed, 181 insertions(+), 181 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98e66178b..ababd2402 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,17 +41,17 @@ jobs: matrix: include: # 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.12' - triplet: x64-linux-mixed +# - runs-on: ubuntu-latest +# python: '3.12' +# triplet: x64-linux-mixed - runs-on: macos-13 python: '3.12' triplet: x64-osx-mixed - - runs-on: windows-latest - python: '3.12' - triplet: x64-windows +# - runs-on: windows-latest +# python: '3.12' +# triplet: x64-windows env: VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} @@ -87,177 +87,177 @@ jobs: - name: Test run: python -m pytest - build-wheels: - 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-13 - arch: x86_64 - - runs-on: macos-13 - arch: arm64 - runs-on: ${{ matrix.runs-on }} - - steps: - - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - if: runner.os == 'linux' - id: buildx - 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 - uses: docker/build-push-action@v6 - with: - context: . - file: .github/docker/manylinux-vcpkg.Dockerfile - tags: manylinux-vcpkg:latest - push: false - load: true - - - name: Download and unpack ROMs - run: ./scripts/download_unpack_roms.sh - - - name: Build wheels - uses: pypa/cibuildwheel@v2.21.3 - env: - CIBW_ARCHS: "${{ matrix.arch }}" - - - name: Upload wheels - uses: actions/upload-artifact@v4 - with: - name: wheels-${{ runner.os }}-${{ matrix.arch }} - path: ./wheelhouse/*.whl - - test-wheels: - name: Test wheels - needs: [build-wheels, build-scratch] - - strategy: - fail-fast: false - matrix: - include: - # example wheel names (if the wheel names change, look at the `ls wheels/` for the new names) - # ale_py-0.x.x-cp310-cp310-macosx_10_15_x86_64.whl - # 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.9' - wheel-name: 'cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64' - arch: 'x86_64' - - runs-on: ubuntu-latest - python: '3.10' - wheel-name: 'cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64' - arch: 'x86_64' - - runs-on: ubuntu-latest - python: '3.11' - wheel-name: 'cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64' - arch: 'x86_64' - - runs-on: ubuntu-latest - 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.9' - wheel-name: 'cp39-cp39-win_amd64' - arch: AMD64 - - runs-on: windows-latest - python: '3.10' - wheel-name: 'cp310-cp310-win_amd64' - arch: AMD64 - - runs-on: windows-latest - python: '3.11' - wheel-name: 'cp311-cp311-win_amd64' - arch: AMD64 - - runs-on: windows-latest - 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-13 - python: '3.9' - wheel-name: 'cp39-cp39-macosx_10_15_x86_64' - arch: x86_64 - - runs-on: macos-13 - python: '3.10' - wheel-name: 'cp310-cp310-macosx_10_15_x86_64' - arch: x86_64 - - runs-on: macos-13 - python: '3.11' - wheel-name: 'cp311-cp311-macosx_10_15_x86_64' - arch: x86_64 - - 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-arm64 - python: '3.9' - wheel-name: 'cp39-cp39-macosx_11_0_arm64' - arch: arm64 - - runs-on: macos-14-arm64 - python: '3.10' - wheel-name: 'cp310-cp310-macosx_11_0_arm64' - arch: arm64 - - runs-on: macos-14-arm64 - python: '3.11' - wheel-name: 'cp311-cp311-macosx_11_0_arm64' - arch: arm64 - - 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 }} - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python }} - - - uses: actions/download-artifact@v4 - with: - name: wheels-${{ runner.os }}-${{ matrix.arch }} - - - run: ls - - - name: Install ALE wheel - # wildcarding doesn't work for some reason, therefore, update the project version here - 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.0 pytest - - - name: Test - run: python -m pytest +# build-wheels: +# 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-13 +# arch: x86_64 +# - runs-on: macos-13 +# arch: arm64 +# runs-on: ${{ matrix.runs-on }} +# +# steps: +# - uses: actions/checkout@v4 +# +# - name: Set up Docker Buildx +# if: runner.os == 'linux' +# id: buildx +# 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 +# uses: docker/build-push-action@v6 +# with: +# context: . +# file: .github/docker/manylinux-vcpkg.Dockerfile +# tags: manylinux-vcpkg:latest +# push: false +# load: true +# +# - name: Download and unpack ROMs +# run: ./scripts/download_unpack_roms.sh +# +# - name: Build wheels +# uses: pypa/cibuildwheel@v2.21.3 +# env: +# CIBW_ARCHS: "${{ matrix.arch }}" +# +# - name: Upload wheels +# uses: actions/upload-artifact@v4 +# with: +# name: wheels-${{ runner.os }}-${{ matrix.arch }} +# path: ./wheelhouse/*.whl +# +# test-wheels: +# name: Test wheels +# needs: [build-wheels, build-scratch] +# +# strategy: +# fail-fast: false +# matrix: +# include: +# # example wheel names (if the wheel names change, look at the `ls wheels/` for the new names) +# # ale_py-0.x.x-cp310-cp310-macosx_10_15_x86_64.whl +# # 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.9' +# wheel-name: 'cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64' +# arch: 'x86_64' +# - runs-on: ubuntu-latest +# python: '3.10' +# wheel-name: 'cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64' +# arch: 'x86_64' +# - runs-on: ubuntu-latest +# python: '3.11' +# wheel-name: 'cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64' +# arch: 'x86_64' +# - runs-on: ubuntu-latest +# 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.9' +# wheel-name: 'cp39-cp39-win_amd64' +# arch: AMD64 +# - runs-on: windows-latest +# python: '3.10' +# wheel-name: 'cp310-cp310-win_amd64' +# arch: AMD64 +# - runs-on: windows-latest +# python: '3.11' +# wheel-name: 'cp311-cp311-win_amd64' +# arch: AMD64 +# - runs-on: windows-latest +# 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-13 +# python: '3.9' +# wheel-name: 'cp39-cp39-macosx_10_15_x86_64' +# arch: x86_64 +# - runs-on: macos-13 +# python: '3.10' +# wheel-name: 'cp310-cp310-macosx_10_15_x86_64' +# arch: x86_64 +# - runs-on: macos-13 +# python: '3.11' +# wheel-name: 'cp311-cp311-macosx_10_15_x86_64' +# arch: x86_64 +# - 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-arm64 +# python: '3.9' +# wheel-name: 'cp39-cp39-macosx_11_0_arm64' +# arch: arm64 +# - runs-on: macos-14-arm64 +# python: '3.10' +# wheel-name: 'cp310-cp310-macosx_11_0_arm64' +# arch: arm64 +# - runs-on: macos-14-arm64 +# python: '3.11' +# wheel-name: 'cp311-cp311-macosx_11_0_arm64' +# arch: arm64 +# - 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 }} +# +# steps: +# - uses: actions/checkout@v4 +# - uses: actions/setup-python@v5 +# with: +# python-version: ${{ matrix.python }} +# +# - uses: actions/download-artifact@v4 +# with: +# name: wheels-${{ runner.os }}-${{ matrix.arch }} +# +# - run: ls +# +# - name: Install ALE wheel +# # wildcarding doesn't work for some reason, therefore, update the project version here +# 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.0 pytest +# +# - name: Test +# run: python -m pytest diff --git a/vcpkg.json b/vcpkg.json index dc6041ced..1d06ba794 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -13,6 +13,6 @@ }, "builtin-baseline": "9aa0d66373ce3a6868d12353d0d4960db0d4bd18", "overrides": [ - { "name": "sdl2", "version": "2.0.22" } + { "name": "sdl2", "version": "2.24.2" } ] } From d8b3f8106bcd48f549e3ad1a02968e5702a133d6 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Wed, 8 Jan 2025 12:50:14 +0000 Subject: [PATCH 22/24] Re-enable the rest of the ci --- .github/workflows/ci.yml | 374 +++++++++++++++++++-------------------- vcpkg.json | 2 +- 2 files changed, 188 insertions(+), 188 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ababd2402..bc28d19fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,17 +41,17 @@ jobs: matrix: include: # 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.12' -# triplet: x64-linux-mixed + - runs-on: ubuntu-latest + python: '3.12' + triplet: x64-linux-mixed - runs-on: macos-13 python: '3.12' triplet: x64-osx-mixed -# - runs-on: windows-latest -# python: '3.12' -# triplet: x64-windows + - runs-on: windows-latest + python: '3.12' + triplet: x64-windows env: VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} @@ -76,188 +76,188 @@ jobs: - name: Build run: python -m pip install --verbose .[test] - - name: debug - if: always() && runner.os == 'macOS' - run: cat /usr/local/share/vcpkg/buildtrees/sdl2/install-x64-osx-mixed-dbg-out.log - - - name: debug vcpkg - if: always() && runner.os == 'macOS' - run: cat /Users/runner/work/Arcade-Learning-Environment/Arcade-Learning-Environment/build/temp.macosx-10.13-universal2-cpython-312/ale_py._ale_py/vcpkg-manifest-install.log +# - name: debug +# if: always() && runner.os == 'macOS' +# run: cat /usr/local/share/vcpkg/buildtrees/sdl2/install-x64-osx-mixed-dbg-out.log +# +# - name: debug vcpkg +# if: always() && runner.os == 'macOS' +# run: cat /Users/runner/work/Arcade-Learning-Environment/Arcade-Learning-Environment/build/temp.macosx-10.13-universal2-cpython-312/ale_py._ale_py/vcpkg-manifest-install.log - name: Test run: python -m pytest -# build-wheels: -# 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-13 -# arch: x86_64 -# - runs-on: macos-13 -# arch: arm64 -# runs-on: ${{ matrix.runs-on }} -# -# steps: -# - uses: actions/checkout@v4 -# -# - name: Set up Docker Buildx -# if: runner.os == 'linux' -# id: buildx -# 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 -# uses: docker/build-push-action@v6 -# with: -# context: . -# file: .github/docker/manylinux-vcpkg.Dockerfile -# tags: manylinux-vcpkg:latest -# push: false -# load: true -# -# - name: Download and unpack ROMs -# run: ./scripts/download_unpack_roms.sh -# -# - name: Build wheels -# uses: pypa/cibuildwheel@v2.21.3 -# env: -# CIBW_ARCHS: "${{ matrix.arch }}" -# -# - name: Upload wheels -# uses: actions/upload-artifact@v4 -# with: -# name: wheels-${{ runner.os }}-${{ matrix.arch }} -# path: ./wheelhouse/*.whl -# -# test-wheels: -# name: Test wheels -# needs: [build-wheels, build-scratch] -# -# strategy: -# fail-fast: false -# matrix: -# include: -# # example wheel names (if the wheel names change, look at the `ls wheels/` for the new names) -# # ale_py-0.x.x-cp310-cp310-macosx_10_15_x86_64.whl -# # 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.9' -# wheel-name: 'cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64' -# arch: 'x86_64' -# - runs-on: ubuntu-latest -# python: '3.10' -# wheel-name: 'cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64' -# arch: 'x86_64' -# - runs-on: ubuntu-latest -# python: '3.11' -# wheel-name: 'cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64' -# arch: 'x86_64' -# - runs-on: ubuntu-latest -# 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.9' -# wheel-name: 'cp39-cp39-win_amd64' -# arch: AMD64 -# - runs-on: windows-latest -# python: '3.10' -# wheel-name: 'cp310-cp310-win_amd64' -# arch: AMD64 -# - runs-on: windows-latest -# python: '3.11' -# wheel-name: 'cp311-cp311-win_amd64' -# arch: AMD64 -# - runs-on: windows-latest -# 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-13 -# python: '3.9' -# wheel-name: 'cp39-cp39-macosx_10_15_x86_64' -# arch: x86_64 -# - runs-on: macos-13 -# python: '3.10' -# wheel-name: 'cp310-cp310-macosx_10_15_x86_64' -# arch: x86_64 -# - runs-on: macos-13 -# python: '3.11' -# wheel-name: 'cp311-cp311-macosx_10_15_x86_64' -# arch: x86_64 -# - 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-arm64 -# python: '3.9' -# wheel-name: 'cp39-cp39-macosx_11_0_arm64' -# arch: arm64 -# - runs-on: macos-14-arm64 -# python: '3.10' -# wheel-name: 'cp310-cp310-macosx_11_0_arm64' -# arch: arm64 -# - runs-on: macos-14-arm64 -# python: '3.11' -# wheel-name: 'cp311-cp311-macosx_11_0_arm64' -# arch: arm64 -# - 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 }} -# -# steps: -# - uses: actions/checkout@v4 -# - uses: actions/setup-python@v5 -# with: -# python-version: ${{ matrix.python }} -# -# - uses: actions/download-artifact@v4 -# with: -# name: wheels-${{ runner.os }}-${{ matrix.arch }} -# -# - run: ls -# -# - name: Install ALE wheel -# # wildcarding doesn't work for some reason, therefore, update the project version here -# 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.0 pytest -# -# - name: Test -# run: python -m pytest + build-wheels: + 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-13 + arch: x86_64 + - runs-on: macos-13 + arch: arm64 + runs-on: ${{ matrix.runs-on }} + + steps: + - uses: actions/checkout@v4 + + - name: Set up Docker Buildx + if: runner.os == 'linux' + id: buildx + 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 + uses: docker/build-push-action@v6 + with: + context: . + file: .github/docker/manylinux-vcpkg.Dockerfile + tags: manylinux-vcpkg:latest + push: false + load: true + + - name: Download and unpack ROMs + run: ./scripts/download_unpack_roms.sh + + - name: Build wheels + uses: pypa/cibuildwheel@v2.21.3 + env: + CIBW_ARCHS: "${{ matrix.arch }}" + + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: wheels-${{ runner.os }}-${{ matrix.arch }} + path: ./wheelhouse/*.whl + + test-wheels: + name: Test wheels + needs: [build-wheels, build-scratch] + + strategy: + fail-fast: false + matrix: + include: + # example wheel names (if the wheel names change, look at the `ls wheels/` for the new names) + # ale_py-0.x.x-cp310-cp310-macosx_10_15_x86_64.whl + # 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.9' + wheel-name: 'cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64' + arch: 'x86_64' + - runs-on: ubuntu-latest + python: '3.10' + wheel-name: 'cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64' + arch: 'x86_64' + - runs-on: ubuntu-latest + python: '3.11' + wheel-name: 'cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64' + arch: 'x86_64' + - runs-on: ubuntu-latest + 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.9' + wheel-name: 'cp39-cp39-win_amd64' + arch: AMD64 + - runs-on: windows-latest + python: '3.10' + wheel-name: 'cp310-cp310-win_amd64' + arch: AMD64 + - runs-on: windows-latest + python: '3.11' + wheel-name: 'cp311-cp311-win_amd64' + arch: AMD64 + - runs-on: windows-latest + 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-13 + python: '3.9' + wheel-name: 'cp39-cp39-macosx_10_15_x86_64' + arch: x86_64 + - runs-on: macos-13 + python: '3.10' + wheel-name: 'cp310-cp310-macosx_10_15_x86_64' + arch: x86_64 + - runs-on: macos-13 + python: '3.11' + wheel-name: 'cp311-cp311-macosx_10_15_x86_64' + arch: x86_64 + - 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-arm64 + python: '3.9' + wheel-name: 'cp39-cp39-macosx_11_0_arm64' + arch: arm64 + - runs-on: macos-14-arm64 + python: '3.10' + wheel-name: 'cp310-cp310-macosx_11_0_arm64' + arch: arm64 + - runs-on: macos-14-arm64 + python: '3.11' + wheel-name: 'cp311-cp311-macosx_11_0_arm64' + arch: arm64 + - 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 }} + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + + - uses: actions/download-artifact@v4 + with: + name: wheels-${{ runner.os }}-${{ matrix.arch }} + + - run: ls + + - name: Install ALE wheel + # wildcarding doesn't work for some reason, therefore, update the project version here + 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.0 pytest + + - name: Test + run: python -m pytest diff --git a/vcpkg.json b/vcpkg.json index 1d06ba794..dc6041ced 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -13,6 +13,6 @@ }, "builtin-baseline": "9aa0d66373ce3a6868d12353d0d4960db0d4bd18", "overrides": [ - { "name": "sdl2", "version": "2.24.2" } + { "name": "sdl2", "version": "2.0.22" } ] } From 009d247b08e9ab4055d27521428f6216bc66e479 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Wed, 8 Jan 2025 12:54:34 +0000 Subject: [PATCH 23/24] Revert accidental change to sdl2 version, back to 2.24.2 --- vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcpkg.json b/vcpkg.json index dc6041ced..1d06ba794 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -13,6 +13,6 @@ }, "builtin-baseline": "9aa0d66373ce3a6868d12353d0d4960db0d4bd18", "overrides": [ - { "name": "sdl2", "version": "2.0.22" } + { "name": "sdl2", "version": "2.24.2" } ] } From 7a075596b7a6dfa3e2637801fdb54fbd3c852632 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Wed, 8 Jan 2025 14:09:42 +0000 Subject: [PATCH 24/24] Update macos-14-arm64 to macos-14 --- .github/workflows/ci.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc28d19fe..9df330217 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,14 +76,6 @@ jobs: - name: Build run: python -m pip install --verbose .[test] -# - name: debug -# if: always() && runner.os == 'macOS' -# run: cat /usr/local/share/vcpkg/buildtrees/sdl2/install-x64-osx-mixed-dbg-out.log -# -# - name: debug vcpkg -# if: always() && runner.os == 'macOS' -# run: cat /Users/runner/work/Arcade-Learning-Environment/Arcade-Learning-Environment/build/temp.macosx-10.13-universal2-cpython-312/ale_py._ale_py/vcpkg-manifest-install.log - - name: Test run: python -m pytest @@ -217,23 +209,23 @@ jobs: wheel-name: 'cp313-cp313-macosx_10_15_x86_64' arch: x86_64 - - runs-on: macos-14-arm64 + - runs-on: macos-14 python: '3.9' wheel-name: 'cp39-cp39-macosx_11_0_arm64' arch: arm64 - - runs-on: macos-14-arm64 + - runs-on: macos-14 python: '3.10' wheel-name: 'cp310-cp310-macosx_11_0_arm64' arch: arm64 - - runs-on: macos-14-arm64 + - runs-on: macos-14 python: '3.11' wheel-name: 'cp311-cp311-macosx_11_0_arm64' arch: arm64 - - runs-on: macos-14-arm64 + - runs-on: macos-14 python: '3.12' wheel-name: 'cp312-cp312-macosx_11_0_arm64' arch: arm64 - - runs-on: macos-14-arm64 + - runs-on: macos-14 python: '3.13' wheel-name: 'cp313-cp313-macosx_11_0_arm64' arch: arm64