Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Sep 27, 2023
1 parent 56a7111 commit 9ef5c7d
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 3 deletions.
64 changes: 61 additions & 3 deletions .github/workflows/nightly_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,37 @@ jobs:
name: tensordict-mac-${{ matrix.python_version[0] }}.whl
path: dist/*.whl

build-wheel-m1:
if: github.repository_owner == 'pytorch-labs'
runs-on: macos-m1-12
strategy:
matrix:
python_version: [["3.8", "3.8"], ["3.9", "3.9"], ["3.10", "3.10.3"], ["3.11", "3.11"]]
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version[1] }}
architecture: x64
- name: Checkout tensordict
uses: actions/checkout@v2
- name: Install PyTorch nightly
run: |
python3 -mpip install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu
- name: Build tensordict Nightly
run: |
rm -r dist || true
export CC=clang CXX=clang++
python3 -mpip install wheel
python3 setup.py bdist_wheel \
--package_name tensordict-nightly \
--python-tag=${{ matrix.python-tag }}
- name: Upload wheel for the test-wheel job
uses: actions/upload-artifact@v2
with:
name: tensordict-mac-${{ matrix.python_version[0] }}.whl
path: dist/*.whl

test-wheel-mac:
# Don't run on forked repos.
if: github.repository_owner == 'pytorch-labs'
Expand Down Expand Up @@ -148,11 +179,11 @@ jobs:
pytest test/smoke_test.py -v --durations 200
exit $EXIT_STATUS
test-wheel-mac-m1:
test-wheel-m1:
# Don't run on forked repos.
if: github.repository_owner == 'pytorch-labs'
needs: build-wheel-mac
runs-on: osx-arm64
needs: build-wheel-m1
runs-on: macos-m1-12
strategy:
matrix:
python_version: [["3.8", "3.8"], ["3.9", "3.9"], ["3.10", "3.10.3"], ["3.11", "3.11"]]
Expand Down Expand Up @@ -255,6 +286,33 @@ jobs:
--skip-existing \
/tmp/wheels/tensordict_nightly-*.whl \
--verbose
upload-wheel-m1:
# Don't run on forked repos.
if: github.repository_owner == 'pytorch-labs'
needs: test-wheel-m1
runs-on: macos-m1-12
strategy:
matrix:
python_version: [["3.8", "3.8"], ["3.9", "3.9"], ["3.10", "3.10.3"], ["3.11", "3.11"]]
steps:
- name: Checkout tensordict
uses: actions/checkout@v2
- name: Download built wheels
uses: actions/download-artifact@v2
with:
name: tensordict-mac-${{ matrix.python_version[0] }}.whl
path: /tmp/wheels
- name: Push tensordict Binary to PYPI
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
python3 -mpip install twine
python3 -m twine upload \
--username __token__ \
--password "$PYPI_TOKEN" \
--skip-existing \
/tmp/wheels/tensordict_nightly-*.whl \
--verbose
test-wheel-linux:
# Don't run on forked repos.
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,38 @@ jobs:
name: tensordict-batch.whl
path: dist/*.whl

build-wheel-m1:
runs-on: macos-m1-12
strategy:
matrix:
python_version: [["3.8", "3.8"], ["3.9", "3.9"], ["3.10", "3.10.3"], ["3.11", "3.11"]]
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version[1] }}
architecture: x64
- name: Checkout tensordict
uses: actions/checkout@v2
- name: Install PyTorch RC
run: |
python3 -mpip install torch --extra-index-url https://download.pytorch.org/whl/cpu
- name: Build wheel
run: |
export CC=clang CXX=clang++
python3 -mpip install wheel
BUILD_VERSION=0.1.3 python3 setup.py bdist_wheel
- name: Upload wheel for the test-wheel job
uses: actions/upload-artifact@v2
with:
name: tensordict-mac-${{ matrix.python_version[0] }}.whl
path: dist/tensordict-*.whl
- name: Upload wheel for download
uses: actions/upload-artifact@v2
with:
name: tensordict-batch.whl
path: dist/*.whl

build-wheel-windows:
runs-on: windows-latest
strategy:
Expand Down

0 comments on commit 9ef5c7d

Please sign in to comment.