Skip to content

Commit

Permalink
[CI] Fix nightly build
Browse files Browse the repository at this point in the history
ghstack-source-id: ea31d3d29ae26c2edba8515f91366e0239bf656f
Pull Request resolved: #1148
  • Loading branch information
vmoens committed Dec 19, 2024
1 parent b061b61 commit 5cc4647
Showing 1 changed file with 17 additions and 21 deletions.
38 changes: 17 additions & 21 deletions .github/workflows/nightly_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,12 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && format('ci-master-{0}', github.sha) || format('ci-{0}', github.ref) }}
cancel-in-progress: true

env:
ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true # https://github.com/actions/checkout/issues/1809

jobs:
build-wheel-linux:
# Don't run on forked repos.
if: github.repository_owner == 'pytorch'
runs-on: ubuntu-20.04
runs-on: centos
strategy:
matrix:
python_version: [
Expand All @@ -46,10 +42,10 @@ jobs:
["3.12", "cp312-cp312"],
]
cuda_support: [["", "cpu", "cpu"]]
container: pytorch/manylinux-${{ matrix.cuda_support[2] }}
container: pytorch/almalinux-builder
steps:
- name: Checkout tensordict
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install PyTorch nightly
run: |
export PATH="/opt/python/${{ matrix.python_version[1] }}/bin:$PATH"
Expand All @@ -71,7 +67,7 @@ jobs:
python3 -mpip install auditwheel
auditwheel show dist/*
- name: Upload wheel for the test-wheel job
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: tensordict-linux-${{ matrix.python_version[0] }}_${{ matrix.cuda_support[2] }}.whl
path: dist/*.whl
Expand All @@ -80,7 +76,7 @@ jobs:
# Don't run on forked repos.
if: github.repository_owner == 'pytorch'
needs: test-wheel-linux
runs-on: ubuntu-20.04
runs-on: centos
strategy:
matrix:
python_version: [
Expand All @@ -90,12 +86,12 @@ jobs:
["3.12", "cp312-cp312"],
]
cuda_support: [["", "cpu", "cpu"]]
container: pytorch/manylinux-${{ matrix.cuda_support[2] }}
container: pytorch/almalinux-builder
steps:
- name: Checkout tensordict
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Download built wheels
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: tensordict-linux-${{ matrix.python_version[0] }}_${{ matrix.cuda_support[2] }}.whl
path: /tmp/wheels
Expand Down Expand Up @@ -128,14 +124,14 @@ jobs:
cuda_support: [["", "cpu", "cpu"]]
steps:
- name: Setup Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version[0] }}
architecture: x64
env:
AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache"
- name: Checkout tensordict
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install PyTorch Nightly
run: |
export PATH="/opt/python/${{ matrix.python_version[1] }}/bin:$PATH"
Expand All @@ -149,7 +145,7 @@ jobs:
export PATH="/opt/python/${{ matrix.python_version[1] }}/bin:$PATH"
python3 -mpip install numpy pytest pillow>=4.1.1 scipy networkx expecttest pyyaml
- name: Download built wheels
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: tensordict-linux-${{ matrix.python_version[0] }}_${{ matrix.cuda_support[2] }}.whl
path: /tmp/wheels
Expand Down Expand Up @@ -195,7 +191,7 @@ jobs:
with:
python-version: ${{ matrix.python_version[1] }}
- name: Checkout tensordict
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install PyTorch nightly
shell: bash
run: |
Expand All @@ -209,7 +205,7 @@ jobs:
--package_name tensordict-nightly \
--python-tag=${{ matrix.python-tag }}
- name: Upload wheel for the test-wheel job
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: tensordict-win-${{ matrix.python_version[0] }}.whl
path: dist/*.whl
Expand All @@ -233,7 +229,7 @@ jobs:
with:
python-version: ${{ matrix.python_version[1] }}
- name: Checkout tensordict
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install PyTorch Nightly
shell: bash
run: |
Expand All @@ -247,7 +243,7 @@ jobs:
run: |
python3 -mpip install numpy pytest --no-cache-dir
- name: Download built wheels
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: tensordict-win-${{ matrix.python_version[0] }}.whl
path: wheels
Expand Down Expand Up @@ -288,9 +284,9 @@ jobs:
]
steps:
- name: Checkout tensordict
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Download built wheels
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: tensordict-win-${{ matrix.python_version[0] }}.whl
path: wheels
Expand Down

0 comments on commit 5cc4647

Please sign in to comment.