"vscode:/vscode.git/clone" did not exist on "0703ce88008b2765ef6636c6e5cb013d227c42ca"
Unverified Commit 65cdaeab authored by Philip Meier's avatar Philip Meier Committed by GitHub
Browse files

cleanup CI config (#4983)



* [DIRTY] cleanup CI config

* remove pip install command

* fix syntax

* fix jobs

* fix syntax

* add support for editable install

* sync

* fix sudo apt install

* fix editable install

* sync

* try pip without user install

* [DIRTY] address review comments

* [DIRTY] try use dynamic name

* switch logic

* address remaining comments

* cleanup

* more cleanup

* fix enabling prototype tests

* Update .circleci/config.yml.in
Co-authored-by: default avatarNicolas Hug <contact@nicolas-hug.com>

* linebreak
Co-authored-by: default avatarNicolas Hug <contact@nicolas-hug.com>
parent 48b82c11
...@@ -99,6 +99,81 @@ commands: ...@@ -99,6 +99,81 @@ commands:
- brew_install: - brew_install:
formulae: libtool formulae: libtool
apt_install:
parameters:
args:
type: string
descr:
type: string
default: ""
update:
type: boolean
default: true
steps:
- run:
name: >
<<^ parameters.descr >> apt install << parameters.args >> <</ parameters.descr >>
<<# parameters.descr >> << parameters.descr >> <</ parameters.descr >>
command: |
<<# parameters.update >> sudo apt update -qy <</ parameters.update >>
sudo apt install << parameters.args >>
pip_install:
parameters:
args:
type: string
descr:
type: string
default: ""
user:
type: boolean
default: true
steps:
- run:
name: >
<<^ parameters.descr >> pip install << parameters.args >> <</ parameters.descr >>
<<# parameters.descr >> << parameters.descr >> <</ parameters.descr >>
command: >
pip install
<<# parameters.user >> --user <</ parameters.user >>
--progress-bar=off
<< parameters.args >>
install_torchvision:
parameters:
editable:
type: boolean
default: true
steps:
- pip_install:
args: --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
descr: Install PyTorch from nightly releases
- pip_install:
args: --no-build-isolation <<# parameters.editable >> --editable <</ parameters.editable >> .
descr: Install torchvision <<# parameters.editable >> in editable mode <</ parameters.editable >>
install_prototype_dependencies:
steps:
- pip_install:
args: iopath git+https://github.com/pytorch/data
descr: Install prototype dependencies
# Most of the test suite is handled by the `unittest` jobs, with completely different workflow and setup.
# This command can be used if only a selection of tests need to be run, for ad-hoc files.
run_tests_selective:
parameters:
file_or_dir:
type: string
steps:
- run:
name: Install test utilities
command: pip install --progress-bar=off pytest pytest-mock
- run:
name: Run tests
command: pytest --junitxml=test-results/junit.xml -v --durations 20 <<parameters.file_or_dir>>
- store_test_results:
path: test-results
binary_common: &binary_common binary_common: &binary_common
parameters: parameters:
# Edit these defaults to do a release # Edit these defaults to do a release
...@@ -171,107 +246,99 @@ jobs: ...@@ -171,107 +246,99 @@ jobs:
- image: circleci/python:3.7 - image: circleci/python:3.7
steps: steps:
- checkout - checkout
- pip_install:
args: jinja2 pyyaml
- run: - run:
name: Check CircleCI config consistency
command: | command: |
pip install --user --progress-bar off jinja2 pyyaml
python .circleci/regenerate.py python .circleci/regenerate.py
git diff --exit-code || (echo ".circleci/config.yml not in sync with config.yml.in! Run .circleci/regenerate.py to update config"; exit 1) git diff --exit-code || (echo ".circleci/config.yml not in sync with config.yml.in! Run .circleci/regenerate.py to update config"; exit 1)
python_lint: lint_python_and_config:
docker: docker:
- image: circleci/python:3.7 - image: circleci/python:3.7
steps: steps:
- checkout - checkout
- pip_install:
args: pre-commit
descr: Install lint utilities
- run: - run:
command: | name: Install pre-commit hooks
pip install --user --progress-bar off pre-commit command: pre-commit install-hooks
pre-commit install-hooks - run:
- run: pre-commit run --all-files name: Lint Python code and config files
command: pre-commit run --all-files
- run: - run:
name: Required lint modifications name: Required lint modifications
when: on_fail when: on_fail
command: git --no-pager diff command: git --no-pager diff
python_type_check: lint_c:
docker: docker:
- image: circleci/python:3.7 - image: circleci/python:3.7
steps: steps:
- apt_install:
args: libtinfo5
descr: Install additional system libraries
- checkout - checkout
- run: - run:
name: Install lint utilities
command: | command: |
sudo apt-get update -y curl https://oss-clang-format.s3.us-east-2.amazonaws.com/linux64/clang-format-linux64 -o clang-format
sudo apt install -y libturbojpeg-dev chmod +x clang-format
pip install --user --progress-bar off mypy sudo mv clang-format /opt/clang-format
pip install --user --progress-bar off types-requests
pip install --user --progress-bar off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
pip install --user --progress-bar off git+https://github.com/pytorch/data.git
pip install --user --progress-bar off --no-build-isolation --editable .
mypy --config-file mypy.ini
docstring_parameters_sync:
docker:
- image: circleci/python:3.7
steps:
- checkout
- run: - run:
command: | name: Lint C code
pip install --user pydocstyle command: ./.circleci/unittest/linux/scripts/run-clang-format.py -r torchvision/csrc --clang-format-executable /opt/clang-format
pydocstyle - run:
name: Required lint modifications
when: on_fail
command: git --no-pager diff
clang_format: type_check_python:
docker: docker:
- image: circleci/python:3.7 - image: circleci/python:3.7
steps: steps:
- apt_install:
args: libturbojpeg-dev
descr: Install additional system libraries
- checkout - checkout
- install_torchvision:
editable: true
- install_prototype_dependencies
- pip_install:
args: mypy
descr: Install Python type check utilities
- run: - run:
command: | name: Check Python types statically
sudo apt-get update -y command: mypy --config-file mypy.ini
sudo apt install -y libtinfo5
curl https://oss-clang-format.s3.us-east-2.amazonaws.com/linux64/clang-format-linux64 -o clang-format
chmod +x clang-format
sudo mv clang-format /opt/clang-format
./.circleci/unittest/linux/scripts/run-clang-format.py -r torchvision/csrc --clang-format-executable /opt/clang-format
torchhub_test: unittest_torchhub:
docker: docker:
- image: circleci/python:3.7 - image: circleci/python:3.7
steps: steps:
- checkout - checkout
- run: - install_torchvision
command: | - run_tests_selective:
pip install --user --progress-bar off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html file_or_dir: test/test_hub.py
# need to install torchvision dependencies due to transitive imports
pip install --user --progress-bar off --no-build-isolation .
pip install pytest
python test/test_hub.py
torch_onnx_test: unittest_onnx:
docker: docker:
- image: circleci/python:3.7 - image: circleci/python:3.7
steps: steps:
- checkout - checkout
- run: - install_torchvision
command: | - pip_install:
pip install --user --progress-bar off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html args: onnx onnxruntime
# need to install torchvision dependencies due to transitive imports descr: Install ONNX
pip install --user --progress-bar off --no-build-isolation . - run_tests_selective:
pip install --user onnx file_or_dir: test/test_onnx.py
pip install --user onnxruntime
pip install --user pytest unittest_prototype:
python test/test_onnx.py
prototype_test:
docker: docker:
- image: circleci/python:3.7 - image: circleci/python:3.7
resource_class: xlarge resource_class: xlarge
steps: steps:
- run:
name: Install torch
command: |
pip install --user --progress-bar=off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
- run:
name: Install prototype dependencies
command: pip install --user --progress-bar=off git+https://github.com/pytorch/data.git
- checkout - checkout
- run: - run:
name: Download model weights name: Download model weights
...@@ -281,19 +348,16 @@ jobs: ...@@ -281,19 +348,16 @@ jobs:
mkdir -p ~/.cache/torch/hub/checkpoints mkdir -p ~/.cache/torch/hub/checkpoints
python scripts/collect_model_urls.py torchvision/prototype/models \ python scripts/collect_model_urls.py torchvision/prototype/models \
| parallel -j0 'wget --no-verbose -O ~/.cache/torch/hub/checkpoints/`basename {}` {}\?source=ci' | parallel -j0 'wget --no-verbose -O ~/.cache/torch/hub/checkpoints/`basename {}` {}\?source=ci'
- install_torchvision
- install_prototype_dependencies
- pip_install:
args: scipy
descr: Install optional dependencies
- run: - run:
name: Install torchvision name: Enable prototype tests
command: pip install --user --progress-bar off --no-build-isolation . command: echo 'export PYTORCH_TEST_WITH_PROTOTYPE=1' >> $BASH_ENV
- run: - run_tests_selective:
name: Install test requirements file_or_dir: test/test_prototype_*.py
command: pip install --user --progress-bar=off pytest pytest-mock scipy iopath
- run:
name: Run tests
environment:
PYTORCH_TEST_WITH_PROTOTYPE: 1
command: pytest --junitxml=test-results/junit.xml -v --durations 20 test/test_prototype_*.py
- store_test_results:
path: test-results
binary_linux_wheel: binary_linux_wheel:
<<: *binary_common <<: *binary_common
...@@ -529,9 +593,10 @@ jobs: ...@@ -529,9 +593,10 @@ jobs:
at: ~/workspace at: ~/workspace
- designate_upload_channel - designate_upload_channel
- checkout - checkout
- pip_install:
args: awscli
- run: - run:
command: | command: |
pip install --user awscli
export PATH="$HOME/.local/bin:$PATH" export PATH="$HOME/.local/bin:$PATH"
# Prevent credential from leaking # Prevent credential from leaking
set +x set +x
...@@ -572,7 +637,8 @@ jobs: ...@@ -572,7 +637,8 @@ jobs:
command: | command: |
set -x set -x
source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION} source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION}
pip install $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html - pip_install:
args: $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html
- run: - run:
name: smoke test name: smoke test
command: | command: |
...@@ -641,7 +707,8 @@ jobs: ...@@ -641,7 +707,8 @@ jobs:
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda activate python${PYTHON_VERSION} conda activate python${PYTHON_VERSION}
pip install $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html - pip_install:
args: $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html
- run: - run:
name: smoke test name: smoke test
command: | command: |
...@@ -967,7 +1034,7 @@ jobs: ...@@ -967,7 +1034,7 @@ jobs:
eval "$(./conda/bin/conda shell.bash hook)" eval "$(./conda/bin/conda shell.bash hook)"
conda activate ./env conda activate ./env
pushd docs pushd docs
pip install -r requirements.txt pip install --progress-bar=off -r requirements.txt
make html make html
popd popd
- persist_to_workspace: - persist_to_workspace:
...@@ -1008,9 +1075,15 @@ jobs: ...@@ -1008,9 +1075,15 @@ jobs:
workflows: workflows:
build: lint:
jobs: jobs:
- circleci_consistency - circleci_consistency
- lint_python_and_config
- lint_c
- type_check_python
build:
jobs:
- binary_linux_wheel: - binary_linux_wheel:
conda_docker_image: pytorch/conda-builder:cpu conda_docker_image: pytorch/conda-builder:cpu
cu_version: cpu cu_version: cpu
...@@ -1515,13 +1588,6 @@ workflows: ...@@ -1515,13 +1588,6 @@ workflows:
python_version: '3.7' python_version: '3.7'
requires: requires:
- build_docs - build_docs
- python_lint
- python_type_check
- docstring_parameters_sync
- clang_format
- torchhub_test
- torch_onnx_test
- prototype_test
- binary_ios_build: - binary_ios_build:
build_environment: binary-libtorchvision_ops-ios-12.0.0-x86_64 build_environment: binary-libtorchvision_ops-ios-12.0.0-x86_64
ios_arch: x86_64 ios_arch: x86_64
...@@ -1538,6 +1604,9 @@ workflows: ...@@ -1538,6 +1604,9 @@ workflows:
unittest: unittest:
jobs: jobs:
- unittest_torchhub
- unittest_onnx
- unittest_prototype
- unittest_linux_cpu: - unittest_linux_cpu:
cu_version: cpu cu_version: cpu
name: unittest_linux_cpu_py3.6 name: unittest_linux_cpu_py3.6
...@@ -1675,14 +1744,6 @@ workflows: ...@@ -1675,14 +1744,6 @@ workflows:
nightly: nightly:
jobs: jobs:
- circleci_consistency
- python_lint
- python_type_check
- docstring_parameters_sync
- clang_format
- torchhub_test
- torch_onnx_test
- prototype_test
- binary_ios_build: - binary_ios_build:
build_environment: nightly-binary-libtorchvision_ops-ios-12.0.0-x86_64 build_environment: nightly-binary-libtorchvision_ops-ios-12.0.0-x86_64
filters: filters:
......
...@@ -99,6 +99,81 @@ commands: ...@@ -99,6 +99,81 @@ commands:
- brew_install: - brew_install:
formulae: libtool formulae: libtool
apt_install:
parameters:
args:
type: string
descr:
type: string
default: ""
update:
type: boolean
default: true
steps:
- run:
name: >
<<^ parameters.descr >> apt install << parameters.args >> <</ parameters.descr >>
<<# parameters.descr >> << parameters.descr >> <</ parameters.descr >>
command: |
<<# parameters.update >> sudo apt update -qy <</ parameters.update >>
sudo apt install << parameters.args >>
pip_install:
parameters:
args:
type: string
descr:
type: string
default: ""
user:
type: boolean
default: true
steps:
- run:
name: >
<<^ parameters.descr >> pip install << parameters.args >> <</ parameters.descr >>
<<# parameters.descr >> << parameters.descr >> <</ parameters.descr >>
command: >
pip install
<<# parameters.user >> --user <</ parameters.user >>
--progress-bar=off
<< parameters.args >>
install_torchvision:
parameters:
editable:
type: boolean
default: true
steps:
- pip_install:
args: --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
descr: Install PyTorch from nightly releases
- pip_install:
args: --no-build-isolation <<# parameters.editable >> --editable <</ parameters.editable >> .
descr: Install torchvision <<# parameters.editable >> in editable mode <</ parameters.editable >>
install_prototype_dependencies:
steps:
- pip_install:
args: iopath git+https://github.com/pytorch/data
descr: Install prototype dependencies
# Most of the test suite is handled by the `unittest` jobs, with completely different workflow and setup.
# This command can be used if only a selection of tests need to be run, for ad-hoc files.
run_tests_selective:
parameters:
file_or_dir:
type: string
steps:
- run:
name: Install test utilities
command: pip install --progress-bar=off pytest pytest-mock
- run:
name: Run tests
command: pytest --junitxml=test-results/junit.xml -v --durations 20 <<parameters.file_or_dir>>
- store_test_results:
path: test-results
binary_common: &binary_common binary_common: &binary_common
parameters: parameters:
# Edit these defaults to do a release # Edit these defaults to do a release
...@@ -171,107 +246,99 @@ jobs: ...@@ -171,107 +246,99 @@ jobs:
- image: circleci/python:3.7 - image: circleci/python:3.7
steps: steps:
- checkout - checkout
- pip_install:
args: jinja2 pyyaml
- run: - run:
name: Check CircleCI config consistency
command: | command: |
pip install --user --progress-bar off jinja2 pyyaml
python .circleci/regenerate.py python .circleci/regenerate.py
git diff --exit-code || (echo ".circleci/config.yml not in sync with config.yml.in! Run .circleci/regenerate.py to update config"; exit 1) git diff --exit-code || (echo ".circleci/config.yml not in sync with config.yml.in! Run .circleci/regenerate.py to update config"; exit 1)
python_lint: lint_python_and_config:
docker: docker:
- image: circleci/python:3.7 - image: circleci/python:3.7
steps: steps:
- checkout - checkout
- pip_install:
args: pre-commit
descr: Install lint utilities
- run: - run:
command: | name: Install pre-commit hooks
pip install --user --progress-bar off pre-commit command: pre-commit install-hooks
pre-commit install-hooks - run:
- run: pre-commit run --all-files name: Lint Python code and config files
command: pre-commit run --all-files
- run: - run:
name: Required lint modifications name: Required lint modifications
when: on_fail when: on_fail
command: git --no-pager diff command: git --no-pager diff
python_type_check: lint_c:
docker: docker:
- image: circleci/python:3.7 - image: circleci/python:3.7
steps: steps:
- apt_install:
args: libtinfo5
descr: Install additional system libraries
- checkout - checkout
- run: - run:
name: Install lint utilities
command: | command: |
sudo apt-get update -y curl https://oss-clang-format.s3.us-east-2.amazonaws.com/linux64/clang-format-linux64 -o clang-format
sudo apt install -y libturbojpeg-dev chmod +x clang-format
pip install --user --progress-bar off mypy sudo mv clang-format /opt/clang-format
pip install --user --progress-bar off types-requests
pip install --user --progress-bar off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
pip install --user --progress-bar off git+https://github.com/pytorch/data.git
pip install --user --progress-bar off --no-build-isolation --editable .
mypy --config-file mypy.ini
docstring_parameters_sync:
docker:
- image: circleci/python:3.7
steps:
- checkout
- run: - run:
command: | name: Lint C code
pip install --user pydocstyle command: ./.circleci/unittest/linux/scripts/run-clang-format.py -r torchvision/csrc --clang-format-executable /opt/clang-format
pydocstyle - run:
name: Required lint modifications
when: on_fail
command: git --no-pager diff
clang_format: type_check_python:
docker: docker:
- image: circleci/python:3.7 - image: circleci/python:3.7
steps: steps:
- apt_install:
args: libturbojpeg-dev
descr: Install additional system libraries
- checkout - checkout
- run: - install_torchvision:
command: | editable: true
sudo apt-get update -y - install_prototype_dependencies
sudo apt install -y libtinfo5 - pip_install:
curl https://oss-clang-format.s3.us-east-2.amazonaws.com/linux64/clang-format-linux64 -o clang-format args: mypy
chmod +x clang-format descr: Install Python type check utilities
sudo mv clang-format /opt/clang-format - run:
./.circleci/unittest/linux/scripts/run-clang-format.py -r torchvision/csrc --clang-format-executable /opt/clang-format name: Check Python types statically
command: mypy --config-file mypy.ini
torchhub_test: unittest_torchhub:
docker: docker:
- image: circleci/python:3.7 - image: circleci/python:3.7
steps: steps:
- checkout - checkout
- run: - install_torchvision
command: | - run_tests_selective:
pip install --user --progress-bar off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html file_or_dir: test/test_hub.py
# need to install torchvision dependencies due to transitive imports
pip install --user --progress-bar off --no-build-isolation .
pip install pytest
python test/test_hub.py
torch_onnx_test: unittest_onnx:
docker: docker:
- image: circleci/python:3.7 - image: circleci/python:3.7
steps: steps:
- checkout - checkout
- run: - install_torchvision
command: | - pip_install:
pip install --user --progress-bar off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html args: onnx onnxruntime
# need to install torchvision dependencies due to transitive imports descr: Install ONNX
pip install --user --progress-bar off --no-build-isolation . - run_tests_selective:
pip install --user onnx file_or_dir: test/test_onnx.py
pip install --user onnxruntime
pip install --user pytest
python test/test_onnx.py
prototype_test: unittest_prototype:
docker: docker:
- image: circleci/python:3.7 - image: circleci/python:3.7
resource_class: xlarge resource_class: xlarge
steps: steps:
- run:
name: Install torch
command: |
pip install --user --progress-bar=off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
- run:
name: Install prototype dependencies
command: pip install --user --progress-bar=off git+https://github.com/pytorch/data.git
- checkout - checkout
- run: - run:
name: Download model weights name: Download model weights
...@@ -281,19 +348,16 @@ jobs: ...@@ -281,19 +348,16 @@ jobs:
mkdir -p ~/.cache/torch/hub/checkpoints mkdir -p ~/.cache/torch/hub/checkpoints
python scripts/collect_model_urls.py torchvision/prototype/models \ python scripts/collect_model_urls.py torchvision/prototype/models \
| parallel -j0 'wget --no-verbose -O ~/.cache/torch/hub/checkpoints/`basename {}` {}\?source=ci' | parallel -j0 'wget --no-verbose -O ~/.cache/torch/hub/checkpoints/`basename {}` {}\?source=ci'
- run: - install_torchvision
name: Install torchvision - install_prototype_dependencies
command: pip install --user --progress-bar off --no-build-isolation . - pip_install:
- run: args: scipy
name: Install test requirements descr: Install optional dependencies
command: pip install --user --progress-bar=off pytest pytest-mock scipy iopath - run:
- run: name: Enable prototype tests
name: Run tests command: echo 'export PYTORCH_TEST_WITH_PROTOTYPE=1' >> $BASH_ENV
environment: - run_tests_selective:
PYTORCH_TEST_WITH_PROTOTYPE: 1 file_or_dir: test/test_prototype_*.py
command: pytest --junitxml=test-results/junit.xml -v --durations 20 test/test_prototype_*.py
- store_test_results:
path: test-results
binary_linux_wheel: binary_linux_wheel:
<<: *binary_common <<: *binary_common
...@@ -529,9 +593,10 @@ jobs: ...@@ -529,9 +593,10 @@ jobs:
at: ~/workspace at: ~/workspace
- designate_upload_channel - designate_upload_channel
- checkout - checkout
- pip_install:
args: awscli
- run: - run:
command: | command: |
pip install --user awscli
export PATH="$HOME/.local/bin:$PATH" export PATH="$HOME/.local/bin:$PATH"
# Prevent credential from leaking # Prevent credential from leaking
set +x set +x
...@@ -572,7 +637,8 @@ jobs: ...@@ -572,7 +637,8 @@ jobs:
command: | command: |
set -x set -x
source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION} source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION}
pip install $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html - pip_install:
args: $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html
- run: - run:
name: smoke test name: smoke test
command: | command: |
...@@ -641,7 +707,8 @@ jobs: ...@@ -641,7 +707,8 @@ jobs:
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda activate python${PYTHON_VERSION} conda activate python${PYTHON_VERSION}
pip install $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html - pip_install:
args: $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html
- run: - run:
name: smoke test name: smoke test
command: | command: |
...@@ -967,7 +1034,7 @@ jobs: ...@@ -967,7 +1034,7 @@ jobs:
eval "$(./conda/bin/conda shell.bash hook)" eval "$(./conda/bin/conda shell.bash hook)"
conda activate ./env conda activate ./env
pushd docs pushd docs
pip install -r requirements.txt pip install --progress-bar=off -r requirements.txt
make html make html
popd popd
- persist_to_workspace: - persist_to_workspace:
...@@ -1008,23 +1075,24 @@ jobs: ...@@ -1008,23 +1075,24 @@ jobs:
workflows: workflows:
build: lint:
{%- if True %}
jobs: jobs:
- circleci_consistency - circleci_consistency
- lint_python_and_config
- lint_c
- type_check_python
build:
jobs:
{{ build_workflows(windows_latest_only=True) }} {{ build_workflows(windows_latest_only=True) }}
- python_lint
- python_type_check
- docstring_parameters_sync
- clang_format
- torchhub_test
- torch_onnx_test
- prototype_test
{{ ios_workflows() }} {{ ios_workflows() }}
{{ android_workflows() }} {{ android_workflows() }}
unittest: unittest:
jobs: jobs:
- unittest_torchhub
- unittest_onnx
- unittest_prototype
{{ unittest_workflows() }} {{ unittest_workflows() }}
cmake: cmake:
...@@ -1032,16 +1100,7 @@ workflows: ...@@ -1032,16 +1100,7 @@ workflows:
{{ cmake_workflows() }} {{ cmake_workflows() }}
nightly: nightly:
{%- endif %}
jobs: jobs:
- circleci_consistency
- python_lint
- python_type_check
- docstring_parameters_sync
- clang_format
- torchhub_test
- torch_onnx_test
- prototype_test
{{ ios_workflows(nightly=True) }} {{ ios_workflows(nightly=True) }}
{{ android_workflows(nightly=True) }} {{ android_workflows(nightly=True) }}
{{ build_workflows(prefix="nightly_", filter_branch="nightly", upload=True) }} {{ build_workflows(prefix="nightly_", filter_branch="nightly", upload=True) }}
......
...@@ -28,3 +28,8 @@ repos: ...@@ -28,3 +28,8 @@ repos:
hooks: hooks:
- id: flake8 - id: flake8
args: [--config=setup.cfg] args: [--config=setup.cfg]
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
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