Skip to content

Commit

Permalink
Add Thrust Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wmaxey authored Oct 30, 2023
1 parent 1c9371a commit 1f8147f
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,23 @@ jobs:
source: ./docs
destination: ./_site

# Build libcudacxx docs
# Libcudacxx
- name: Build libcudacxx docs
uses: actions/jekyll-build-pages@v1
with:
source: ./libcudacxx/docs/jekyll
destination: ./_site/libcudacxx

# Thrust
- name: Build Thrust markdown in Docker
run: ./thrust/docs/build_doxygen.bash

- name: Build thrust docs
uses: actions/jekyll-build-pages@v1
with:
source: ./thrust/build_docs
destination: ./_site/thrust

- name: Upload artifact
uses: actions/upload-pages-artifact@v2

Expand Down
18 changes: 18 additions & 0 deletions thrust/docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM ubuntu:22.04

SHELL [ "/usr/bin/env", "/bin/bash", "-c" ]

ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1

RUN apt-get -y -qq update; \
apt-get -y -qq upgrade; \
apt-get -y -qq install doxygen unzip wget

RUN mkdir -p /opt/doxybook2; \
cd /opt/doxybook2; \
wget -q -O doxybook2.zip "https://github.com/matusnovak/doxybook2/releases/download/v1.5.0/doxybook2-linux-amd64-v1.5.0.zip"; \
unzip -xf doxybook2.zip

ENV PATH "$PATH:/opt/doxybook2/bin"

SHELL [ "/bin/bash" ]
24 changes: 24 additions & 0 deletions thrust/docs/docker_build_docs.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env sh

## This script will produce a 'build_docs' folder that contains a jekyll site containing all the Thrust docs
## This is used in CI to produce a site for Thrust under CCCL

set -ex

SCRIPT_PATH=$(cd $(dirname ${0}); pwd -P)
cd $SCRIPT_PATH

mkdir -p build
(
cd build
cp ../github_pages/Gemfile .
docker build -f ../Dockerfile -t thrust:docs .
)

cd $SCRIPT_PATH/..
(
docker run -it --rm \
--mount type=bind,src=$(pwd),dst=/cccl \
thrust:docs \
bash -c "/cccl/docs/generate_markdown.bash"
)
2 changes: 2 additions & 0 deletions thrust/docs/github_pages/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ search.heading_level: 4

incremental: true

baseurl: "cccl/thrust"

# just-the-docs ignores these filenames by default.
include: [ "contributing.md", "code_of_conduct.md" ]

Expand Down

0 comments on commit 1f8147f

Please sign in to comment.