Skip to content

Commit 93e3234

Browse files
committed
Add environment file to build docs workflow
1 parent 9d445ba commit 93e3234

File tree

3 files changed

+64
-37
lines changed

3 files changed

+64
-37
lines changed

.github/workflows/build-sphinx.yml

Lines changed: 42 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -102,51 +102,58 @@ jobs:
102102
fetch-depth: 0
103103

104104
- name: Setup miniconda
105-
id: setup_miniconda
106-
continue-on-error: true
107105
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
108106
with:
109107
miniforge-version: latest
110108
use-mamba: 'true'
111-
channels: conda-forge
112-
conda-remove-defaults: 'true'
113-
python-version: ${{ env.python-ver }}
114-
activate-environment: 'docs'
115-
116-
- name: ReSetup miniconda
117-
if: steps.setup_miniconda.outcome == 'failure'
118-
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
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'
109+
environment-file: 'environments/build_docs.yml'
110+
111+
# - name: Setup miniconda
112+
# id: setup_miniconda
113+
# continue-on-error: true
114+
# uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
115+
# with:
116+
# miniforge-version: latest
117+
# use-mamba: 'true'
118+
# channels: conda-forge
119+
# conda-remove-defaults: 'true'
120+
# python-version: ${{ env.python-ver }}
121+
# activate-environment: 'docs'
122+
123+
# - name: ReSetup miniconda
124+
# if: steps.setup_miniconda.outcome == 'failure'
125+
# uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
126+
# with:
127+
# miniforge-version: latest
128+
# use-mamba: 'true'
129+
# channels: conda-forge
130+
# conda-remove-defaults: 'true'
131+
# python-version: ${{ env.python-ver }}
132+
# activate-environment: 'docs'
126133

127134
# Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
128-
- name: Disable speed limit check in mamba
129-
run: echo "MAMBA_NO_LOW_SPEED_LIMIT=1" >> $GITHUB_ENV
135+
# - name: Disable speed limit check in mamba
136+
# run: echo "MAMBA_NO_LOW_SPEED_LIMIT=1" >> $GITHUB_ENV
130137

131-
- name: Install sphinx dependencies
132-
run: |
133-
mamba install sphinx sphinx_rtd_theme
134-
pip install sphinxcontrib-googleanalytics==0.4 \
135-
pyenchant sphinxcontrib-spelling
138+
# - name: Install sphinx dependencies
139+
# run: |
140+
# mamba install sphinx sphinx_rtd_theme
141+
# pip install sphinxcontrib-googleanalytics==0.4 \
142+
# pyenchant sphinxcontrib-spelling
136143

137-
- name: Install dpnp dependencies
138-
if: env.INSTALL_ONE_API == 'yes'
139-
run: |
140-
mamba install numpy dpctl">=0.18.0dev0" cmake cython pytest ninja scikit-build ${{ env.NO_INTEL_CHANNELS }}
144+
# - name: Install dpnp dependencies
145+
# if: env.INSTALL_ONE_API == 'yes'
146+
# run: |
147+
# mamba install numpy dpctl">=0.18.0dev0" cmake cython pytest ninja scikit-build ${{ env.NO_INTEL_CHANNELS }}
141148

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 \
146-
cmake cython pytest ninja scikit-build ${{ env.CHANNELS }}
149+
# - name: Install dpnp dependencies
150+
# if: env.INSTALL_ONE_API != 'yes'
151+
# run: |
152+
# mamba install numpy dpctl">=0.18.0dev0" mkl-devel-dpcpp onedpl-devel tbb-devel dpcpp_linux-64 \
153+
# cmake cython pytest ninja scikit-build ${{ env.CHANNELS }}
147154

148-
- name: Install cuPy dependencies
149-
run: mamba install cupy
155+
# - name: Install cuPy dependencies
156+
# run: mamba install cupy
150157

151158
- name: Conda info
152159
run: mamba info
@@ -178,7 +185,6 @@ jobs:
178185
echo PROJECT_NUMBER=${PROJECT_NUMBER}
179186
echo "PROJECT_NUMBER=$PROJECT_NUMBER" >> $GITHUB_ENV
180187
181-
# https://github.com/marketplace/actions/doxygen-action
182188
- name: Build backend docs
183189
uses: mattnotmitt/doxygen-action@cbe72c8e402e8a3faa1f0b247ef90aa6c8e4ce74 # v1.9.8
184190
with:
@@ -187,7 +193,6 @@ jobs:
187193
- name: Copy backend docs
188194
run: cp -r dpnp/backend/doc/html ${{ env.PUBLISH_DIR }}/backend_doc
189195

190-
# https://github.com/marketplace/actions/github-pages-action
191196
# The step is only used to build docs while pushing a PR to "master"
192197
- name: Deploy docs
193198
if: env.GH_EVENT_PUSH_UPSTREAM == 'true'

environments/build_docs.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pyenchant==3.2.2
2+
sphinxcontrib-googleanalytics==0.4
3+
sphinxcontrib-spelling==8.0.1

environments/build_docs.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: build_docs
2+
channels:
3+
- dppy/label/dev
4+
- conda-forge
5+
- nodefaults
6+
dependencies:
7+
- python=3.12
8+
- cmake
9+
- cupy
10+
- cython
11+
- dpctl>=0.19.0dev0
12+
- ninja
13+
- numpy
14+
- pytest
15+
- scikit-build
16+
- sphinx
17+
- sphinx_rtd_theme
18+
- pip:
19+
- -r build_docs.txt

0 commit comments

Comments
 (0)