Skip to content

Commit ee0e436

Browse files
committed
Merge branch 'alt-gpu-test-workflow' into remove_ffmpeg_workflow
2 parents a267af6 + 84400db commit ee0e436

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+533
-555
lines changed

.github/workflows/build_docs.yml

Lines changed: 0 additions & 173 deletions
This file was deleted.

.github/workflows/docs.yaml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Docs
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- nightly
8+
- main
9+
- release/*
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
strategy:
15+
matrix:
16+
python-version: ["3.11"]
17+
cuda-version: ["12.6"]
18+
ffmpeg-version: ["7"]
19+
fail-fast: false
20+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
21+
permissions:
22+
id-token: write
23+
contents: read
24+
with:
25+
runner: linux.4xlarge.nvidia.gpu
26+
repository: pytorch/audio
27+
gpu-arch-type: cuda
28+
gpu-arch-version: ${{ matrix.cuda-version }}
29+
timeout: 120
30+
job-name: docs
31+
32+
script: |
33+
set -ex
34+
# Set up Environment Variables
35+
export PYTHON_VERSION="${{ matrix.python-version }}"
36+
export FFMPEG_VERSION="${{ matrix.ffmpeg-version }}"
37+
export CU_VERSION_WITHOUT_PERIODS="$(echo "${{ matrix.cuda-version }}" | sed 's/\.//g')"
38+
export PIP_PROGRESS_BAR=off
39+
export CONDA_QUIET=1
40+
41+
# Set UPLOAD_CHANNEL
42+
if [[(${GITHUB_EVENT_NAME} = 'pull_request' && (${GITHUB_BASE_REF} = 'release'*)) || (${GITHUB_REF} = 'refs/heads/release'*) ]]; then
43+
export UPLOAD_CHANNEL=test
44+
else
45+
export UPLOAD_CHANNEL=nightly
46+
fi
47+
48+
echo "::group::Create conda env"
49+
# Mark Build Directory Safe
50+
git config --global --add safe.directory /__w/audio/audio
51+
conda create -c conda-forge --strict-channel-priority -y --prefix ci_env python="${PYTHON_VERSION}" ffmpeg="${FFMPEG_VERSION}" cmake ninja
52+
conda activate ./ci_env
53+
conda info
54+
python -m pip install --upgrade pip
55+
echo "::endgroup::"
56+
57+
echo "::group::Install PyTorch and TorchCodec"
58+
PYTORCH_WHEEL_INDEX="https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/cu${CU_VERSION_WITHOUT_PERIODS}"
59+
python -m pip install numpy
60+
python -m pip install --pre torch torchcodec --index-url="${PYTORCH_WHEEL_INDEX}"
61+
python -c 'import torch; print(f"{torch.__version__}"); print(f"{torch.__file__}"); print(f"{torch.cuda.is_available()=}")'
62+
echo "::endgroup::"
63+
64+
echo "::group::Build and install TorchAudio"
65+
python -m pip install . -v --no-build-isolation
66+
echo "::endgroup::"
67+
68+
echo "::group::Install TorchAudio documentation build requirements"
69+
python -m pip install -r docs/requirements.txt -r docs/requirements-tutorials.txt
70+
echo "::endgroup::"
71+
72+
echo "::group::Build TorchAudio documentation"
73+
export BUILD_GALLERY=true
74+
(cd docs && make html)
75+
echo "::endgroup::"
76+
77+
echo "::group::Copy artifacts"
78+
cp -rf docs/build/html/* "${RUNNER_DOCS_DIR}"
79+
mv docs/build/html /artifacts/
80+
echo "::endgroup::"

.github/workflows/lint.yml

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
1-
# name: Lint
1+
name: Lint
22

3-
# on:
4-
# pull_request:
5-
# push:
6-
# branches:
7-
# - nightly
8-
# - main
9-
# - release/*
10-
# workflow_dispatch:
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
117

12-
# jobs:
13-
# python-source-and-configs:
14-
# uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
15-
# permissions:
16-
# id-token: write
17-
# contents: read
18-
# with:
19-
# repository: pytorch/audio
20-
# script: |
21-
# set -euo pipefail
8+
concurrency:
9+
group: unit-test${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }}
10+
cancel-in-progress: true
2211

23-
# echo '::group::Setup environment'
24-
# eval "$("$(which conda)" shell.bash hook)"
25-
# # libcst does not have 3.11 pre-built binaries yet. Use python 3.10
26-
# conda create -y --name env python=3.10
27-
# conda activate env
28-
# pip3 install --progress-bar=off pre-commit
29-
# echo '::endgroup::'
12+
defaults:
13+
run:
14+
shell: bash -l -eo pipefail {0}
3015

31-
# set +e
32-
# pre-commit run --all-files --show-diff-on-failure
33-
# status=$?
34-
35-
# echo '::group::Add Summry'
36-
# if [ $status -ne 0 ]; then
37-
# echo '### Lint failure' >> $GITHUB_STEP_SUMMARY
38-
# echo '```diff' >> $GITHUB_STEP_SUMMARY
39-
# git --no-pager diff >> $GITHUB_STEP_SUMMARY
40-
# echo '```' >> $GITHUB_STEP_SUMMARY
41-
# fi
42-
# echo '::endgroup::'
43-
# exit $status
16+
jobs:
17+
pre-commit-checks:
18+
runs-on: ubuntu-latest
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
python-version: ['3.11']
23+
steps:
24+
- name: Check out repo
25+
uses: actions/checkout@v3
26+
- name: Setup conda env
27+
uses: conda-incubator/setup-miniconda@v2
28+
with:
29+
auto-update-conda: true
30+
miniconda-version: "latest"
31+
activate-environment: test
32+
python-version: ${{ matrix.python-version }}
33+
- name: Update pip
34+
run: python -m pip install --upgrade pip
35+
- name: Install pre-commit
36+
run: |
37+
python -m pip install pre-commit
38+
- name: Run pre-commit checks
39+
run: |
40+
pre-commit run --all-files
41+
- name: Check to see what files pre-commit modified
42+
run: |
43+
git diff

.github/workflows/pr-labels.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# name: pr-labels
1+
name: pr-labels
2+
3+
# This workflow is disabled and kept only for reference.
24

35
# on:
46
# push:

0 commit comments

Comments
 (0)