|
67 | 67 | name: torchrl-linux-${{ matrix.python_version[0] }}_${{ matrix.cuda_support[2] }}.whl |
68 | 68 | path: dist/*.whl |
69 | 69 |
|
70 | | - build-wheel-mac: |
71 | | - # Don't run on forked repos. |
72 | | - if: github.repository_owner == 'pytorch' |
73 | | - runs-on: macos-latest |
74 | | - strategy: |
75 | | - matrix: |
76 | | - python_version: [["3.8", "3.8"], ["3.9", "3.9"], ["3.10", "3.10.3"], ["3.11", "3.11"]] |
77 | | - steps: |
78 | | - - name: Setup Python |
79 | | - uses: actions/setup-python@v2 |
80 | | - with: |
81 | | - python-version: ${{ matrix.python_version[1] }} |
82 | | - architecture: x64 |
83 | | - - name: Checkout torchrl |
84 | | - uses: actions/checkout@v2 |
85 | | - - name: Install PyTorch nightly |
86 | | - run: | |
87 | | - python3 -mpip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu -U |
88 | | - - name: Build TorchRL Nightly |
89 | | - run: | |
90 | | - export CC=clang CXX=clang++ |
91 | | - python3 -mpip install wheel |
92 | | - python3 -mpip install ninja |
93 | | - python3 setup.py bdist_wheel \ |
94 | | - --package_name torchrl-nightly |
95 | | - - name: Upload wheel for the test-wheel job |
96 | | - uses: actions/upload-artifact@v2 |
97 | | - with: |
98 | | - name: torchrl-mac-${{ matrix.python_version[0] }}.whl |
99 | | - path: dist/*.whl |
100 | | - |
101 | | - test-wheel-mac: |
102 | | - # Don't run on forked repos. |
103 | | - if: github.repository_owner == 'pytorch' |
104 | | - needs: build-wheel-mac |
105 | | - runs-on: macos-latest |
106 | | - strategy: |
107 | | - matrix: |
108 | | - python_version: [["3.8", "3.8"], ["3.9", "3.9"], ["3.10", "3.10.3"], ["3.11", "3.11"]] |
109 | | - steps: |
110 | | - - name: Setup Python |
111 | | - uses: actions/setup-python@v2 |
112 | | - with: |
113 | | - python-version: ${{ matrix.python_version[1] }} |
114 | | - architecture: x64 |
115 | | - - name: Checkout torchrl |
116 | | - uses: actions/checkout@v2 |
117 | | - - name: Install PyTorch Nightly |
118 | | - run: | |
119 | | - python3 -mpip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu -U |
120 | | - - name: Upgrade pip |
121 | | - run: | |
122 | | - python3 -mpip install --upgrade pip |
123 | | - - name: Install test dependencies |
124 | | - run: | |
125 | | - python3 -mpip install numpy pytest --no-cache-dir |
126 | | - - name: Install tensordict |
127 | | - run: | |
128 | | - python3 -mpip install git+https://github.com/pytorch/tensordict.git |
129 | | - - name: Download built wheels |
130 | | - uses: actions/download-artifact@v2 |
131 | | - with: |
132 | | - name: torchrl-mac-${{ matrix.python_version[0] }}.whl |
133 | | - path: /tmp/wheels |
134 | | - - name: Install built wheels |
135 | | - run: | |
136 | | - python3 -mpip install /tmp/wheels/* |
137 | | - - name: Log version string |
138 | | - run: | |
139 | | - # Avoid ambiguity of "import torchrl" by deleting the source files. |
140 | | - rm -rf torchrl/ |
141 | | - python3 -c "import torchrl; print(torchrl.__version__)" |
142 | | - - name: Run tests |
143 | | - run: | |
144 | | - set -e |
145 | | - export IN_CI=1 |
146 | | - mkdir test-reports |
147 | | - python -m torch.utils.collect_env |
148 | | - python -c "import torchrl; print(torchrl.__version__);from torchrl.data import ReplayBuffer" |
149 | | - EXIT_STATUS=0 |
150 | | - pytest test/smoke_test.py -v --durations 200 |
151 | | - exit $EXIT_STATUS |
152 | | -
|
153 | 70 | upload-wheel-linux: |
154 | 71 | # Don't run on forked repos. |
155 | 72 | if: github.repository_owner == 'pytorch' |
@@ -181,34 +98,6 @@ jobs: |
181 | 98 | /tmp/wheels/torchrl_nightly-*.whl \ |
182 | 99 | --verbose |
183 | 100 |
|
184 | | - upload-wheel-mac: |
185 | | - # Don't run on forked repos. |
186 | | - if: github.repository_owner == 'pytorch' |
187 | | - needs: test-wheel-mac |
188 | | - runs-on: macos-latest |
189 | | - strategy: |
190 | | - matrix: |
191 | | - python_version: [["3.8", "3.8"], ["3.9", "3.9"], ["3.10", "3.10.3"], ["3.11", "3.11"]] |
192 | | - steps: |
193 | | - - name: Checkout torchrl |
194 | | - uses: actions/checkout@v2 |
195 | | - - name: Download built wheels |
196 | | - uses: actions/download-artifact@v2 |
197 | | - with: |
198 | | - name: torchrl-mac-${{ matrix.python_version[0] }}.whl |
199 | | - path: /tmp/wheels |
200 | | - - name: Push TorchRL Binary to PYPI |
201 | | - env: |
202 | | - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} |
203 | | - run: | |
204 | | - python3 -mpip install twine |
205 | | - python3 -m twine upload \ |
206 | | - --username __token__ \ |
207 | | - --password "$PYPI_TOKEN" \ |
208 | | - --skip-existing \ |
209 | | - /tmp/wheels/torchrl_nightly-*.whl \ |
210 | | - --verbose |
211 | | -
|
212 | 101 | test-wheel-linux: |
213 | 102 | # Don't run on forked repos. |
214 | 103 | if: github.repository_owner == 'pytorch' |
|
0 commit comments