-
Notifications
You must be signed in to change notification settings - Fork 37
Update allowed docs versions and add backfill workflow #2312
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
ndgrigorian
merged 6 commits into
master
from
update-allowed-docs-versions-and-add-backfill
May 22, 2026
+128
−0
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
16a805c
add more doc versions to backfill
ndgrigorian d1587ea
add workflow to backfill docs
ndgrigorian d4df188
add --no-deps in backfill workflow
ndgrigorian 73958e7
remove unnecessary gates on steps
ndgrigorian 0222078
apply review comments
ndgrigorian 4b87bc6
fix missed gate to Python setup
ndgrigorian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| name: Backfill documentation | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag: | ||
| description: 'Tag to backfill from' | ||
| required: true | ||
| type: string | ||
|
|
||
| permissions: read-all | ||
|
|
||
| env: | ||
| CHECK_CONFIG_SCRIPT: "import sys; from packaging.version import parse; print('true' if parse('0.17.0') <= parse(sys.argv[1]) < parse('0.22.0') else 'false')" | ||
|
|
||
| jobs: | ||
| build-and-backfill: | ||
| name: Build and Backfill Documentation | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 240 | ||
| permissions: | ||
| contents: write | ||
| actions: write | ||
| steps: | ||
| - name: Cancel Previous Runs | ||
| uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1 | ||
| with: | ||
| access_token: ${{ github.token }} | ||
| - name: Add Intel repository | ||
| run: | | ||
| wget -qO- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ | ||
| | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null | ||
| echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \ | ||
| | sudo tee /etc/apt/sources.list.d/oneAPI.list | ||
| sudo apt update | ||
| - name: Install Intel OneAPI | ||
| run: | | ||
| sudo apt install intel-oneapi-compiler-dpcpp-cpp | ||
| sudo apt install intel-oneapi-tbb | ||
| sudo apt install intel-oneapi-umf | ||
| sudo apt install hwloc | ||
| - name: Install Lua | ||
| run: | | ||
| sudo apt-get install liblua5.2-dev | ||
| - name: Install Doxygen | ||
| run: | | ||
| sudo apt-get install doxygen | ||
| - name: Install Ninja | ||
| run: | | ||
| sudo apt-get install ninja-build | ||
| - name: Setup Python | ||
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | ||
| with: | ||
| python-version: '3.14' | ||
| architecture: x64 | ||
| - name: Install sphinx dependencies | ||
| shell: bash -l {0} | ||
| run: | | ||
| pip install numpy cython setuptools">=70.1" scikit-build cmake sphinx"<7.2" pydot graphviz furo \ | ||
| sphinxcontrib-programoutput sphinxcontrib-googleanalytics sphinx-design \ | ||
| sphinxcontrib-jsmath sphinx-copybutton sphinxcontrib-spelling \ | ||
| versioneer[toml]==0.29 | ||
| - name: Checkout repo at tag | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| ref: ${{ github.event.inputs.tag }} | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
| - name: Inject new docs configuration | ||
| shell: bash -l {0} | ||
| run: | | ||
| NEEDS_CONFIG=$(python -c "${{ env.CHECK_CONFIG_SCRIPT }}" "${{ github.event.inputs.tag }}") | ||
|
|
||
| if [[ "${NEEDS_CONFIG}" == "true" ]]; then | ||
| git fetch origin master | ||
| git checkout origin/master -- docs/doc_sources/conf.py.in docs/doc_sources/_temples/versions.html docs/doc_versions.txt | ||
| else | ||
| echo "Version does not require docs config injection." | ||
| fi | ||
| - name: Build dpctl+docs | ||
| 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 build_ext --inplace --generator=Ninja --build-type=Release \ | ||
| -- \ | ||
| -DCMAKE_C_COMPILER:PATH="$(which icx)" \ | ||
| -DCMAKE_CXX_COMPILER:PATH="$(which icpx)" \ | ||
| -DDPCTL_GENERATE_DOCS=ON \ | ||
| -DDPCTL_ENABLE_DOXYREST=ON \ | ||
| -DDPCTL_USE_MULTIVERSION_TEMPLATE=ON \ | ||
| -DDoxyrest_DIR="$(pwd)/doxyrest-2.1.2-linux-amd64" \ | ||
| -DCMAKE_VERBOSE_MAKEFILE=ON | ||
| python -m pip install -e . --no-build-isolation --no-deps | ||
| python -c "import dpctl; print(dpctl.__version__)" || exit 1 | ||
| pushd "$(find _skbuild -name cmake-build)" || exit 1 | ||
| cmake --build . --target Sphinx || exit 1 | ||
| mv ../cmake-install/docs/docs ~/docs | ||
| git clean -dfx | ||
| popd | ||
| git reset --hard | ||
| - name: Publish docs | ||
|
ndgrigorian marked this conversation as resolved.
|
||
| env: | ||
| TAG: ${{ github.event.inputs.tag }} | ||
| 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 | ||
| [ -d "${TAG}" ] || mkdir "${TAG}" | ||
| rm -rf "${TAG:?}/*" | ||
| mv ~/docs/* "${TAG}/" || exit 1 | ||
| git add "${TAG}" | ||
| git config user.name 'github-actions[doc-deploy-bot]' | ||
| git config user.email 'github-actions[doc-deploy-bot]@users.noreply.github.com' | ||
| git commit -m "Docs backfilled for ${TAG}." | ||
| git push tokened_docs gh-pages | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,13 @@ | ||
| latest | ||
| 0.22.1 | ||
| 0.22.0 | ||
| 0.21.1 | ||
| 0.21.0 | ||
| 0.20.2 | ||
| 0.20.1 | ||
| 0.20.0 | ||
| 0.19.0 | ||
| 0.18.2 | ||
| 0.18.1 | ||
| 0.18.0 | ||
| 0.17.0 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.