|
| 1 | +#=============================================================================== |
| 2 | +# Copyright 2022 Intel Corporation |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | +#=============================================================================== |
| 16 | + |
| 17 | +trigger: |
| 18 | + branches: |
| 19 | + include: |
| 20 | + - master |
| 21 | + - releases |
| 22 | + - rls/* |
| 23 | + paths: |
| 24 | + include: |
| 25 | + - requirements-doc.txt |
| 26 | + - doc/ |
| 27 | + - .ci/pipeline/docs.yml |
| 28 | + |
| 29 | +pr: |
| 30 | + branches: |
| 31 | + include: |
| 32 | + - master |
| 33 | + - releases |
| 34 | + - rls/* |
| 35 | + paths: |
| 36 | + include: |
| 37 | + - requirements-doc.txt |
| 38 | + - doc/ |
| 39 | + - .ci/pipeline/docs.yml |
| 40 | + |
| 41 | +variables: |
| 42 | + - name: 'PYTHON' |
| 43 | + value: python |
| 44 | + |
| 45 | +jobs: |
| 46 | +- job: PEP8 |
| 47 | + pool: |
| 48 | + vmImage: 'ubuntu-22.04' |
| 49 | + steps: |
| 50 | + - task: UsePythonVersion@0 |
| 51 | + inputs: |
| 52 | + versionSpec: '3.9' |
| 53 | + addToPath: true |
| 54 | + - script: | |
| 55 | + python -m pip install --upgrade pip setuptools |
| 56 | + pip install flake8 |
| 57 | + flake8 --ignore=E265,E722,E402,F401,F403 --max-line-length=90 --count |
| 58 | + displayName: 'PEP 8 check' |
| 59 | +- job: Docs |
| 60 | + pool: |
| 61 | + vmImage: 'ubuntu-22.04' |
| 62 | + steps: |
| 63 | + - script: | |
| 64 | + bash .ci/scripts/describe_system.sh |
| 65 | + displayName: 'System info' |
| 66 | + - task: UsePythonVersion@0 |
| 67 | + inputs: |
| 68 | + versionSpec: '3.9' |
| 69 | + addToPath: true |
| 70 | + - script: sudo apt-get update && sudo apt-get install -y clang-format |
| 71 | + displayName: 'apt-get' |
| 72 | + - script: | |
| 73 | + pip install daal-devel impi-devel |
| 74 | + pip install -r requirements-dev.txt |
| 75 | + pip install -r requirements-doc.txt |
| 76 | + pip install -r requirements-test.txt |
| 77 | + pip list |
| 78 | + displayName: 'Install requirements' |
| 79 | + - script: | |
| 80 | + export PREFIX=$(dirname $(dirname $(which python))) |
| 81 | + ./conda-recipe/build.sh |
| 82 | + python setup_sklearnex.py install --single-version-externally-managed --record=record_sklearnex.txt |
| 83 | + displayName: 'Build daal4py/sklearnex' |
| 84 | + - script: | |
| 85 | + export LD_LIBRARY_PATH=$(dirname $(dirname $(which python)))/lib:$LD_LIBRARY_PATH |
| 86 | + cd doc/daal4py |
| 87 | + make html |
| 88 | + displayName: 'Build daal4py documentation' |
| 89 | + - script: | |
| 90 | + cd doc |
| 91 | + make html |
| 92 | + displayName: 'Build scikit-learn-intelex documentation' |
| 93 | + - script: | |
| 94 | + mkdir $(Build.ArtifactStagingDirectory)/html/daal4py |
| 95 | + mkdir $(Build.ArtifactStagingDirectory)/html/sklearnex |
| 96 | + cp -R doc/daal4py/_build $(Build.ArtifactStagingDirectory)/html_daal4py |
| 97 | + cp -R doc/_build $(Build.ArtifactStagingDirectory)/html_sklearnex |
| 98 | + displayName: 'Copy build' |
| 99 | + - task: PublishPipelineArtifact@0 |
| 100 | + inputs: |
| 101 | + artifactName: 'documentation' |
| 102 | + targetPath: '$(Build.ArtifactStagingDirectory)/' |
0 commit comments