|
3 | 3 | push:
|
4 | 4 | branches:
|
5 | 5 | - master
|
| 6 | + pull_request: |
6 | 7 |
|
7 | 8 | jobs:
|
8 | 9 | build-and-deploy:
|
9 | 10 | name: Build and Deploy Docs
|
| 11 | + |
10 | 12 | runs-on: ubuntu-20.04
|
| 13 | + |
| 14 | + defaults: |
| 15 | + run: |
| 16 | + shell: bash -l {0} |
| 17 | + |
| 18 | + env: |
| 19 | + python-ver: '3.9' |
| 20 | + |
11 | 21 | steps:
|
12 | 22 | - name: Cancel Previous Runs
|
13 |
| - uses: styfle/cancel-workflow-action@0.6.0 |
| 23 | + uses: styfle/cancel-workflow-action@0.11.0 |
14 | 24 | with:
|
15 | 25 | access_token: ${{ github.token }}
|
| 26 | + |
16 | 27 | - name: Install Intel repository
|
17 | 28 | run: |
|
18 | 29 | wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
|
19 | 30 | sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
|
20 | 31 | rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
|
21 | 32 | sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
|
22 | 33 | sudo apt-get update
|
| 34 | +
|
23 | 35 | - name: Update libstdc++-dev
|
24 | 36 | run: |
|
25 | 37 | sudo apt remove -y gcc-7 g++-7 gcc-8 g++-8 gcc-10 g++-10
|
26 | 38 | sudo apt remove -y libstdc++-10-dev
|
27 | 39 | sudo apt autoremove
|
28 | 40 | sudo apt install --reinstall -y gcc-9 g++-9 libstdc++-9-dev
|
| 41 | +
|
29 | 42 | - name: Install Intel OneAPI
|
30 | 43 | run: |
|
31 | 44 | sudo apt-get install intel-oneapi-mkl \
|
32 | 45 | intel-oneapi-mkl-devel \
|
33 | 46 | intel-oneapi-dpcpp-cpp-compiler
|
| 47 | +
|
34 | 48 | # https://github.com/marketplace/actions/checkout
|
35 | 49 | - name: Install nvidia-cuda support drivers
|
36 | 50 | run: |
|
37 | 51 | sudo add-apt-repository ppa:graphics-drivers/ppa
|
38 | 52 | sudo apt-get update
|
39 | 53 | sudo apt-get install -y libnvidia-gl-450
|
40 | 54 | sudo apt-get install -y nvidia-cuda-toolkit clinfo
|
| 55 | +
|
41 | 56 | - name: Checkout repo
|
42 |
| - uses: actions/checkout@v2 |
| 57 | + |
| 58 | + |
43 | 59 | # https://github.com/marketplace/actions/setup-miniconda
|
44 | 60 | - name: Setup miniconda
|
45 |
| - uses: conda-incubator/setup-miniconda@v2 |
| 61 | + uses: conda-incubator/setup-miniconda@v2.1.1 |
46 | 62 | 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 | + |
56 | 69 | - 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 | + |
60 | 72 | - name: Install dpnp dependencies
|
61 |
| - shell: bash -l {0} |
62 | 73 | 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 \ |
64 | 75 | -c dppy/label/dev -c intel -c conda-forge
|
| 76 | +
|
65 | 77 | - 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 |
67 | 81 | run: |
|
68 |
| - conda install -c conda-forge cupy cudatoolkit=10.0 |
| 82 | + conda info |
| 83 | + conda list |
| 84 | +
|
69 | 85 | - name: Build library
|
70 |
| - shell: bash -l {0} |
71 | 86 | run: |
|
72 | 87 | DPLROOT=/opt/intel/oneapi/dpl/latest python setup.py build_clib
|
73 | 88 | CC=dpcpp python setup.py build_ext --inplace
|
74 | 89 | python setup.py develop
|
| 90 | +
|
75 | 91 | - name: Build docs
|
76 |
| - shell: bash -l {0} |
77 |
| - run: | |
78 |
| - make html |
| 92 | + run: make html |
79 | 93 | working-directory: doc
|
| 94 | + |
80 | 95 | # https://github.com/marketplace/actions/doxygen-action
|
81 | 96 | - name: Build backend docs
|
82 |
| - uses: mattnotmitt/doxygen-action@v1 |
| 97 | + uses: mattnotmitt/doxygen-action@v1.9.4 |
83 | 98 | with:
|
84 | 99 | working-directory: 'dpnp/backend/doc'
|
| 100 | + |
85 | 101 | - name: Copy backend docs
|
86 | 102 | run: cp -r dpnp/backend/doc/html doc/_build/html/backend_doc
|
| 103 | + |
87 | 104 | # https://github.com/marketplace/actions/github-pages-action
|
88 | 105 | - name: Deploy docs
|
89 |
| - uses: peaceiris/actions-gh-pages@v3 |
| 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/')) |
| 109 | + |
90 | 110 | with:
|
91 | 111 | github_token: ${{ secrets.GITHUB_TOKEN }}
|
92 | 112 | publish_dir: doc/_build/html/
|
0 commit comments