Skip to content

Commit 9830f99

Browse files
authored
Fix github action for building docs (#1191)
* Fix github action for building docs * Get rid of pinning for cmake
1 parent 63ff524 commit 9830f99

File tree

7 files changed

+83
-39
lines changed

7 files changed

+83
-39
lines changed

.github/workflows/build-sphinx.yml

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,89 +3,109 @@ on:
33
push:
44
branches:
55
- master
6+
pull_request:
67

78
jobs:
89
build-and-deploy:
910
name: Build and Deploy Docs
11+
1012
runs-on: ubuntu-20.04
13+
14+
defaults:
15+
run:
16+
shell: bash -l {0}
17+
18+
env:
19+
python-ver: '3.9'
20+
1121
steps:
1222
- name: Cancel Previous Runs
13-
uses: styfle/cancel-workflow-action@0.6.0
23+
uses: styfle/cancel-workflow-action@0.10.0
1424
with:
1525
access_token: ${{ github.token }}
26+
1627
- name: Install Intel repository
1728
run: |
1829
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
1930
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
2031
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
2132
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
2233
sudo apt-get update
34+
2335
- name: Update libstdc++-dev
2436
run: |
2537
sudo apt remove -y gcc-7 g++-7 gcc-8 g++-8 gcc-10 g++-10
2638
sudo apt remove -y libstdc++-10-dev
2739
sudo apt autoremove
2840
sudo apt install --reinstall -y gcc-9 g++-9 libstdc++-9-dev
41+
2942
- name: Install Intel OneAPI
3043
run: |
3144
sudo apt-get install intel-oneapi-mkl \
3245
intel-oneapi-mkl-devel \
3346
intel-oneapi-dpcpp-cpp-compiler
47+
3448
# https://github.com/marketplace/actions/checkout
3549
- name: Install nvidia-cuda support drivers
3650
run: |
3751
sudo add-apt-repository ppa:graphics-drivers/ppa
3852
sudo apt-get update
3953
sudo apt-get install -y libnvidia-gl-450
4054
sudo apt-get install -y nvidia-cuda-toolkit clinfo
55+
4156
- name: Checkout repo
42-
uses: actions/checkout@v2
57+
uses: actions/checkout@v3
58+
4359
# https://github.com/marketplace/actions/setup-miniconda
4460
- name: Setup miniconda
4561
uses: conda-incubator/setup-miniconda@v2
4662
with:
47-
activate-environment: dpnp
48-
python-version: 3.8
49-
channels: intel,conda-forge
50-
auto-activate-base: false
51-
- name: Conda info
52-
shell: bash -l {0}
53-
run: |
54-
conda info
55-
conda list
63+
auto-update-conda: true
64+
python-version: ${{ env.python-ver }}
65+
miniconda-version: 'latest'
66+
activate-environment: 'docs'
67+
channels: intel, conda-forge
68+
5669
- name: Install sphinx dependencies
57-
shell: bash -l {0}
58-
run: |
59-
conda install sphinx sphinx_rtd_theme
70+
run: conda install sphinx sphinx_rtd_theme
71+
6072
- name: Install dpnp dependencies
61-
shell: bash -l {0}
6273
run: |
63-
conda install dpctl mkl-devel-dpcpp tbb-devel dpcpp_linux-64 cmake=3.19 cython pytest \
74+
conda install dpctl mkl-devel-dpcpp tbb-devel dpcpp_linux-64 cmake cython pytest \
6475
-c dppy/label/dev -c intel -c conda-forge
76+
6577
- name: Install cuPy dependencies
66-
shell: bash -l {0}
78+
run: conda install -c conda-forge cupy cudatoolkit=10.0
79+
80+
- name: Conda info
6781
run: |
68-
conda install -c conda-forge cupy cudatoolkit=10.0
82+
conda info
83+
conda list
84+
6985
- name: Build library
70-
shell: bash -l {0}
7186
run: |
7287
DPLROOT=/opt/intel/oneapi/dpl/latest python setup.py build_clib
7388
CC=dpcpp python setup.py build_ext --inplace
7489
python setup.py develop
90+
7591
- name: Build docs
76-
shell: bash -l {0}
77-
run: |
78-
make html
92+
run: make html
7993
working-directory: doc
94+
8095
# https://github.com/marketplace/actions/doxygen-action
8196
- name: Build backend docs
82-
uses: mattnotmitt/doxygen-action@v1
97+
uses: mattnotmitt/doxygen-action@v1.9.4
8398
with:
8499
working-directory: 'dpnp/backend/doc'
100+
85101
- name: Copy backend docs
86102
run: cp -r dpnp/backend/doc/html doc/_build/html/backend_doc
103+
87104
# https://github.com/marketplace/actions/github-pages-action
88105
- name: Deploy docs
106+
if: |
107+
!github.event.pull_request.head.repo.fork &&
108+
(github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
89109
uses: peaceiris/actions-gh-pages@v3
90110
with:
91111
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/conda-package.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ jobs:
3030
conda-pkgs: '/home/runner/conda_pkgs_dir/'
3131

3232
steps:
33+
- name: Cancel Previous Runs
34+
uses: styfle/[email protected]
35+
with:
36+
access_token: ${{ github.token }}
37+
3338
- name: Checkout DPNP repo
3439
uses: actions/checkout@v3
3540
with:
@@ -95,6 +100,11 @@ jobs:
95100
conda-pkgs: 'C:\Users\runneradmin\conda_pkgs_dir\'
96101

97102
steps:
103+
- name: Cancel Previous Runs
104+
uses: styfle/[email protected]
105+
with:
106+
access_token: ${{ github.token }}
107+
98108
- name: Checkout DPNP repo
99109
uses: actions/checkout@v3
100110
with:
@@ -422,7 +432,9 @@ jobs:
422432
upload_linux:
423433
needs: test_linux
424434

425-
if: ${{github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/')}}
435+
if: |
436+
!github.event.pull_request.head.repo.fork &&
437+
(github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
426438
427439
runs-on: ubuntu-latest
428440

@@ -452,14 +464,16 @@ jobs:
452464
run: conda install anaconda-client
453465

454466
- name: Upload
467+
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
455468
env:
456469
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
457-
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
458470

459471
upload_windows:
460472
needs: test_windows
461473

462-
if: ${{github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/')}}
474+
if: |
475+
!github.event.pull_request.head.repo.fork &&
476+
(github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
463477
464478
runs-on: windows-latest
465479

@@ -488,6 +502,6 @@ jobs:
488502
run: conda install anaconda-client
489503

490504
- name: Upload
505+
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
491506
env:
492507
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
493-
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ __pycache__/
88
# Code project files
99
.vscode
1010

11+
# Files from test of code coverage
12+
coverage.xml
13+
14+
# Backup files kept after git merge/rebase
15+
*.orig
16+
1117
*dpnp_backend*
1218
dpnp/**/*.cpython*.so
1319
dpnp/**/*.pyd

doc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# -- Project information -----------------------------------------------------
2828

2929
project = 'dpnp'
30-
copyright = '2020, Intel'
30+
copyright = '2020-2022, Intel'
3131
author = 'Intel'
3232

3333
# The short X.Y version
@@ -73,7 +73,7 @@
7373
#
7474
# This is also used if you do content translation via gettext catalogs.
7575
# Usually you set "language" from the command line for these cases.
76-
language = None
76+
language = 'en'
7777

7878
# List of patterns, relative to source directory, that match files and
7979
# directories to ignore when looking for source files.

doc/reference/fft.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ Helper routines
5757
dpnp.fft.rfftfreq
5858
dpnp.fft.fftshift
5959
dpnp.fft.ifftshift
60-
dpnp.fft.config.set_cufft_callbacks
61-
dpnp.fft.config.set_cufft_gpus
62-
dpnp.fft.config.get_plan_cache
63-
dpnp.fft.config.show_plan_cache_info
60+
61+
.. fft.config module is not implemented yet
62+
.. dpnp.fft.config.set_cufft_callbacks
63+
.. dpnp.fft.config.set_cufft_gpus
64+
.. dpnp.fft.config.get_plan_cache
65+
.. dpnp.fft.config.show_plan_cache_info

doc/reference/ndarray.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ For the basic concept of ``ndarray``\s, please refer to the `NumPy documentation
1111
:nosignatures:
1212

1313
dpnp.ndarray
14-
dpnp.dparray.dparray
14+
dpnp.dpnp_array.dpnp_array

doc/reference/polynomials.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ Polynomial Module
1313
:toctree: generated/
1414
:nosignatures:
1515

16-
dpnp.polynomial.polynomial.polyvander
17-
dpnp.polynomial.polynomial.polycompanion
16+
.. polynomial module is not implemented yet
17+
.. dpnp.polynomial.polynomial.polyvander
18+
.. dpnp.polynomial.polynomial.polycompanion
1819
1920
2021
Polyutils
@@ -24,9 +25,10 @@ Polyutils
2425
:toctree: generated/
2526
:nosignatures:
2627

27-
dpnp.polynomial.polyutils.as_series
28-
dpnp.polynomial.polyutils.trimseq
29-
dpnp.polynomial.polyutils.trimcoef
28+
.. polyutils module is not implemented yet
29+
.. dpnp.polynomial.polyutils.as_series
30+
.. dpnp.polynomial.polyutils.trimseq
31+
.. dpnp.polynomial.polyutils.trimcoef
3032
3133
3234
Poly1d

0 commit comments

Comments
 (0)