forked from facebookresearch/nle
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch build wheels to use native mode and separate runners (#48)
* Switch build wheels to use native mode and separate runners * Switch to Ubuntu latest for x_86 wheel * Ensure artifacts from both runners are named differently
- Loading branch information
1 parent
047a0b8
commit 137abc5
Showing
2 changed files
with
26 additions
and
16 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 |
---|---|---|
|
@@ -115,23 +115,21 @@ jobs: | |
build_wheels: | ||
name: Build wheels on Ubuntu | ||
needs: test_repo | ||
runs-on: ubuntu-20.04 # Can be also run for macOS | ||
runs-on: ${{ matrix.os }} # Can be also run for macOS | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, ubuntu-24.04-arm] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Set up QEMU # Required for building manylinux aarch64 wheels on x86_64 | ||
if: runner.os == 'Linux' | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: all | ||
- name: Build wheels | ||
if: github.event_name != 'release' | ||
uses: pypa/[email protected] # The main configuration is in pyproject.toml | ||
env: | ||
# Build of cp312-manylinux_aarch64 wheels failing, so restrict | ||
# to only building _x86_64 wheel | ||
CIBW_BUILD: "cp312-manylinux_x86_64" # Build only python 3.12 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,12 +143,12 @@ jobs: | |
- name: Save wheels | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-wheels | ||
name: python-wheels-${{ matrix.os }} | ||
path: ./wheelhouse/*.whl | ||
test_manylinux_3_12: | ||
name: Test manylinux wheel on Ubuntu w/ Py3.12 | ||
needs: build_wheels | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Python 3.12 env | ||
uses: actions/setup-python@v5 | ||
|
@@ -164,7 +162,7 @@ jobs: | |
- name: Get wheels artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: python-wheels | ||
name: python-wheels-ubuntu-latest | ||
path: dist | ||
- name: Install from wheel # Install wheel mathcing the Python version and architecture | ||
run: | | ||
|
@@ -201,10 +199,15 @@ jobs: | |
with: | ||
name: python-sdist | ||
path: dist | ||
- name: Get wheels artifacts # Get wheels artifacts from the build_wheels job | ||
- name: Get wheels artifacts # Get x86 wheels artifacts from the build_wheels job | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: python-wheels-ubuntu-latest | ||
path: dist | ||
- name: Get wheels artifacts # Get aarch64 wheels artifacts from the build_wheels job | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: python-wheels | ||
name: python-wheels-ubuntu-24.04-arm | ||
path: dist | ||
- name: Report dist contents | ||
run: | | ||
|
@@ -242,10 +245,15 @@ jobs: | |
with: | ||
name: python-sdist | ||
path: dist | ||
- name: Get wheels artifacts # Get wheels artifacts from the build_wheels job | ||
- name: Get wheels artifacts # Get x86 wheels artifacts from the build_wheels job | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: python-wheels-ubuntu-latest | ||
path: dist | ||
- name: Get wheels artifacts # Get aarch64 wheels artifacts from the build_wheels job | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: python-wheels | ||
name: python-wheels-ubuntu-24.04-arm | ||
path: dist | ||
- name: Report dist contents | ||
run: | | ||
|
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