@@ -31,7 +31,7 @@ defaults:
3131env :
3232 FREEZE_REQUIREMENTS : " 1"
3333 TORCH_URL : " https://download.pytorch.org/whl/cpu/torch_stable.html"
34- PYPI_CACHE : " _pip-wheels"
34+ PYPI_CACHE_DIR : " _pip-wheels"
3535
3636jobs :
3737 make-doctest :
@@ -61,15 +61,16 @@ jobs:
6161 - name : pip wheels cache
6262 uses : actions/cache/restore@v3
6363 with :
64- path : ${{ env.PYPI_CACHE }}
64+ path : ${{ env.PYPI_CACHE_DIR }}
6565 key : pypi_wheels
6666
67- - name : Install package
67+ - name : Install package & dependencies
6868 run : |
69- ls -lh $PYPI_CACHE
70- mkdir -p pypi_pkgs
69+ mkdir -p $PYPI_CACHE_DIR # in case cache was not hit
70+ ls -lh $PYPI_CACHE_DIR
71+ mkdir -p pypi_pkgs # in case template is not pulled
7172 pip install .[extra,cloud,ui] -U -r requirements/${{ matrix.pkg-name }}/docs.txt \
72- -f pypi_pkgs/ -f $PYPI_CACHE -f ${TORCH_URL}
73+ -f pypi_pkgs/ -f $PYPI_CACHE_DIR -f ${TORCH_URL}
7374 pip list
7475
7576 - name : Test Documentation
@@ -108,16 +109,17 @@ jobs:
108109 - name : pip wheels cache
109110 uses : actions/cache/restore@v3
110111 with :
111- path : ${{ env.PYPI_CACHE }}
112+ path : ${{ env.PYPI_CACHE_DIR }}
112113 key : pypi_wheels
113114
114115 - name : Install package & dependencies
115116 run : |
116- ls -lh $PYPI_CACHE
117- mkdir -p pypi_pkgs
117+ mkdir -p $PYPI_CACHE_DIR # in case cache was not hit
118+ ls -lh $PYPI_CACHE_DIR
119+ mkdir -p pypi_pkgs # in case template is not pulled
118120 pip --version
119121 pip install . -U -r requirements/${{ matrix.pkg-name }}/docs.txt \
120- -f pypi_pkgs/ -f $PYPI_CACHE -f ${TORCH_URL}
122+ -f pypi_pkgs/ -f $PYPI_CACHE_DIR -f ${TORCH_URL}
121123 pip list
122124 shell : bash
123125
@@ -141,6 +143,14 @@ jobs:
141143 path : docs/build/html/
142144 retention-days : ${{ steps.keep-artifact.outputs.DAYS }}
143145
146+ - name : Dump handy wheels
147+ if : github.event_name == 'push' && github.ref == 'refs/heads/master'
148+ continue-on-error : true
149+ uses : ./.github/actions/pip-wheels
150+ with :
151+ wheel-dir : ${{ env.PYPI_CACHE_DIR }}
152+ torch-url : ${{ env.TORCH_URL }}
153+ cache-key : " pypi_wheels"
144154
145155 deploy-docs :
146156 needs : [make-doctest, make-html]
0 commit comments