Skip to content

Commit d15180a

Browse files
authored
list_components publishing to GitHub Pages (#37)
1 parent 5300ef9 commit d15180a

30 files changed

+397
-24
lines changed

.github/workflows/list_components.yml

Lines changed: 132 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,59 +31,95 @@ jobs:
3131
shell: bash
3232
steps:
3333
- uses: actions/checkout@v2
34+
- uses: actions/setup-python@v2
35+
with:
36+
python-version: '3.x'
3437
- name: Intel® oneAPI Base Toolkit
35-
run: scripts/list_components_windows.bat $WINDOWS_BASEKIT_URL
38+
run: scripts/list_components_windows.bat $WINDOWS_BASEKIT_URL doc\\source\\${{ github.workflow }}\\${{ github.job }}_basekit.txt
3639
- name: Intel® oneAPI HPC Toolkit
37-
run: scripts/list_components_windows.bat $WINDOWS_HPCKIT_URL
40+
run: scripts/list_components_windows.bat $WINDOWS_HPCKIT_URL doc\\source\\${{ github.workflow }}\\${{ github.job }}_hpckit.txt
3841
- name: Intel® oneAPI IoT Toolkit
39-
run: scripts/list_components_windows.bat $WINDOWS_IOTKIT_URL
42+
run: scripts/list_components_windows.bat $WINDOWS_IOTKIT_URL doc\\source\\${{ github.workflow }}\\${{ github.job }}_iotkit.txt
4043
- name: Intel® oneAPI Rendering Toolkit
41-
run: scripts/list_components_windows.bat $WINDOWS_RENDERKIT_URL
44+
run: scripts/list_components_windows.bat $WINDOWS_RENDERKIT_URL doc\\source\\${{ github.workflow }}\\${{ github.job }}_renderkit.txt
45+
46+
- name: Upload artifacts
47+
uses: actions/upload-artifact@v2
48+
with:
49+
name: ${{ github.job }}
50+
path: doc/source/${{ github.workflow }}/${{ github.job }}_*
4251

4352
linux:
44-
runs-on: ubuntu-latest
53+
runs-on: ubuntu-20.04
4554
defaults:
4655
run:
4756
shell: bash
4857
steps:
4958
- uses: actions/checkout@v2
59+
- uses: actions/setup-python@v2
60+
with:
61+
python-version: '3.x'
5062
- name: Intel® oneAPI Base Toolkit
51-
run: scripts/list_components_linux.sh $LINUX_BASEKIT_URL
63+
run: scripts/list_components_linux.sh $LINUX_BASEKIT_URL doc/source/${{ github.workflow }}/${{ github.job }}_basekit.txt
5264
- name: Intel® oneAPI HPC Toolkit
53-
run: scripts/list_components_linux.sh $LINUX_HPCKIT_URL
65+
run: scripts/list_components_linux.sh $LINUX_HPCKIT_URL doc/source/${{ github.workflow }}/${{ github.job }}_hpckit.txt
5466
- name: Intel® oneAPI IoT Toolkit
55-
run: scripts/list_components_linux.sh $LINUX_IOTKIT_URL
67+
run: scripts/list_components_linux.sh $LINUX_IOTKIT_URL doc/source/${{ github.workflow }}/${{ github.job }}_iotkit.txt
5668
- name: Intel® AI Analytics Toolkit
57-
run: scripts/list_components_linux.sh $LINUX_AIKIT_URL
69+
run: scripts/list_components_linux.sh $LINUX_AIKIT_URL doc/source/${{ github.workflow }}/${{ github.job }}_aikit.txt
5870
- name: Intel® oneAPI DL Framework Developer Toolkit
59-
run: scripts/list_components_linux.sh $LINUX_DLFDKIT_URL
71+
run: scripts/list_components_linux.sh $LINUX_DLFDKIT_URL doc/source/${{ github.workflow }}/${{ github.job }}_dlfdkit.txt
6072
- name: Intel® oneAPI Rendering Toolkit
61-
run: scripts/list_components_linux.sh $LINUX_RENDERKIT_URL
73+
run: scripts/list_components_linux.sh $LINUX_RENDERKIT_URL doc/source/${{ github.workflow }}/${{ github.job }}_renderkit.txt
74+
75+
- name: Upload artifacts
76+
uses: actions/upload-artifact@v2
77+
with:
78+
name: ${{ github.job }}
79+
path: doc/source/${{ github.workflow }}/${{ github.job }}_*
6280

6381
linux_apt:
64-
runs-on: ubuntu-latest
82+
runs-on: ubuntu-20.04
6583
defaults:
6684
run:
6785
shell: bash
6886
steps:
6987
- uses: actions/checkout@v2
88+
- uses: actions/setup-python@v2
89+
with:
90+
python-version: '3.x'
7091
- name: setup apt repo
7192
run: scripts/setup_apt_repo_linux.sh
7293
- name: Intel® oneAPI packages provided in APT repository
73-
run: scripts/list_components_linux_apt.sh
94+
run: scripts/list_components_linux_apt.sh doc/source/${{ github.workflow }}/${{ github.job }}.txt
95+
96+
- name: Upload artifacts
97+
uses: actions/upload-artifact@v2
98+
with:
99+
name: ${{ github.job }}
100+
path: doc/source/${{ github.workflow }}/${{ github.job }}.txt
74101

75102
linux_yum_dnf:
76-
runs-on: ubuntu-latest
103+
runs-on: ubuntu-20.04
77104
container: fedora
78105
defaults:
79106
run:
80107
shell: bash
81108
steps:
82109
- uses: actions/checkout@v2
110+
- uses: actions/setup-python@v2
111+
with:
112+
python-version: '3.x'
83113
- name: setup yum/dnf repo
84114
run: scripts/setup_yum_dnf_repo_linux.sh
85115
- name: Intel® oneAPI packages provided in YUM/DNF repository
86-
run: scripts/list_components_linux_dnf.sh
116+
run: scripts/list_components_linux_dnf.sh doc/source/${{ github.workflow }}/${{ github.job }}.txt
117+
118+
- name: Upload artifacts
119+
uses: actions/upload-artifact@v2
120+
with:
121+
name: ${{ github.job }}
122+
path: doc/source/${{ github.workflow }}/${{ github.job }}.txt
87123

88124
macos:
89125
runs-on: macos-latest
@@ -92,9 +128,87 @@ jobs:
92128
shell: bash
93129
steps:
94130
- uses: actions/checkout@v2
131+
- uses: actions/setup-python@v2
132+
with:
133+
python-version: '3.x'
95134
- name: Intel® oneAPI Base Toolkit
96-
run: scripts/list_components_macos.sh $MACOS_BASEKIT_URL
135+
run: scripts/list_components_macos.sh $MACOS_BASEKIT_URL doc/source/${{ github.workflow }}/${{ github.job }}_basekit.txt
97136
- name: Intel® oneAPI HPC Toolkit
98-
run: scripts/list_components_macos.sh $MACOS_HPCKIT_URL
137+
run: scripts/list_components_macos.sh $MACOS_HPCKIT_URL doc/source/${{ github.workflow }}/${{ github.job }}_hpckit.txt
99138
- name: Intel® oneAPI Rendering Toolkit
100-
run: scripts/list_components_macos.sh $MACOS_RENDERKIT_URL
139+
run: scripts/list_components_macos.sh $MACOS_RENDERKIT_URL doc/source/${{ github.workflow }}/${{ github.job }}_renderkit.txt
140+
141+
- name: Upload artifacts
142+
uses: actions/upload-artifact@v2
143+
with:
144+
name: ${{ github.job }}
145+
path: doc/source/${{ github.workflow }}/${{ github.job }}_*
146+
147+
publish:
148+
runs-on: ubuntu-20.04
149+
needs: [windows, linux, linux_apt, linux_yum_dnf, macos]
150+
defaults:
151+
run:
152+
shell: bash
153+
working-directory: doc
154+
steps:
155+
- uses: actions/checkout@v2
156+
- name: Download artifacts - windows
157+
uses: actions/download-artifact@v2
158+
with:
159+
name: windows
160+
path: doc/source/${{ github.workflow }}
161+
- name: Download artifacts - linux
162+
uses: actions/download-artifact@v2
163+
with:
164+
name: linux
165+
path: doc/source/${{ github.workflow }}
166+
- name: Download artifacts - linux_apt
167+
uses: actions/download-artifact@v2
168+
with:
169+
name: linux_apt
170+
path: doc/source/${{ github.workflow }}
171+
- name: Download artifacts - linux_yum_dnf
172+
uses: actions/download-artifact@v2
173+
with:
174+
name: linux_yum_dnf
175+
path: doc/source/${{ github.workflow }}
176+
- name: Download artifacts - macos
177+
uses: actions/download-artifact@v2
178+
with:
179+
name: macos
180+
path: doc/source/${{ github.workflow }}
181+
- uses: actions/setup-python@v2
182+
with:
183+
python-version: '3.x'
184+
- name: Install prerequisites
185+
run: python -m pip install --quiet -r requirements.txt
186+
- name: Build doc
187+
run: |
188+
find source/${{ github.workflow }} -type f -maxdepth 1 ! -name "*apt*" ! -name "*yum*" -exec sed -i -e 1,5d {} \;
189+
find source/${{ github.workflow }} -type f -maxdepth 1 -name "*windows*" -exec sed -i -e 1,2d {} \;
190+
sed -i -e 1,7d source/${{ github.workflow }}/linux_yum_dnf.txt
191+
make html
192+
- name: Save built doc as artifact
193+
uses: actions/upload-artifact@v2
194+
with:
195+
name: ${{ github.job }}
196+
path: doc/build
197+
- name: Checkout gh-pages
198+
if: ${{ github.ref == 'refs/heads/master' }}
199+
uses: actions/checkout@v2
200+
with:
201+
ref: gh-pages
202+
path: gh-pages
203+
- name: Publish to github pages
204+
if: ${{ github.ref == 'refs/heads/master' }}
205+
run: |
206+
cd ../gh-pages
207+
rm -rf *
208+
touch .nojekyll
209+
cp -r ../doc/build/html/* .
210+
git config user.name github-actions
211+
git config user.email [email protected]
212+
git add .
213+
git commit -m "Update from github actions"
214+
git push

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
*~
66
src/*.bin
77
src/*.out
8+
doc/build

.reuse/dep5

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: oneapi-ci
3+
Upstream-Contact: Maxim Zakharov <[email protected]>
4+
Source:
5+
6+
Files: doc/*
7+
Copyright: 2020 Intel Corporation
8+
License: CC-BY-4.0

doc/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

doc/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

doc/requirements.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-FileCopyrightText: 2020 Intel Corporation
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
reuse
6+
Sphinx
7+
sphinx-book-theme
8+
sphinxcontrib-spelling

doc/source/_static/favicons.png

467 Bytes
Loading
7.24 KB
Loading

doc/source/conf.py

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
# import os
14+
# import sys
15+
# sys.path.insert(0, os.path.abspath('.'))
16+
17+
18+
# -- Project information -----------------------------------------------------
19+
20+
project = 'Intel® oneAPI CI Samples'
21+
copyright = '2020 Intel Corporation'
22+
author = 'Intel Corporation'
23+
24+
25+
# -- General configuration ---------------------------------------------------
26+
27+
# Add any Sphinx extension module names here, as strings. They can be
28+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
29+
# ones.
30+
extensions = []
31+
32+
# Add any paths that contain templates here, relative to this directory.
33+
templates_path = ['_templates']
34+
35+
# List of patterns, relative to source directory, that match files and
36+
# directories to ignore when looking for source files.
37+
# This pattern also affects html_static_path and html_extra_path.
38+
exclude_patterns = []
39+
40+
41+
# -- Options for HTML output -------------------------------------------------
42+
43+
# The theme to use for HTML and HTML Help pages. See the documentation for
44+
# a list of builtin themes.
45+
#
46+
html_theme = 'sphinx_book_theme'
47+
html_title = "Intel® oneAPI CI Samples Documentation"
48+
html_logo = '_static/oneAPI-rgb-rev-100.png'
49+
html_favicon = '_static/favicons.png'
50+
51+
# The theme to use for HTML and HTML Help pages. See the documentation for
52+
# a list of builtin themes.
53+
#
54+
html_theme = 'sphinx_book_theme'
55+
56+
html_theme_options = {
57+
'repository_url': 'https://github.com/oneapi-src/oneapi-ci',
58+
'path_to_docs': 'doc/source',
59+
'use_issues_button': True,
60+
'use_edit_page_button': True,
61+
'repository_branch': 'master',
62+
}
63+
64+
# Add any paths that contain custom static files (such as style sheets) here,
65+
# relative to this directory. They are copied after the builtin static files,
66+
# so a file named "default.css" will overwrite the builtin "default.css".
67+
html_static_path = ['_static']

0 commit comments

Comments
 (0)