Skip to content

[SYCL] Enable doc generation via GitHub Pages #1168

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 7 commits into from
Feb 26, 2020
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
43 changes: 43 additions & 0 deletions .github/workflows/gh_pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Generate Doxygen documentation

on:
schedule:
- cron: 0 1 * * *

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: sycl
path: repo
- uses: actions/checkout@v2
with:
repository: intel/llvm-docs
path: docs
- name: Install deps
run: sudo apt-get install -y doxygen graphviz ssh
- name: Build Docs
run: |
mkdir -p $GITHUB_WORKSPACE/build
cd $GITHUB_WORKSPACE/build
python $GITHUB_WORKSPACE/repo/buildbot/configure.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/repo -o $GITHUB_WORKSPACE/build -t Release --docs
cmake --build . --target doxygen-sycl
- name: Deploy
env:
SSH_KEY: ${{secrets.ACTIONS_DEPLOY_KEY}}
run: |
mkdir -p ~/.ssh
echo "$SSH_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
eval "$(ssh-agent -s)"
ssh-add -k ~/.ssh/id_rsa
cd $GITHUB_WORKSPACE/docs
yes | \cp -rf $GITHUB_WORKSPACE/build/tools/sycl/doc/doxygen/html/* .
git config --global user.name "iclsrc"
git config --global user.email "[email protected]"
git add .
git diff-index --quiet HEAD || git commit -m "Update docs" -s
git push
6 changes: 6 additions & 0 deletions buildbot/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def do_configure(args):
libclc_targets_to_build = ''
sycl_build_pi_cuda = 'OFF'
llvm_enable_assertions = 'ON'
llvm_enable_doxygen = 'OFF'

if platform.system() == 'Linux':
icd_loader_lib = os.path.join(icd_loader_lib, "libOpenCL.so")
Expand All @@ -32,6 +33,9 @@ def do_configure(args):
if args.assertions:
llvm_enable_assertions = 'ON'

if args.docs:
llvm_enable_doxygen = 'ON'

install_dir = os.path.join(args.obj_dir, "install")

cmake_cmd = [
Expand All @@ -52,6 +56,7 @@ def do_configure(args):
"-DSYCL_ENABLE_WERROR=ON",
"-DCMAKE_INSTALL_PREFIX={}".format(install_dir),
"-DSYCL_INCLUDE_TESTS=ON", # Explicitly include all kinds of SYCL tests.
"-DLLVM_ENABLE_DOXYGEN={}".format(llvm_enable_doxygen),
llvm_dir
]

Expand Down Expand Up @@ -84,6 +89,7 @@ def main():
metavar="BUILD_TYPE", required=True, help="build type, debug or release")
parser.add_argument("--cuda", action='store_true', help="switch from OpenCL to CUDA")
parser.add_argument("--assertions", action='store_true', help="build with assertions")
parser.add_argument("--docs", action='store_true', help="build Doxygen documentation")

args = parser.parse_args()

Expand Down