From d59d00688b58c5c14dff5fc79db5c22e86987f5d Mon Sep 17 00:00:00 2001 From: Jesse Farebrother Date: Mon, 5 Sep 2022 09:47:46 -0400 Subject: [PATCH] Add support for Python 3.11 --- .github/workflows/ci.yml | 11 ++++++++++- .github/workflows/wheels.yml | 2 +- docker/docker-bake.hcl | 19 +++++++++++++++++++ ....Dockerfile => manylinux-vcpkg.Dockerfile} | 3 ++- pyproject.toml | 6 +++++- src/python/CMakeLists.txt | 2 +- 6 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 docker/docker-bake.hcl rename docker/{manylinux2014_x86_64-vcpkg.Dockerfile => manylinux-vcpkg.Dockerfile} (90%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 253650f17..d4f8b2492 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,9 @@ jobs: - runs-on: ubuntu-latest python: '3.10' triplet: x64-linux-mixed + - runs-on: ubuntu-latest + python: '3.11.0-rc.1' + triplet: x64-linux-mixed - runs-on: macos-latest python: '3.7' @@ -61,6 +64,9 @@ jobs: - runs-on: macos-latest python: '3.10' triplet: x64-osx-mixed + - runs-on: macos-latest + python: '3.11.0-rc.1' + triplet: x64-osx-mixed - runs-on: windows-latest python: '3.7' @@ -74,6 +80,9 @@ jobs: - runs-on: windows-latest python: '3.10' triplet: x64-windows + - runs-on: windows-latest + python: '3.11.0-rc.1' + triplet: x64-windows env: VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} runs-on: ${{ matrix.runs-on }} @@ -83,7 +92,7 @@ jobs: - uses: actions/setup-python@v2 with: - python-version: "3.x" + python-version: ${{ matrix.python }} - name: Install test dependencies # TODO(jfarebro): There's a bug with Windows cmake and PEP517 builds via pip install. diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 630aa82e9..8030bc356 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -46,7 +46,7 @@ jobs: doNotCache: true - name: Build wheels - uses: pypa/cibuildwheel@v2.4.0 + uses: pypa/cibuildwheel@v2.9.0 env: CIBW_ARCHS: "${{ matrix.arch }}" diff --git a/docker/docker-bake.hcl b/docker/docker-bake.hcl new file mode 100644 index 000000000..6c9b289dc --- /dev/null +++ b/docker/docker-bake.hcl @@ -0,0 +1,19 @@ +group "default" { + targets = [] +} + +variable "MANYLINUX_VERSION" { + default = "2_28" +} + +variable "MANYLINUX_ARCH" { + default = "x86_64" +} + +target "manylinux-vcpkg" { + tags = ["ghcr.io/jessefarebro/manylinux_${MANYLINUX_VERSION}_${MANYLINUX_ARCH}-vcpkg"] + dockerfile = "manylinux-vcpkg.Dockerfile" + args = { + BASE_IMAGE = "quay.io/pypa/manylinux_${MANYLINUX_VERSION}_${MANYLINUX_ARCH}" + } +} diff --git a/docker/manylinux2014_x86_64-vcpkg.Dockerfile b/docker/manylinux-vcpkg.Dockerfile similarity index 90% rename from docker/manylinux2014_x86_64-vcpkg.Dockerfile rename to docker/manylinux-vcpkg.Dockerfile index 633d60cc1..ff3773420 100644 --- a/docker/manylinux2014_x86_64-vcpkg.Dockerfile +++ b/docker/manylinux-vcpkg.Dockerfile @@ -1,4 +1,5 @@ -FROM quay.io/pypa/manylinux2014_x86_64 +ARG BASE_IMAGE +FROM ${BASE_IMAGE} LABEL org.opencontainers.image.source https://github.com/mgbellemare/Arcade-Learning-Environment diff --git a/pyproject.toml b/pyproject.toml index 62fe1582a..9bd0def8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,11 +87,15 @@ test-requires = ["pytest", "git+https://github.com/openai/gym#egg=gym"] test-command = "pytest {project}" # vcpkg manylinux images -manylinux-x86_64-image = "ghcr.io/jessefarebro/manylinux2014_x86_64-vcpkg" +manylinux-x86_64-image = "ghcr.io/jessefarebro/manylinux_2_28_x86_64-vcpkg" [tool.cibuildwheel.linux] environment-pass = ["GITHUB_REF"] +[[tool.cibuildwheel.overrides]] +select = "cp3{7,8,9}-*" +manylinux-x86_64-image = "ghcr.io/jessefarebro/manylinux2014_x86_64-vcpkg" + # macOS x86-64 [[tool.cibuildwheel.overrides]] select = "*-macosx_x86_64" diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index 887f25c61..911e2805a 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -4,7 +4,7 @@ include(FetchContent) FetchContent_Declare( pybind11 GIT_REPOSITORY https://github.com/pybind/pybind11 - GIT_TAG v2.7.1) + GIT_TAG v2.10.0) FetchContent_MakeAvailable(pybind11) add_library(ale-py MODULE ale_python_interface.cpp)