fbcode/libspdl/cuda/storage.cpp (#1603) #3828
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Docs" | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths-ignore: | |
| - "tests/**" | |
| - "third_party/**" | |
| - "*.md" | |
| branches: | |
| - main | |
| push: | |
| paths-ignore: | |
| - "tests/**" | |
| - "third_party/**" | |
| - "*.md" | |
| branches: | |
| - main | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| python-version: "3.12" | |
| channels: conda-forge | |
| conda-remove-defaults: "true" | |
| - name: Build docs | |
| run: | | |
| set -x | |
| conda install -q -y pip | |
| wget -qO- https://astral.sh/uv/install.sh | sh | |
| uv pip install . -v | |
| conda install -q 'ffmpeg==8' doxygen | |
| pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu | |
| export "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CONDA_PREFIX}/lib:${cuda_dir}/lib:${cuda_dir}/lib64" | |
| pip install tensorboard psutil -r docs/requirements.txt | |
| python -c 'import logging;logging.basicConfig(level=logging.DEBUG);from spdl.io.lib import _libspdl_cuda;_libspdl_cuda.CUDABuffer' | |
| python -c 'import logging;logging.basicConfig(level=logging.DEBUG);import spdl.io;print(spdl.io.CUDABuffer.__doc__);' | |
| echo "=== which/where ===" | |
| which python python3 pip | |
| python -c "import sys; print('exe=', sys.executable); print('prefix=', sys.prefix); print('path=', sys.path)" | |
| python3 -c "import sys; print('exe=', sys.executable); print('prefix=', sys.prefix); print('path=', sys.path)" | |
| echo "=== conda env ===" | |
| echo "CONDA_PREFIX=$CONDA_PREFIX" | |
| echo "CONDA_DEFAULT_ENV=$CONDA_DEFAULT_ENV" | |
| ls -ld /usr/share/miniconda /usr/share/miniconda/envs /usr/share/miniconda/envs/test 2>/dev/null | |
| ls -ld /usr/share/miniconda/envs/test/lib/python*/site-packages 2>/dev/null | |
| echo "=== pip view ===" | |
| pip -V | |
| pip config list -v | |
| python -m pip show pygments || true | |
| python3 -m pip show pygments || true | |
| ./docs/build.sh | |
| mkdir upload | |
| mv docs/_build upload/_site | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs | |
| path: upload | |
| if-no-files-found: error | |
| retention-days: 1 | |
| overwrite: true | |
| deploy: | |
| permissions: | |
| # Required for `git push` | |
| # Note: | |
| # This is not effective from fork. | |
| # When you debug this, make sure to make a branch on the upstream, and | |
| # make PR from there. | |
| contents: write | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| ref: gh-pages | |
| fetch-depth: 5 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: docs | |
| - name: Update main doc | |
| run: | | |
| set -x | |
| ls -alh | |
| rm -rf main | |
| mv _site main | |
| git add --all main || true | |
| git config user.name "ci" | |
| git config user.email "noreply@meta.com" | |
| git commit --amend -m "Update docs" || true | |
| git push -f |