Skip to content

Fix github action for building docs #1191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 43 additions & 23 deletions .github/workflows/build-sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,89 +3,109 @@ on:
push:
branches:
- master
pull_request:

jobs:
build-and-deploy:
name: Build and Deploy Docs

runs-on: ubuntu-20.04

defaults:
run:
shell: bash -l {0}

env:
python-ver: '3.9'

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.6.0
uses: styfle/cancel-workflow-action@0.10.0
with:
access_token: ${{ github.token }}

- name: Install Intel repository
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
sudo apt-get update

- name: Update libstdc++-dev
run: |
sudo apt remove -y gcc-7 g++-7 gcc-8 g++-8 gcc-10 g++-10
sudo apt remove -y libstdc++-10-dev
sudo apt autoremove
sudo apt install --reinstall -y gcc-9 g++-9 libstdc++-9-dev

- name: Install Intel OneAPI
run: |
sudo apt-get install intel-oneapi-mkl \
intel-oneapi-mkl-devel \
intel-oneapi-dpcpp-cpp-compiler

# https://github.com/marketplace/actions/checkout
- name: Install nvidia-cuda support drivers
run: |
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install -y libnvidia-gl-450
sudo apt-get install -y nvidia-cuda-toolkit clinfo

- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3

# https://github.com/marketplace/actions/setup-miniconda
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: dpnp
python-version: 3.8
channels: intel,conda-forge
auto-activate-base: false
- name: Conda info
shell: bash -l {0}
run: |
conda info
conda list
auto-update-conda: true
python-version: ${{ env.python-ver }}
miniconda-version: 'latest'
activate-environment: 'docs'
channels: intel, conda-forge

- name: Install sphinx dependencies
shell: bash -l {0}
run: |
conda install sphinx sphinx_rtd_theme
run: conda install sphinx sphinx_rtd_theme

- name: Install dpnp dependencies
shell: bash -l {0}
run: |
conda install dpctl mkl-devel-dpcpp tbb-devel dpcpp_linux-64 cmake=3.19 cython pytest \
conda install dpctl mkl-devel-dpcpp tbb-devel dpcpp_linux-64 cmake cython pytest \
-c dppy/label/dev -c intel -c conda-forge

- name: Install cuPy dependencies
shell: bash -l {0}
run: conda install -c conda-forge cupy cudatoolkit=10.0

- name: Conda info
run: |
conda install -c conda-forge cupy cudatoolkit=10.0
conda info
conda list

- name: Build library
shell: bash -l {0}
run: |
DPLROOT=/opt/intel/oneapi/dpl/latest python setup.py build_clib
CC=dpcpp python setup.py build_ext --inplace
python setup.py develop

- name: Build docs
shell: bash -l {0}
run: |
make html
run: make html
working-directory: doc

# https://github.com/marketplace/actions/doxygen-action
- name: Build backend docs
uses: mattnotmitt/doxygen-action@v1
uses: mattnotmitt/doxygen-action@v1.9.4
with:
working-directory: 'dpnp/backend/doc'

- name: Copy backend docs
run: cp -r dpnp/backend/doc/html doc/_build/html/backend_doc

# https://github.com/marketplace/actions/github-pages-action
- name: Deploy docs
if: |
!github.event.pull_request.head.repo.fork &&
(github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ jobs:
conda-pkgs: '/home/runner/conda_pkgs_dir/'

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout DPNP repo
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -95,6 +100,11 @@ jobs:
conda-pkgs: 'C:\Users\runneradmin\conda_pkgs_dir\'

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout DPNP repo
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -422,7 +432,9 @@ jobs:
upload_linux:
needs: test_linux

if: ${{github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/')}}
if: |
!github.event.pull_request.head.repo.fork &&
(github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/'))

runs-on: ubuntu-latest

Expand Down Expand Up @@ -452,14 +464,16 @@ jobs:
run: conda install anaconda-client

- name: Upload
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2

upload_windows:
needs: test_windows

if: ${{github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/')}}
if: |
!github.event.pull_request.head.repo.fork &&
(github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/'))

runs-on: windows-latest

Expand Down Expand Up @@ -488,6 +502,6 @@ jobs:
run: conda install anaconda-client

- name: Upload
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ __pycache__/
# Code project files
.vscode

# Files from test of code coverage
coverage.xml

# Backup files kept after git merge/rebase
*.orig

*dpnp_backend*
dpnp/**/*.cpython*.so
dpnp/**/*.pyd
Expand Down
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# -- Project information -----------------------------------------------------

project = 'dpnp'
copyright = '2020, Intel'
copyright = '2020-2022, Intel'
author = 'Intel'

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

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
10 changes: 6 additions & 4 deletions doc/reference/fft.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ Helper routines
dpnp.fft.rfftfreq
dpnp.fft.fftshift
dpnp.fft.ifftshift
dpnp.fft.config.set_cufft_callbacks
dpnp.fft.config.set_cufft_gpus
dpnp.fft.config.get_plan_cache
dpnp.fft.config.show_plan_cache_info

.. fft.config module is not implemented yet
.. dpnp.fft.config.set_cufft_callbacks
.. dpnp.fft.config.set_cufft_gpus
.. dpnp.fft.config.get_plan_cache
.. dpnp.fft.config.show_plan_cache_info
2 changes: 1 addition & 1 deletion doc/reference/ndarray.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ For the basic concept of ``ndarray``\s, please refer to the `NumPy documentation
:nosignatures:

dpnp.ndarray
dpnp.dparray.dparray
dpnp.dpnp_array.dpnp_array
12 changes: 7 additions & 5 deletions doc/reference/polynomials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ Polynomial Module
:toctree: generated/
:nosignatures:

dpnp.polynomial.polynomial.polyvander
dpnp.polynomial.polynomial.polycompanion
.. polynomial module is not implemented yet
.. dpnp.polynomial.polynomial.polyvander
.. dpnp.polynomial.polynomial.polycompanion


Polyutils
Expand All @@ -24,9 +25,10 @@ Polyutils
:toctree: generated/
:nosignatures:

dpnp.polynomial.polyutils.as_series
dpnp.polynomial.polyutils.trimseq
dpnp.polynomial.polyutils.trimcoef
.. polyutils module is not implemented yet
.. dpnp.polynomial.polyutils.as_series
.. dpnp.polynomial.polyutils.trimseq
.. dpnp.polynomial.polyutils.trimcoef


Poly1d
Expand Down