From 51ca59fe51b91befce1c217caa827211bda11b9c Mon Sep 17 00:00:00 2001 From: Vincent Moens Date: Thu, 19 Dec 2024 08:47:52 +0000 Subject: [PATCH] [CI] Fix nightly build ghstack-source-id: 9d59c1d07fed0aa2d40e0b46d6e19ca4df6d56a5 Pull Request resolved: https://github.com/pytorch/tensordict/pull/1148 --- .github/workflows/nightly_build.yml | 54 ++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/.github/workflows/nightly_build.yml b/.github/workflows/nightly_build.yml index 8ce894077..bab1a87a6 100644 --- a/.github/workflows/nightly_build.yml +++ b/.github/workflows/nightly_build.yml @@ -27,10 +27,6 @@ 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: @@ -46,10 +42,14 @@ jobs: ["3.12", "cp312-cp312"], ] cuda_support: [["", "cpu", "cpu"]] + 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 container: pytorch/manylinux-${{ matrix.cuda_support[2] }} 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" @@ -71,7 +71,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 @@ -90,12 +90,16 @@ jobs: ["3.12", "cp312-cp312"], ] cuda_support: [["", "cpu", "cpu"]] + 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 container: pytorch/manylinux-${{ matrix.cuda_support[2] }} 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 @@ -117,6 +121,10 @@ jobs: if: github.repository_owner == 'pytorch' needs: build-wheel-linux runs-on: ubuntu-20.04 + 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 strategy: matrix: python_version: [ @@ -128,14 +136,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" @@ -149,7 +157,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 @@ -189,13 +197,17 @@ jobs: ["3.11", "3.11"], ["3.12", "3.12"], ] + 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 steps: - name: Setup Python uses: actions/setup-python@v2 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: | @@ -209,7 +221,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 @@ -227,13 +239,17 @@ jobs: ["3.11", "3.11"], ["3.12", "3.12"], ] + 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 steps: - name: Setup Python uses: actions/setup-python@v2 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: | @@ -247,7 +263,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 @@ -286,11 +302,15 @@ jobs: ["3.11", "3.11"], ["3.12", "3.12"], ] + 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 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