|
| 1 | +name: Generate documentation |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - master |
| 6 | + |
| 7 | +jobs: |
| 8 | + build-and-deploy: |
| 9 | + name: Build and Deploy Documentation |
| 10 | + runs-on: ubuntu-20.04 |
| 11 | + steps: |
| 12 | + - name: Cancel Previous Runs |
| 13 | + uses: styfle/cancel-workflow-action@0.6.0 |
| 14 | + with: |
| 15 | + access_token: ${{ github.token }} |
| 16 | + - name: Add Intel repository |
| 17 | + run: | |
| 18 | + wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB |
| 19 | + sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB |
| 20 | + rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB |
| 21 | + sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" |
| 22 | + sudo apt-get update |
| 23 | + - name: Install Intel OneAPI |
| 24 | + run: | |
| 25 | + sudo apt-get install intel-oneapi-dpcpp-cpp-compiler |
| 26 | + - name: Install Lua |
| 27 | + run: | |
| 28 | + sudo apt-get install liblua5.2-dev |
| 29 | + - name: Setup miniconda |
| 30 | + uses: conda-incubator/setup-miniconda@v2 |
| 31 | + with: |
| 32 | + activate-environment: dpctl |
| 33 | + python-version: 3.7 |
| 34 | + auto-activate-base: false |
| 35 | + - name: Conda info |
| 36 | + shell: bash -l {0} |
| 37 | + run: | |
| 38 | + conda info |
| 39 | + conda list |
| 40 | + - name: Install sphinx dependencies |
| 41 | + shell: bash -l {0} |
| 42 | + run: | |
| 43 | + conda install -y -c conda-forge numpy cython sphinx sphinx_rtd_theme |
| 44 | + conda install -y -c conda-forge cmake=3.19 doxygen pydot setuptools make |
| 45 | + - name: Build dpctl & docs |
| 46 | + shell: bash -l {0} |
| 47 | + run: | |
| 48 | + source /opt/intel/oneapi/setvars.sh |
| 49 | + python setup.py develop |
| 50 | + cd docs |
| 51 | + mkdir -p build && cd build && rm -rf * |
| 52 | + wget https://github.com/vovkos/doxyrest/releases/download/doxyrest-2.1.2/doxyrest-2.1.2-linux-amd64 |
| 53 | + tar xf doxyrest-2.1.2-linux-amd64.* |
| 54 | + cmake .. -DDPCTL_ENABLE_DOXYREST=ON -DDoxyrest_DIR=`pwd`/doxyrest-2.1.2-linux-amd64 |
| 55 | + make Sphinx |
| 56 | + - name: Deploy docs |
| 57 | + uses: peaceiris/actions-gh-pages@v3 |
| 58 | + with: |
| 59 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 60 | + # publish_dir: doc/_build/html/ |
0 commit comments