12
12
GH_BOT_NAME : ' github-actions[bot]'
13
13
GH_BOT_EMAIL : ' github-actions[bot]@users.noreply.github.com'
14
14
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 }}
16
16
GH_EVENT_PUSH_UPSTREAM : ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' &&
17
17
github.event.ref == 'refs/heads/master' && github.event.repository && !github.event.repository.fork }}
18
18
PUBLISH_DIR : doc/_build/html/
19
19
20
20
defaults :
21
21
run :
22
- shell : bash -l {0}
22
+ shell : bash -el {0}
23
23
24
24
jobs :
25
25
build-and-deploy :
26
26
name : Build and Deploy Docs
27
27
28
- runs-on : ubuntu-20 .04
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
36
pull-requests : write
37
37
38
38
env :
39
- python-ver : ' 3.9 '
39
+ python-ver : ' 3.12 '
40
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'
41
44
42
45
steps :
43
46
- name : Cancel Previous Runs
@@ -56,13 +59,13 @@ jobs:
56
59
with :
57
60
docker-images : false
58
61
59
- - name : Install Intel repository
62
+ - name : Add Intel repository
60
63
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
66
69
67
70
- name : Update libstdc++-dev
68
71
run : |
@@ -73,16 +76,19 @@ jobs:
73
76
74
77
- name : Install Intel OneAPI
75
78
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
79
86
80
87
# required by sphinxcontrib-spelling extension
81
88
- name : Install enchant package
82
89
run : |
83
90
sudo apt-get install enchant-2
84
91
85
- # https://github.com/marketplace/actions/checkout
86
92
- name : Install nvidia-cuda support drivers
87
93
run : |
88
94
sudo add-apt-repository ppa:graphics-drivers/ppa
@@ -91,27 +97,32 @@ jobs:
91
97
sudo apt-get install -y nvidia-cuda-toolkit clinfo
92
98
93
99
- name : Checkout repo
94
- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
100
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
95
101
with :
96
102
fetch-depth : 0
97
103
98
- # https://github.com/marketplace/actions/setup-miniconda
99
104
- 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
101
108
with :
102
- miniforge-variant : Mambaforge
103
109
miniforge-version : latest
104
- use-mamba : true
110
+ use-mamba : ' true'
105
111
channels : conda-forge
112
+ conda-remove-defaults : ' true'
106
113
python-version : ${{ env.python-ver }}
107
114
activate-environment : ' docs'
108
115
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'
115
126
116
127
# Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
117
128
- name : Disable speed limit check in mamba
@@ -124,12 +135,18 @@ jobs:
124
135
pyenchant sphinxcontrib-spelling
125
136
126
137
- name : Install dpnp dependencies
138
+ if : env.INSTALL_ONE_API == 'yes'
127
139
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 \
129
146
cmake cython pytest ninja scikit-build ${{ env.CHANNELS }}
130
147
131
148
- name : Install cuPy dependencies
132
- run : mamba install cupy cudatoolkit=10.0
149
+ run : mamba install cupy
133
150
134
151
- name : Conda info
135
152
run : mamba info
@@ -138,14 +155,20 @@ jobs:
138
155
run : mamba list
139
156
140
157
- 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
142
161
143
162
- 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
145
166
working-directory : doc
146
167
147
168
- 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
149
172
working-directory : doc
150
173
151
174
- name : Set a project number to current release
@@ -157,7 +180,7 @@ jobs:
157
180
158
181
# https://github.com/marketplace/actions/doxygen-action
159
182
- name : Build backend docs
160
- uses : mattnotmitt/doxygen-action@cbe72c8e402e8a3faa1f0b247ef90aa6c8e4ce74 # v1.9.8
183
+ uses : mattnotmitt/doxygen-action@b84fe17600245bb5db3d6c247cc274ea98c15a3b # v1.12
161
184
with :
162
185
working-directory : ' dpnp/backend/doc'
163
186
@@ -200,6 +223,7 @@ jobs:
200
223
PR_NUM : ${{ github.event.number }}
201
224
uses : mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
202
225
with :
226
+ message-id : url_to_docs
203
227
message : |
204
228
View rendered docs @ https://intelpython.github.io/dpnp/pull/${{ env.PR_NUM }}/index.html
205
229
allow-repeats : false
@@ -208,7 +232,7 @@ jobs:
208
232
clean :
209
233
if : |
210
234
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
212
236
213
237
needs : build-and-deploy
214
238
@@ -218,10 +242,10 @@ jobs:
218
242
# Needed to modify a comment in the pull request's issue
219
243
pull-requests : write
220
244
221
- runs-on : ubuntu-20.04
245
+ runs-on : ubuntu-latest
222
246
223
247
steps :
224
- - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
248
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
225
249
with :
226
250
fetch-depth : 0
227
251
@@ -242,6 +266,7 @@ jobs:
242
266
- name : Modify the comment with URL to official documentation
243
267
uses : mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
244
268
with :
269
+ message-id : url_to_docs
245
270
find : |
246
271
View rendered docs @.+
247
272
replace : |
0 commit comments