Skip to content

Commit cd134cb

Browse files
committed
[CI] Fix Linux aarch64 nightly wheel builds
1 parent 54a147b commit cd134cb

5 files changed

Lines changed: 19 additions & 3 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
sed -i.bak 's/name = "tensordict"/name = "tensordict-nightly"/' pyproject.toml
6+
trap 'mv pyproject.toml.bak pyproject.toml' EXIT
7+
8+
# Dependencies, including nightly Torch, are installed by test-infra.
9+
SETUPTOOLS_SCM_PRETEND_VERSION="$(date +%Y.%m.%d)" python -m pip wheel --no-deps .
10+
mkdir -p dist
11+
mv tensordict_nightly-*.whl dist/

.github/scripts/version_script.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ else
6565

6666
${CONDA_RUN} conda install -c conda-forge pybind11 -y
6767

68+
# Python 3.15 beta packages on Linux split the static library from the interpreter.
69+
if [[ "${OSTYPE:-}" == linux* && "${PYTHON_VERSION:-}" == 3.15* ]]; then
70+
${CONDA_RUN} conda install -c conda-forge/label/python_dev -c conda-forge libpython-static -y
71+
fi
72+
6873
# Install setuptools_scm which is required for building with --no-isolation
6974
# This is done here (not in pre-script) to avoid cache issues
7075
${CONDA_RUN} pip install setuptools_scm

.github/workflows/build-wheels-aarch64-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
env-var-script: .github/scripts/version_script.sh
6464
architecture: aarch64
6565
setup-miniconda: false
66-
build-command: ${{ inputs.nightly && 'sed -i.bak ''s/name = "tensordict"/name = "tensordict-nightly"/'' pyproject.toml && SETUPTOOLS_SCM_PRETEND_VERSION=$(date +%Y.%m.%d) pip wheel . && rm pyproject.toml.bak && mkdir -p dist && mv tensordict_nightly-*.whl ./dist' || 'pip wheel . && mkdir -p dist && mv tensordict*.whl ./dist' }}
66+
build-command: ${{ inputs.nightly && 'bash .github/scripts/build-aarch64-nightly-wheel.sh' || 'pip wheel --no-deps . && mkdir -p dist && mv tensordict*.whl ./dist' }}
6767
build-platform: python-build-package
6868
upload-to-pypi: ${{ inputs.nightly && 'cpu' || '' }}
6969
secrets:

.github/workflows/build-wheels-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ jobs:
5959
trigger-event: ${{ github.event_name }}
6060
env-var-script: .github/scripts/version_script.sh
6161
post-script: ${{ matrix.post-script }}
62-
build-command: pip wheel . && mkdir -p dist && mv tensordict*.whl ./dist
62+
build-command: pip wheel --no-deps . && mkdir -p dist && mv tensordict*.whl ./dist
6363
build-platform: python-build-package

.github/workflows/build-wheels-m1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
smoke-test-script: ${{ matrix.smoke-test-script }}
5858
trigger-event: ${{ github.event_name }}
5959
env-var-script: .github/scripts/version_script.sh
60-
build-command: pip wheel . && mkdir -p dist && mv tensordict*.whl ./dist
60+
build-command: pip wheel --no-deps . && mkdir -p dist && mv tensordict*.whl ./dist
6161
build-platform: python-build-package
6262
# Workaround for the M1 runners' Homebrew miniconda base env moving to
6363
# py3.14, where test-infra's `conda install -y conda=25.3.0` no longer

0 commit comments

Comments
 (0)