25
25
build-and-deploy :
26
26
name : Build and Deploy Docs
27
27
28
- runs-on : ubuntu-latest
28
+ runs-on : ubuntu-22.04
29
29
30
30
permissions :
31
31
# Needed to cancel any previous runs that are not completed for a given workflow
@@ -36,11 +36,12 @@ jobs:
36
36
pull-requests : write
37
37
38
38
env :
39
- python-ver : ' 3.12'
40
- CHANNELS : ' -c dppy/label/dev -c intel -c conda-forge --override-channels'
41
- NO_INTEL_CHANNELS : ' -c dppy/label/dev -c conda-forge --override-channels'
42
- # Install the latest oneAPI compiler to work around an issue
43
- INSTALL_ONE_API : ' yes'
39
+ environment-file : ' environments/environment.yml'
40
+ build-with-oneapi-env : ' environments/build_with_oneapi.yml'
41
+ building-docs-env : ' environments/building_docs.yml'
42
+ oneapi-pkgs-env : ' '
43
+ # Enable env when it's required to use only conda packages without OneAPI installation
44
+ # oneapi-pkgs-env: '${{ github.workspace }}/environments/oneapi_pkgs.yml'
44
45
45
46
steps :
46
47
- name : Cancel Previous Runs
60
61
docker-images : false
61
62
62
63
- name : Add Intel repository
64
+ if : env.oneapi-pkgs-env == ''
63
65
run : |
64
66
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
65
67
cat GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
75
77
sudo apt install --reinstall -y gcc-9 g++-9 libstdc++-9-dev
76
78
77
79
- name : Install Intel OneAPI
80
+ if : env.oneapi-pkgs-env == ''
78
81
run : |
79
82
sudo apt install hwloc \
80
83
intel-oneapi-mkl \
89
92
run : |
90
93
sudo apt-get install enchant-2
91
94
92
- # https://github.com/marketplace/actions/checkout
93
95
- name : Install nvidia-cuda support drivers
94
96
run : |
95
97
sudo add-apt-repository ppa:graphics-drivers/ppa
@@ -102,46 +104,57 @@ jobs:
102
104
with :
103
105
fetch-depth : 0
104
106
105
- # https://github.com/marketplace/actions/setup-miniconda
107
+ - name : Install conda-merge tool
108
+ uses : BSFishy/pip-action@8f2d471d809dc20b6ada98c91910b6ae6243f318 # v1
109
+ with :
110
+ packages : conda-merge
111
+
112
+ - name : Merge conda env files
113
+ run : |
114
+ conda-merge ${{ env.build-with-oneapi-env }} ${{ env.building-docs-env }} ${{ env.oneapi-pkgs-env }} > ${{ env.environment-file }}
115
+ cat ${{ env.environment-file }}
116
+
106
117
- name : Setup miniconda
107
- uses : conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
118
+ id : setup_miniconda
119
+ continue-on-error : true
120
+ uses : conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
108
121
with :
109
122
miniforge-version : latest
110
123
use-mamba : ' true'
111
- channels : conda-forge
112
124
conda-remove-defaults : ' true'
113
- python-version : ${{ env.python-ver }}
125
+ environment-file : ${{ env.environment-file }}
114
126
activate-environment : ' docs'
115
127
116
- # Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
117
- - name : Disable speed limit check in mamba
118
- run : echo "MAMBA_NO_LOW_SPEED_LIMIT=1" >> $GITHUB_ENV
119
-
120
- - name : Install sphinx dependencies
121
- run : |
122
- mamba install sphinx sphinx_rtd_theme
123
- pip install sphinxcontrib-googleanalytics==0.4 \
124
- pyenchant sphinxcontrib-spelling
125
-
126
- - name : Install dpnp dependencies
127
- if : env.INSTALL_ONE_API == 'yes'
128
- run : |
129
- mamba install numpy dpctl">=0.18.0dev0" cmake cython pytest ninja scikit-build ${{ env.NO_INTEL_CHANNELS }}
128
+ - name : ReSetup miniconda
129
+ if : steps.setup_miniconda.outcome == 'failure'
130
+ uses : conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
131
+ with :
132
+ miniforge-version : latest
133
+ use-mamba : ' true'
134
+ conda-remove-defaults : ' true'
135
+ environment-file : ${{ env.environment-file }}
136
+ activate-environment : ' docs'
130
137
131
- - name : Install dpnp dependencies
132
- if : env.INSTALL_ONE_API != 'yes'
138
+ # We can't install dpctl as a conda package when the environment is created through
139
+ # installing of Intel OneAPI packages because the dpctl conda package has a runtime
140
+ # dependency on DPC++ RT one. Whereas the DPC++ RT package has been already installed
141
+ # by the apt command above and its version has been matched with the DPC++ compiler.
142
+ # In case where we install the DPC++ compiler with the apt (including DPC++ RT) and
143
+ # install the DPC++ RT conda package while resolving dependencies, this can lead
144
+ # to a versioning error, i.e. compatibility issue as the DPC++ compiler only guarantees
145
+ # backwards compatibility, not forward compatibility (DPC++ RT may not run a binary built
146
+ # with a newer version of the DPC++ compiler).
147
+ # Installing dpctl via the pip manager has no such limitation, as the package has no
148
+ # run dependency on the DPC++ RT pip package, so this is why the step is necessary here.
149
+ - name : Install dpctl
150
+ if : env.oneapi-pkgs-env == ''
133
151
run : |
134
- mamba install numpy dpctl">=0.18.0dev0" mkl-devel-dpcpp onedpl-devel tbb-devel dpcpp_linux-64 \
135
- cmake cython pytest ninja scikit-build ${{ env.CHANNELS }}
136
-
137
- - name : Install cuPy dependencies
138
- run : mamba install cupy
152
+ pip install -i https://pypi.anaconda.org/dppy/label/dev/simple dpctl==0.20.0dev0
139
153
140
154
- name : Conda info
141
- run : mamba info
142
-
143
- - name : Conda list
144
- run : mamba list
155
+ run : |
156
+ mamba info
157
+ mamba list
145
158
146
159
- name : Build library
147
160
run : |
@@ -167,16 +180,14 @@ jobs:
167
180
echo PROJECT_NUMBER=${PROJECT_NUMBER}
168
181
echo "PROJECT_NUMBER=$PROJECT_NUMBER" >> $GITHUB_ENV
169
182
170
- # https://github.com/marketplace/actions/doxygen-action
171
183
- name : Build backend docs
172
- uses : mattnotmitt/doxygen-action@cbe72c8e402e8a3faa1f0b247ef90aa6c8e4ce74 # v1.9.8
184
+ uses : mattnotmitt/doxygen-action@b84fe17600245bb5db3d6c247cc274ea98c15a3b # v1.12
173
185
with :
174
186
working-directory : ' dpnp/backend/doc'
175
187
176
188
- name : Copy backend docs
177
189
run : cp -r dpnp/backend/doc/html ${{ env.PUBLISH_DIR }}/backend_doc
178
190
179
- # https://github.com/marketplace/actions/github-pages-action
180
191
# The step is only used to build docs while pushing a PR to "master"
181
192
- name : Deploy docs
182
193
if : env.GH_EVENT_PUSH_UPSTREAM == 'true'
@@ -212,6 +223,7 @@ jobs:
212
223
PR_NUM : ${{ github.event.number }}
213
224
uses : mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
214
225
with :
226
+ message-id : url_to_docs
215
227
message : |
216
228
View rendered docs @ https://intelpython.github.io/dpnp/pull/${{ env.PR_NUM }}/index.html
217
229
allow-repeats : false
@@ -254,6 +266,7 @@ jobs:
254
266
- name : Modify the comment with URL to official documentation
255
267
uses : mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
256
268
with :
269
+ message-id : url_to_docs
257
270
find : |
258
271
View rendered docs @.+
259
272
replace : |
0 commit comments