Skip to content

Commit 34a3647

Browse files
Add action to build dpctl using oneAPI and generate docs
1 parent 5a5170b commit 34a3647

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/generate-docs.yml

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

0 commit comments

Comments
 (0)