Unverified Commit e3b11a8e authored by moto's avatar moto Committed by GitHub
Browse files

Clean up build doc CI job (#3635)

parent df44d300
name: Build documentation name: Build documentation
# Documentation is deployed in the following ways
# 1. Each time a commit is pushed to main branch
# 2. Nightly (so that docs are updated even when there is no commit to main branch on the day)
# 3. Manual trigger for release
# Because release requires changing the version number, which is used as a directory name,
# automating release doc deployment is tricky.
# There is no reliable way to know if there should have been a minor version bump.
#
on: on:
pull_request: pull_request:
push: push:
branches: branches:
- main - main
- release/*
tags:
- v[0-9]+.[0-9]+.[0-9]
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
workflow_dispatch: workflow_dispatch:
schedule: schedule:
- cron: '0 0 * * *' - cron: '0 0 * * *'
jobs: jobs:
build: build:
strategy: # Do not use matrix here to parameterize Python/CUDA versions.
matrix: # This job is required to pass for each PR.
python_version: ["3.10"] # The name of the required job is sensitive to matrix parameter.
cuda_arch_version: ["11.8"]
fail-fast: false
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with: with:
job-name: Build doc job-name: Build doc
runner: linux.g5.4xlarge.nvidia.gpu runner: linux.g5.4xlarge.nvidia.gpu
repository: pytorch/audio repository: pytorch/audio
gpu-arch-type: cuda gpu-arch-type: cuda
gpu-arch-version: ${{ matrix.cuda_arch_version }} gpu-arch-version: "11.8"
timeout: 120 timeout: 120
upload-artifact: docs upload-artifact: docs
script: | script: |
set -ex set -ex
# Set up Environment Variables # Set up Environment Variables
export PYTHON_VERSION="${{ matrix.python_version }}" export PYTHON_VERSION="3.10"
export CU_VERSION="${{ matrix.cuda_arch_version }}" export CU_VERSION="11.8"
export CUDATOOLKIT="pytorch-cuda=${CU_VERSION}" export CUDATOOLKIT="pytorch-cuda=${CU_VERSION}"
# Set CHANNEL # Set CHANNEL
...@@ -91,7 +93,7 @@ jobs: ...@@ -91,7 +93,7 @@ jobs:
mv docs/build/html /artifacts/ mv docs/build/html /artifacts/
commit-main: commit-main:
if: ${{ (github.repository == 'pytorch/audio') && (github.ref_name == 'main') }} if: github.ref_name == 'main'
permissions: permissions:
# Required for `git push` # Required for `git push`
# Note: # Note:
......
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