Skip to content

Commit 110b14c

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

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

.github/workflows/generate-docs.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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 Level-Zero headers
28+
run: |
29+
sudo apt-get install -y gpg-agent wget
30+
wget -qO - https://repositories.intel.com/graphics/intel-graphics.key |
31+
sudo apt-key add -
32+
sudo apt-add-repository \
33+
'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main'
34+
sudo apt-get install level-zero level-zero-dev
35+
- name: Install Lua
36+
run: |
37+
sudo apt-get install liblua5.2-dev
38+
- name: Setup miniconda
39+
uses: conda-incubator/setup-miniconda@v2
40+
with:
41+
activate-environment: dpctl
42+
python-version: 3.7
43+
auto-activate-base: false
44+
- name: Conda info
45+
shell: bash -l {0}
46+
run: |
47+
conda info
48+
conda list
49+
- name: Install sphinx dependencies
50+
shell: bash -l {0}
51+
run: |
52+
conda install -y -c conda-forge numpy cython sphinx sphinx_rtd_theme
53+
conda install -y -c conda-forge cmake=3.19 doxygen pydot setuptools make
54+
- name: Checkout repo
55+
uses: actions/checkout@v2
56+
- name: Build dpctl & docs
57+
shell: bash -l {0}
58+
run: |
59+
source /opt/intel/oneapi/setvars.sh
60+
python setup.py develop
61+
cd docs
62+
mkdir -p build && cd build && rm -rf *
63+
wget https://github.com/vovkos/doxyrest/releases/download/doxyrest-2.1.2/doxyrest-2.1.2-linux-amd64.tar.xz
64+
tar xf doxyrest-2.1.2-linux-amd64.tar.xz
65+
cmake .. -DDPCTL_ENABLE_DOXYREST=ON -DDoxyrest_DIR=`pwd`/doxyrest-2.1.2-linux-amd64
66+
make Sphinx
67+
- name: Deploy docs
68+
uses: peaceiris/actions-gh-pages@v3
69+
with:
70+
github_token: ${{ secrets.GITHUB_TOKEN }}
71+
# publish_dir: doc/_build/html/

0 commit comments

Comments
 (0)