Dedicated kernels for in-place dpt.divide
and dpt.floor_divide
#3375
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate documentation | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [opened, synchronize, reopened, closed] | |
jobs: | |
build-and-deploy: | |
name: Build and Deploy Documentation | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.11.0 | |
with: | |
access_token: ${{ github.token }} | |
- name: Add Intel repository | |
if: ${{ !github.event.pull_request || github.event.action != 'closed' }} | |
run: | | |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | |
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | |
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | |
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" | |
sudo apt-get update | |
- name: Install Intel OneAPI | |
if: ${{ !github.event.pull_request || github.event.action != 'closed' }} | |
run: | | |
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp | |
- name: Install Lua | |
if: ${{ !github.event.pull_request || github.event.action != 'closed' }} | |
run: | | |
sudo apt-get install liblua5.2-dev | |
- name: Install Doxygen | |
if: ${{ !github.event.pull_request || github.event.action != 'closed' }} | |
run: | | |
sudo apt-get install doxygen | |
- name: Install Ninja | |
if: ${{ !github.event.pull_request || github.event.action != 'closed' }} | |
run: | | |
sudo apt-get install ninja-build | |
- name: Setup Python | |
if: ${{ !github.event.pull_request || github.event.action != 'closed' }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
architecture: x64 | |
- name: Install sphinx dependencies | |
if: ${{ !github.event.pull_request || github.event.action != 'closed' }} | |
shell: bash -l {0} | |
run: | | |
pip install numpy cython setuptools scikit-build cmake sphinx"<7.2" sphinx_rtd_theme pydot graphviz sphinxcontrib-programoutput sphinxcontrib-googleanalytics | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Build dpctl+docs | |
if: ${{ !github.event.pull_request || github.event.action != 'closed' }} | |
shell: bash -l {0} | |
run: | | |
# Ensure that SYCL libraries are on LD_LIBRARY_PATH | |
source /opt/intel/oneapi/setvars.sh | |
wget https://github.com/vovkos/doxyrest/releases/download/doxyrest-2.1.2/doxyrest-2.1.2-linux-amd64.tar.xz | |
tar xf doxyrest-2.1.2-linux-amd64.tar.xz | |
python setup.py develop -G Ninja --build-type=Release \ | |
-- \ | |
-DCMAKE_C_COMPILER:PATH=$(which icx) \ | |
-DCMAKE_CXX_COMPILER:PATH=$(which icpx) \ | |
-DDPCTL_GENERATE_DOCS=ON \ | |
-DDPCTL_ENABLE_DOXYREST=ON \ | |
-DDoxyrest_DIR=`pwd`/doxyrest-2.1.2-linux-amd64 | |
python -c "import dpctl; print(dpctl.__version__)" || exit 1 | |
cd "$(find _skbuild -name cmake-build)" || exit 1 | |
cmake --build . --target Sphinx || exit 1 | |
mv ../cmake-install/docs/docs ~/docs | |
git clean -dfx | |
- name: Publish docs | |
if: ${{ github.event.pull_request && !github.event.pull_request.head.repo.fork && github.ref == 'refs/heads/master' }} | |
shell: bash -l {0} | |
run: | | |
git remote add tokened_docs https://IntelPython:${{ secrets.GITHUB_TOKEN }}@github.com/IntelPython/dpctl.git | |
git fetch tokened_docs | |
git checkout --track tokened_docs/gh-pages | |
echo `pwd` | |
cd master | |
git rm -rf * | |
mv ~/docs/* . || exit 1 | |
git add . | |
git config --global user.name 'github-actions[doc-deploy-bot]' | |
git config --global user.email 'github-actions[doc-deploy-bot]@users.noreply.github.com' | |
git commit -m "Latest docs." | |
git push tokened_docs gh-pages | |
- name: Save built docs as an artifact | |
if: ${{ github.event.pull_request && github.event.pull_request.head.repo.fork && github.event.action != 'closed'}} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.PACKAGE_NAME }} rendered documentation | |
path: ~/docs | |
- name: Publish pull-request docs | |
if: ${{ github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action != 'closed' }} | |
env: | |
PR_NUM: ${{ github.event.number }} | |
shell: bash -l {0} | |
run: | | |
git remote add tokened_docs https://IntelPython:${{ secrets.GITHUB_TOKEN }}@github.com/IntelPython/dpctl.git | |
git fetch tokened_docs | |
git checkout --track tokened_docs/gh-pages | |
echo `pwd` | |
[ -d pulls/${PR_NUM} ] && git rm -rf pulls/${PR_NUM} | |
mkdir -p pulls/${PR_NUM} | |
cd pulls/${PR_NUM} | |
mv ~/docs/* . | |
git add . | |
git config --global user.name 'github-actions[doc-deploy-bot]' | |
git config --global user.email 'github-actions[doc-deploy-bot]@users.noreply.github.com' | |
git commit -m "Docs for pull request ${PR_NUM}" | |
git push tokened_docs gh-pages | |
- name: Unpublish pull-request docs | |
if: ${{ github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action == 'closed' }} | |
env: | |
PR_NUM: ${{ github.event.number }} | |
shell: bash -l {0} | |
run: | | |
git remote add tokened_docs https://IntelPython:${{ secrets.GITHUB_TOKEN }}@github.com/IntelPython/dpctl.git | |
git fetch tokened_docs | |
git checkout --track tokened_docs/gh-pages | |
echo `pwd` | |
ls | |
[ -d pulls ] && ls pulls && echo "This is pull/${PR_NUM}" | |
[ -d pulls/${PR_NUM} ] && git rm -rf pulls/${PR_NUM} | |
git config --global user.name 'github-actions[doc-deploy-bot]' | |
git config --global user.email 'github-actions[doc-deploy-bot]@users.noreply.github.com' | |
git commit -m "Removing docs for closed pull request ${PR_NUM}" | |
git push tokened_docs gh-pages | |
- name: Comment with URL to published pull-request docs | |
if: ${{ github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action != 'closed' }} | |
env: | |
PR_NUM: ${{ github.event.number }} | |
uses: mshick/add-pr-comment@v1 | |
with: | |
message: | | |
View rendered docs @ https://intelpython.github.io/dpctl/pulls/${{ env.PR_NUM }}/index.html | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
repo-token-user-login: 'github-actions[bot]' | |
- name: Comment with URL about removal of PR docs | |
if: ${{ github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action == 'closed' }} | |
env: | |
PR_NUM: ${{ github.event.number }} | |
uses: mshick/add-pr-comment@v1 | |
with: | |
message: | | |
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. :crossed_fingers: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
repo-token-user-login: 'github-actions[bot]' |