Commit bc9451e6 authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Remove build doc job from CCI (#3293)

Summary:
https://github.com/pytorch/audio/pull/3292 migrates the doc deployment to GHA.

Pull Request resolved: https://github.com/pytorch/audio/pull/3293

Reviewed By: xiaohui-zhang

Differential Revision: D45527256

Pulled By: mthrok

fbshipit-source-id: 18eb2580243b6b842147caaac10b3d28aa3d6dd0
parent 171a65d3
#!/usr/bin/env bash
set -ex
if [ "$2" == "" ]; then
echo call as "$0" "<src>" "<target branch>"
echo where src is the root of the built documentation git checkout and
echo branch should be "main" or "1.7" or so
exit 1
fi
src=$1
target=$2
echo "committing docs from ${src} to ${target}"
pushd "${src}"
git checkout gh-pages
mkdir -p ./"${target}"
rm -rf ./"${target}"/*
cp -r "${src}/docs/build/html/"* ./"$target"
rm ./"$target"/artifact.tar.gz
if [ "${target}" == "main" ]; then
mkdir -p ./_static
rm -rf ./_static/*
cp -r "${src}/docs/build/html/_static/"* ./_static
git add --all ./_static || true
fi
git add --all ./"${target}" || true
git config user.email "soumith+bot@pytorch.org"
git config user.name "pytorchbot"
# If there aren't changes, don't make a commit; push is no-op
git commit -m "auto-generating sphinx docs" || true
git remote add https https://github.com/pytorch/audio.git
git push -u https gh-pages
#!/usr/bin/env bash
set -ex
if [[ -z "$PYTORCH_VERSION" ]]; then
# Nightly build
pip install --progress-bar off --pre torch -f "https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html"
else
# Release branch
pip install --progress-bar off "torch==${PYTORCH_VERSION}+cpu" \
-f https://download.pytorch.org/whl/torch_stable.html \
-f "https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/torch_${UPLOAD_CHANNEL}.html"
fi
pip install --progress-bar off --no-deps ~/workspace/torchaudio*
pip install --progress-bar off -r docs/requirements.txt -r docs/requirements-tutorials.txt
......@@ -790,76 +790,6 @@ jobs:
name: Run style check
command: .circleci/unittest/linux/scripts/run_style_checks.sh
build_docs:
<<: *smoke_test_common
resource_class: 2xlarge+
steps:
- attach_workspace:
at: ~/workspace
- checkout
- designate_upload_channel
- load_conda_channel_flags
- run:
name: Install packages
command: |
set -x
source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION}
conda install -v -y -c pytorch-${UPLOAD_CHANNEL} -c nvidia pytorch pytorch-cuda=${CU_VERSION:2:2}.${CU_VERSION:4}
conda install -v -y -c file://$HOME/workspace/conda-bld torchaudio
# gxx_linux-64 is for installing pesq library that depends on cython
conda install -y pandoc 'ffmpeg<5' gxx_linux-64 git make
conda install -y -c conda-forge doxygen
pip install --progress-bar off flashlight-text git+https://github.com/kpu/kenlm -r docs/requirements.txt -r docs/requirements-tutorials.txt
- run:
name: Build docs
command: |
source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION}
cd docs
make 'SPHINXOPTS=-W' html
cd build
tar -czf artifact.tar.gz html
mv artifact.tar.gz html
environment:
BUILD_GALLERY: 1
TORCH_SHOW_CPP_STACKTRACES: 1
no_output_timeout: 60m
- persist_to_workspace:
root: ./
paths:
- "*"
- store_artifacts:
path: ./docs/build/html
destination: docs
upload_docs:
<<: *binary_common
docker:
- image: "pytorch/manylinux-cuda100"
resource_class: 2xlarge+
steps:
- attach_workspace:
at: ~/workspace
- run:
name: Generate netrc
command: |
# set credentials for https pushing
# requires the org-member context
cat > ~/.netrc \<<DONE
machine github.com
login pytorchbot
password ${GITHUB_PYTORCHBOT_TOKEN}
DONE
- run:
name: Upload docs
command: |
# Don't use "checkout" step since it uses ssh, which cannot git push
# https://circleci.com/docs/2.0/configuration-reference/#checkout
set -ex
# turn v1.12.0rc3 into 1.12.0
tag=$(echo $CIRCLE_TAG | sed -e 's/v*\([0-9.]*\).*/\1/')
target=${tag:-main}
~/workspace/.circleci/build_docs/commit_docs.sh ~/workspace $target
docstring_parameters_sync:
<<: *binary_common
docker:
......@@ -881,16 +811,6 @@ workflows:
- circleci_consistency
- download_third_parties:
name: download_third_parties
- build_ffmpeg_linux:
name: build_ffmpeg_linux
python_version: foo
requires:
- download_third_parties
- build_ffmpeg_macos:
name: build_ffmpeg_macos
python_version: foo
requires:
- download_third_parties
- build_ffmpeg_windows:
name: build_ffmpeg_windows
python_version: foo
......@@ -1100,19 +1020,6 @@ workflows:
python_version: '3.11'
requires:
- binary_windows_wheel_py3.11_cu121
- binary_linux_conda:
conda_docker_image: pytorch/conda-builder:cuda117
cuda_version: cu117
name: binary_linux_conda_py3.8_cu117
python_version: '3.8'
requires:
- build_ffmpeg_linux
- smoke_test_linux_conda_gpu:
cuda_version: cu117
name: binary_linux_conda_py3.8_cu117_smoke_test_conda
python_version: '3.8'
requires:
- binary_linux_conda_py3.8_cu117
- binary_windows_conda:
conda_docker_image: pytorch/conda-builder:cpu
cuda_version: cpu
......@@ -1321,30 +1228,6 @@ workflows:
python_version: '3.11'
requires:
- binary_windows_conda_py3.11_cu121
- build_docs:
cuda_version: cu117
filters:
branches:
only:
- /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: build_docs
python_version: '3.8'
requires:
- binary_linux_conda_py3.8_cu117
- upload_docs:
context: org-member
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: upload_docs
python_version: '3.8'
requires:
- build_docs
unittest:
jobs:
- download_third_parties:
......@@ -1409,28 +1292,6 @@ workflows:
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: download_third_parties
- build_ffmpeg_linux:
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: build_ffmpeg_linux
python_version: foo
requires:
- download_third_parties
- build_ffmpeg_macos:
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: build_ffmpeg_macos
python_version: foo
requires:
- download_third_parties
- build_ffmpeg_windows:
filters:
branches:
......@@ -2030,31 +1891,6 @@ workflows:
python_version: '3.11'
requires:
- nightly_binary_windows_wheel_py3.11_cu121
- binary_linux_conda:
conda_docker_image: pytorch/conda-builder:cuda117
cuda_version: cu117
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_linux_conda_py3.8_cu117
python_version: '3.8'
requires:
- build_ffmpeg_linux
- smoke_test_linux_conda_gpu:
cuda_version: cu117
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_linux_conda_py3.8_cu117_smoke_test_conda
python_version: '3.8'
requires:
- nightly_binary_linux_conda_py3.8_cu117
- binary_windows_conda:
conda_docker_image: pytorch/conda-builder:cpu
cuda_version: cpu
......
......@@ -790,76 +790,6 @@ jobs:
name: Run style check
command: .circleci/unittest/linux/scripts/run_style_checks.sh
build_docs:
<<: *smoke_test_common
resource_class: 2xlarge+
steps:
- attach_workspace:
at: ~/workspace
- checkout
- designate_upload_channel
- load_conda_channel_flags
- run:
name: Install packages
command: |
set -x
source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION}
conda install -v -y -c pytorch-${UPLOAD_CHANNEL} -c nvidia pytorch pytorch-cuda=${CU_VERSION:2:2}.${CU_VERSION:4}
conda install -v -y -c file://$HOME/workspace/conda-bld torchaudio
# gxx_linux-64 is for installing pesq library that depends on cython
conda install -y pandoc 'ffmpeg<5' gxx_linux-64 git make
conda install -y -c conda-forge doxygen
pip install --progress-bar off flashlight-text git+https://github.com/kpu/kenlm -r docs/requirements.txt -r docs/requirements-tutorials.txt
- run:
name: Build docs
command: |
source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION}
cd docs
make 'SPHINXOPTS=-W' html
cd build
tar -czf artifact.tar.gz html
mv artifact.tar.gz html
environment:
BUILD_GALLERY: 1
TORCH_SHOW_CPP_STACKTRACES: 1
no_output_timeout: 60m
- persist_to_workspace:
root: ./
paths:
- "*"
- store_artifacts:
path: ./docs/build/html
destination: docs
upload_docs:
<<: *binary_common
docker:
- image: "pytorch/manylinux-cuda100"
resource_class: 2xlarge+
steps:
- attach_workspace:
at: ~/workspace
- run:
name: Generate netrc
command: |
# set credentials for https pushing
# requires the org-member context
cat > ~/.netrc \<<DONE
machine github.com
login pytorchbot
password ${GITHUB_PYTORCHBOT_TOKEN}
DONE
- run:
name: Upload docs
command: |
# Don't use "checkout" step since it uses ssh, which cannot git push
# https://circleci.com/docs/2.0/configuration-reference/#checkout
set -ex
# turn v1.12.0rc3 into 1.12.0
tag=$(echo $CIRCLE_TAG | sed -e 's/v*\([0-9.]*\).*/\1/')
target=${tag:-main}
~/workspace/.circleci/build_docs/commit_docs.sh ~/workspace $target
docstring_parameters_sync:
<<: *binary_common
docker:
......
......@@ -23,54 +23,21 @@ from jinja2 import select_autoescape
PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11"]
CU_VERSIONS_DICT = {
"linux": ["cpu", "cu117", "cu118", "cu121", "rocm5.2", "rocm5.3"],
"windows": ["cpu", "cu117", "cu118", "cu121"],
"macos": ["cpu"],
}
DOC_VERSION = ("linux", "3.8")
def build_workflows(prefix="", upload=False, filter_branch=None, indentation=6):
w = []
w += build_download_job(filter_branch)
for os_type in ["linux", "macos", "windows"]:
for os_type in ["windows"]:
w += build_ffmpeg_job(os_type, filter_branch)
for btype in ["wheel", "conda"]:
for os_type in ["linux", "macos", "windows"]:
for python_version in PYTHON_VERSIONS:
for cu_version in CU_VERSIONS_DICT[os_type]:
fb = filter_branch
if (
(cu_version.startswith("rocm") and btype == "conda")
or (os_type == "linux" and btype == "wheel")
or (
os_type == "linux"
and btype == "conda"
and (python_version != "3.8" or cu_version != "cu117")
)
or os_type == "macos"
):
continue
if not fb and (
os_type == "linux" and btype == "wheel" and python_version == "3.8" and cu_version == "cpu"
):
# the fields must match the build_docs "requires" dependency
fb = "/.*/"
if os_type == "linux" and btype == "conda" and python_version == "3.8" and cu_version == "cu117":
w += build_workflow_pair(btype, os_type, python_version, cu_version, fb, prefix, False)
continue
w += build_workflow_pair(btype, os_type, python_version, cu_version, fb, prefix, upload)
if not filter_branch:
# Build on every pull request, but upload only on nightly and tags
w += build_doc_job("/.*/")
w += upload_doc_job("nightly")
return indent(indentation, w)
......@@ -116,36 +83,6 @@ def build_workflow_pair(btype, os_type, python_version, cu_version, filter_branc
return w
def build_doc_job(filter_branch):
job = {
"name": "build_docs",
"python_version": "3.8",
"cuda_version": "cu117",
"requires": [
"binary_linux_conda_py3.8_cu117",
],
}
if filter_branch:
job["filters"] = gen_filter_branch_tree(filter_branch)
return [{"build_docs": job}]
def upload_doc_job(filter_branch):
job = {
"name": "upload_docs",
"context": "org-member",
"python_version": "3.8",
"requires": [
"build_docs",
],
}
if filter_branch:
job["filters"] = gen_filter_branch_tree(filter_branch)
return [{"upload_docs": job}]
def docstring_parameters_sync_job(filter_branch):
job = {
"name": "docstring_parameters_sync",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment