forked from uxlfoundation/scikit-learn-intelex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocs.yml
97 lines (93 loc) · 2.97 KB
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#===============================================================================
# Copyright 2022 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#===============================================================================
trigger:
branches:
include:
- main
- rls/*
paths:
include:
- requirements-doc.txt
- doc/
- .ci/pipeline/docs.yml
- .github/Pull_Request_template.md
- .github/workflows/docs-release.yml
pr:
branches:
include:
- main
- rls/*
paths:
include:
- requirements-doc.txt
- doc/
- .ci/pipeline/docs.yml
- .github/Pull_Request_template.md
variables:
- name: 'PYTHON'
value: python
jobs:
- job: Docs
pool:
vmImage: 'ubuntu-22.04'
steps:
- script: |
bash .ci/scripts/describe_system.sh
displayName: 'System info'
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
addToPath: true
- script: sudo apt-get update && sudo apt-get install -y clang-format pandoc
displayName: 'apt-get'
- script: |
pip install daal-devel impi-devel
pip install -r dependencies-dev
pip install -r requirements-doc.txt
pip install -r requirements-test.txt
pip list
displayName: 'Install requirements'
- script: |
export DALROOT=$(dirname $(dirname $(which python)))
export LD_LIBRARY_PATH=$(dirname $(dirname $(which python)))/lib:$LD_LIBRARY_PATH
./conda-recipe/build.sh
displayName: 'Build daal4py/sklearnex'
- script: |
export LD_LIBRARY_PATH=$(dirname $(dirname $(which python)))/lib:$LD_LIBRARY_PATH
cd doc/daal4py
make html 2>&1 | tee build.log
cat build.log
# check for autodoc warnings
if grep -i "autodoc" build.log; then
echo "Autodoc Warnings detected, build failed!"
exit 1
fi
displayName: 'Build daal4py documentation'
- script: |
export LD_LIBRARY_PATH=$(dirname $(dirname $(which python)))/lib:$LD_LIBRARY_PATH
cd doc
./build-doc.sh
displayName: 'Build scikit-learn-intelex documentation'
- script: |
mkdir $(Build.ArtifactStagingDirectory)/html/daal4py
mkdir $(Build.ArtifactStagingDirectory)/html/sklearnex
cp -R doc/daal4py/_build $(Build.ArtifactStagingDirectory)/html_daal4py
cp -R doc/_build $(Build.ArtifactStagingDirectory)/html_sklearnex
displayName: 'Copy build'
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'documentation'
targetPath: '$(Build.ArtifactStagingDirectory)/'