2525 build-and-deploy :
2626 name : Build and Deploy Docs
2727
28- runs-on : ubuntu-latest
28+ runs-on : ubuntu-22.04
2929
3030 permissions :
3131 # Needed to cancel any previous runs that are not completed for a given workflow
@@ -36,11 +36,12 @@ jobs:
3636 pull-requests : write
3737
3838 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'
4445
4546 steps :
4647 - name : Cancel Previous Runs
6061 docker-images : false
6162
6263 - name : Add Intel repository
64+ if : env.oneapi-pkgs-env == ''
6365 run : |
6466 wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
6567 cat GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
7577 sudo apt install --reinstall -y gcc-9 g++-9 libstdc++-9-dev
7678
7779 - name : Install Intel OneAPI
80+ if : env.oneapi-pkgs-env == ''
7881 run : |
7982 sudo apt install hwloc \
8083 intel-oneapi-mkl \
8992 run : |
9093 sudo apt-get install enchant-2
9194
92- # https://github.com/marketplace/actions/checkout
9395 - name : Install nvidia-cuda support drivers
9496 run : |
9597 sudo add-apt-repository ppa:graphics-drivers/ppa
@@ -102,46 +104,57 @@ jobs:
102104 with :
103105 fetch-depth : 0
104106
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+
106117 - 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
108121 with :
109122 miniforge-version : latest
110123 use-mamba : ' true'
111- channels : conda-forge
112124 conda-remove-defaults : ' true'
113- python-version : ${{ env.python-ver }}
125+ environment-file : ${{ env.environment-file }}
114126 activate-environment : ' docs'
115127
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'
130137
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 == ''
133151 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
139153
140154 - name : Conda info
141- run : mamba info
142-
143- - name : Conda list
144- run : mamba list
155+ run : |
156+ mamba info
157+ mamba list
145158
146159 - name : Build library
147160 run : |
@@ -167,16 +180,14 @@ jobs:
167180 echo PROJECT_NUMBER=${PROJECT_NUMBER}
168181 echo "PROJECT_NUMBER=$PROJECT_NUMBER" >> $GITHUB_ENV
169182
170- # https://github.com/marketplace/actions/doxygen-action
171183 - name : Build backend docs
172- uses : mattnotmitt/doxygen-action@cbe72c8e402e8a3faa1f0b247ef90aa6c8e4ce74 # v1.9.8
184+ uses : mattnotmitt/doxygen-action@b84fe17600245bb5db3d6c247cc274ea98c15a3b # v1.12
173185 with :
174186 working-directory : ' dpnp/backend/doc'
175187
176188 - name : Copy backend docs
177189 run : cp -r dpnp/backend/doc/html ${{ env.PUBLISH_DIR }}/backend_doc
178190
179- # https://github.com/marketplace/actions/github-pages-action
180191 # The step is only used to build docs while pushing a PR to "master"
181192 - name : Deploy docs
182193 if : env.GH_EVENT_PUSH_UPSTREAM == 'true'
@@ -212,6 +223,7 @@ jobs:
212223 PR_NUM : ${{ github.event.number }}
213224 uses : mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
214225 with :
226+ message-id : url_to_docs
215227 message : |
216228 View rendered docs @ https://intelpython.github.io/dpnp/pull/${{ env.PR_NUM }}/index.html
217229 allow-repeats : false
@@ -254,6 +266,7 @@ jobs:
254266 - name : Modify the comment with URL to official documentation
255267 uses : mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
256268 with :
269+ message-id : url_to_docs
257270 find : |
258271 View rendered docs @.+
259272 replace : |
0 commit comments