1212 GH_BOT_NAME : ' github-actions[bot]'
1313 GH_BOT_EMAIL : ' github-actions[bot]@users.noreply.github.com'
1414 GH_EVENT_OPEN_PR_UPSTREAM : ${{ github.event_name == 'pull_request' && github.event.action != 'closed' &&
15- github.event.pull_request && !github.event.pull_request.head .repo.fork }}
15+ github.event.pull_request && !github.event.pull_request.base .repo.fork }}
1616 GH_EVENT_PUSH_UPSTREAM : ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' &&
1717 github.event.ref == 'refs/heads/master' && github.event.repository && !github.event.repository.fork }}
1818 PUBLISH_DIR : doc/_build/html/
1919
2020defaults :
2121 run :
22- shell : bash -l {0}
22+ shell : bash -el {0}
2323
2424jobs :
2525 build-and-deploy :
2626 name : Build and Deploy Docs
2727
28- runs-on : ubuntu-20 .04
28+ runs-on : ubuntu-22 .04
2929
3030 permissions :
3131 # Needed to cancel any previous runs that are not completed for a given workflow
3636 pull-requests : write
3737
3838 env :
39- python-ver : ' 3.9 '
39+ python-ver : ' 3.12 '
4040 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'
4144
4245 steps :
4346 - name : Cancel Previous Runs
@@ -56,13 +59,13 @@ jobs:
5659 with :
5760 docker-images : false
5861
59- - name : Install Intel repository
62+ - name : Add Intel repository
6063 run : |
61- wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023 .PUB
62- sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023 .PUB
63- rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023 .PUB
64- sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
65- sudo apt-get update
64+ wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
65+ cat GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
66+ rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
67+ echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
68+ sudo apt update
6669
6770 - name : Update libstdc++-dev
6871 run : |
@@ -73,16 +76,19 @@ jobs:
7376
7477 - name : Install Intel OneAPI
7578 run : |
76- sudo apt-get install intel-oneapi-mkl \
77- intel-oneapi-mkl-devel \
78- intel-oneapi-compiler-dpcpp-cpp
79+ sudo apt install hwloc \
80+ intel-oneapi-mkl \
81+ intel-oneapi-umf \
82+ intel-oneapi-mkl-devel \
83+ intel-oneapi-tbb-devel \
84+ intel-oneapi-libdpstd-devel \
85+ intel-oneapi-compiler-dpcpp-cpp
7986
8087 # required by sphinxcontrib-spelling extension
8188 - name : Install enchant package
8289 run : |
8390 sudo apt-get install enchant-2
8491
85- # https://github.com/marketplace/actions/checkout
8692 - name : Install nvidia-cuda support drivers
8793 run : |
8894 sudo add-apt-repository ppa:graphics-drivers/ppa
@@ -91,27 +97,32 @@ jobs:
9197 sudo apt-get install -y nvidia-cuda-toolkit clinfo
9298
9399 - name : Checkout repo
94- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
100+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
95101 with :
96102 fetch-depth : 0
97103
98- # https://github.com/marketplace/actions/setup-miniconda
99104 - name : Setup miniconda
100- uses : conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
105+ id : setup_miniconda
106+ continue-on-error : true
107+ uses : conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
101108 with :
102- miniforge-variant : Mambaforge
103109 miniforge-version : latest
104- use-mamba : true
110+ use-mamba : ' true'
105111 channels : conda-forge
112+ conda-remove-defaults : ' true'
106113 python-version : ${{ env.python-ver }}
107114 activate-environment : ' docs'
108115
109- # Here is an issue in conda gh-12356 causing adding defaults to the list of channels
110- # upon running `conda config --append channels conda-forge`, while mamba requires to have only conda-forge channel
111- - name : Remove defaults channel
112- run : |
113- conda config --remove channels defaults
114- conda config --show
116+ - name : ReSetup miniconda
117+ if : steps.setup_miniconda.outcome == 'failure'
118+ uses : conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
119+ with :
120+ miniforge-version : latest
121+ use-mamba : ' true'
122+ channels : conda-forge
123+ conda-remove-defaults : ' true'
124+ python-version : ${{ env.python-ver }}
125+ activate-environment : ' docs'
115126
116127 # Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
117128 - name : Disable speed limit check in mamba
@@ -124,12 +135,18 @@ jobs:
124135 pyenchant sphinxcontrib-spelling
125136
126137 - name : Install dpnp dependencies
138+ if : env.INSTALL_ONE_API == 'yes'
127139 run : |
128- mamba install numpy"<1.24" dpctl">=0.18.0dev0" mkl-devel-dpcpp onedpl-devel tbb-devel dpcpp_linux-64 \
140+ mamba install numpy dpctl">=0.18.0dev0" cmake cython pytest ninja scikit-build ${{ env.NO_INTEL_CHANNELS }}
141+
142+ - name : Install dpnp dependencies
143+ if : env.INSTALL_ONE_API != 'yes'
144+ run : |
145+ mamba install numpy dpctl">=0.18.0dev0" mkl-devel-dpcpp onedpl-devel tbb-devel dpcpp_linux-64 \
129146 cmake cython pytest ninja scikit-build ${{ env.CHANNELS }}
130147
131148 - name : Install cuPy dependencies
132- run : mamba install cupy cudatoolkit=10.0
149+ run : mamba install cupy
133150
134151 - name : Conda info
135152 run : mamba info
@@ -138,14 +155,20 @@ jobs:
138155 run : mamba list
139156
140157 - name : Build library
141- run : python scripts/build_locally.py
158+ run : |
159+ [ -f /opt/intel/oneapi/setvars.sh ] && source /opt/intel/oneapi/setvars.sh
160+ python scripts/build_locally.py
142161
143162 - name : Run a spelling checker for docs
144- run : make spelling
163+ run : |
164+ [ -f /opt/intel/oneapi/setvars.sh ] && source /opt/intel/oneapi/setvars.sh
165+ make spelling
145166 working-directory : doc
146167
147168 - name : Build docs
148- run : make html
169+ run : |
170+ [ -f /opt/intel/oneapi/setvars.sh ] && source /opt/intel/oneapi/setvars.sh
171+ make html
149172 working-directory : doc
150173
151174 - name : Set a project number to current release
@@ -157,7 +180,7 @@ jobs:
157180
158181 # https://github.com/marketplace/actions/doxygen-action
159182 - name : Build backend docs
160- uses : mattnotmitt/doxygen-action@cbe72c8e402e8a3faa1f0b247ef90aa6c8e4ce74 # v1.9.8
183+ uses : mattnotmitt/doxygen-action@b84fe17600245bb5db3d6c247cc274ea98c15a3b # v1.12
161184 with :
162185 working-directory : ' dpnp/backend/doc'
163186
@@ -200,6 +223,7 @@ jobs:
200223 PR_NUM : ${{ github.event.number }}
201224 uses : mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
202225 with :
226+ message-id : url_to_docs
203227 message : |
204228 View rendered docs @ https://intelpython.github.io/dpnp/pull/${{ env.PR_NUM }}/index.html
205229 allow-repeats : false
@@ -208,7 +232,7 @@ jobs:
208232 clean :
209233 if : |
210234 github.event_name == 'pull_request' && github.event.action == 'closed' &&
211- github.event.pull_request && !github.event.pull_request.head .repo.fork
235+ github.event.pull_request && !github.event.pull_request.base .repo.fork
212236
213237 needs : build-and-deploy
214238
@@ -218,10 +242,10 @@ jobs:
218242 # Needed to modify a comment in the pull request's issue
219243 pull-requests : write
220244
221- runs-on : ubuntu-20.04
245+ runs-on : ubuntu-latest
222246
223247 steps :
224- - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
248+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
225249 with :
226250 fetch-depth : 0
227251
@@ -242,6 +266,7 @@ jobs:
242266 - name : Modify the comment with URL to official documentation
243267 uses : mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
244268 with :
269+ message-id : url_to_docs
245270 find : |
246271 View rendered docs @.+
247272 replace : |
0 commit comments