forked from facebookresearch/nle
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests and wheel for Python 3.12 (#42)
* Add tests and wheels for Python 3.12 * Point the manylinux wheel test to python version 3.12 * Replace distutils module for build * Change to shutil module to replace spawn check * Replace get_python_inc() function with sysconfig equivalent * Install/upgrade setuptools in all virtual environments
- Loading branch information
1 parent
079fb3d
commit 3531028
Showing
4 changed files
with
31 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,16 +12,16 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: ['3.8', '3.9', '3.10', '3.11'] | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
os: [ubuntu-20.04, macos-latest] | ||
fail-fast: false | ||
steps: | ||
- name: Setup Python ${{ matrix.python-version }} env | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Ensure latest pip & wheel | ||
run: python -m pip install -q --upgrade pip wheel | ||
- name: Ensure latest pip, wheel & setuptools | ||
run: python -m pip install -q --upgrade pip wheel setuptools | ||
- name: Install dependencies | ||
run: | | ||
if [ "$RUNNER_OS" == "Linux" ]; then | ||
|
@@ -53,8 +53,8 @@ jobs: | |
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.8 | ||
- name: Ensure latest pip & wheel | ||
run: python -m pip install -q --upgrade pip wheel | ||
- name: Ensure latest pip, wheel & setuptools | ||
run: python -m pip install -q --upgrade pip wheel setuptools | ||
- name: Install dependencies | ||
run: | | ||
brew install cmake | ||
|
@@ -75,17 +75,17 @@ jobs: | |
pushd .. | ||
python -m pytest --import-mode=append -svx $REPONAME/nle/tests | ||
popd | ||
test_sdist_3_11: | ||
name: Test sdist on MacOS w/ Py3.11 | ||
test_sdist_3_12: | ||
name: Test sdist on MacOS w/ Py3.12 | ||
needs: test_repo | ||
runs-on: macos-latest | ||
steps: | ||
- name: Setup Python 3.11 env | ||
- name: Setup Python 3.12 env | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
- name: Ensure latest pip & wheel | ||
run: python -m pip install -q --upgrade pip wheel | ||
python-version: 3.12 | ||
- name: Ensure latest pip, wheel & setuptools | ||
run: python -m pip install -q --upgrade pip wheel setuptools | ||
- name: Install dependencies | ||
run: | | ||
brew install cmake | ||
|
@@ -129,7 +129,7 @@ jobs: | |
if: github.event_name != 'release' | ||
uses: pypa/[email protected] # The main configuration is in pyproject.toml | ||
env: | ||
CIBW_BUILD: "cp311-manylinux*" # Build only python 3.11 wheels for testing | ||
CIBW_BUILD: "cp312-manylinux*" # Build only python 3.12 wheels for testing | ||
# Increase verbosity to see what's going on in the build in case of failure | ||
CIBW_BUILD_VERBOSITY: 3 | ||
CIBW_REPAIR_WHEEL_COMMAND_LINUX: > | ||
|
@@ -145,17 +145,17 @@ jobs: | |
with: | ||
name: python-wheels | ||
path: ./wheelhouse/*.whl | ||
test_manylinux_3_11: | ||
name: Test manylinux wheel on Ubuntu w/ Py3.11 | ||
test_manylinux_3_12: | ||
name: Test manylinux wheel on Ubuntu w/ Py3.12 | ||
needs: build_wheels | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Setup Python 3.11 env | ||
- name: Setup Python 3.12 env | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
- name: Ensure latest pip & wheel | ||
run: python -m pip install -q --upgrade pip wheel | ||
python-version: 3.12 | ||
- name: Ensure latest pip, wheel & setuptools | ||
run: python -m pip install -q --upgrade pip wheel tools | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
@@ -166,7 +166,7 @@ jobs: | |
path: dist | ||
- name: Install from wheel # Install wheel mathcing the Python version and architecture | ||
run: | | ||
WHEELNAME=$(ls dist/*311*manylinux*x86_64*.whl) | ||
WHEELNAME=$(ls dist/*312*manylinux*x86_64*.whl) | ||
MODE="[all]" | ||
pip install "$WHEELNAME$MODE" | ||
- name: Run tests outside repo dir | ||
|
@@ -179,7 +179,7 @@ jobs: | |
# Use prereleases to test publish the artefacts to testpypi | ||
test_deploy: | ||
name: Deploy artefacts to testpypi | ||
needs: [test_sdist_3_11, test_manylinux_3_11] | ||
needs: [test_sdist_3_12, test_manylinux_3_12] | ||
if: github.event_name == 'release' && github.event.action == 'prereleased' | ||
runs-on: ubuntu-latest | ||
environment: | ||
|
@@ -220,7 +220,7 @@ jobs: | |
# functionalities like workflow dependencies :| | ||
deploy_sdist: | ||
name: Deploy sdist to pypi | ||
needs: [test_sdist_3_11, test_manylinux_3_11] | ||
needs: [test_sdist_3_12, test_manylinux_3_12] | ||
if: github.event_name == 'release' && github.event.action == 'released' | ||
runs-on: ubuntu-latest | ||
environment: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters