Skip to content

docs: Migrate docs from xlnx-main#3087

Merged
pamolloy merged 1 commit intocifrom
cicd/philip/migrate-docs
Jan 26, 2026
Merged

docs: Migrate docs from xlnx-main#3087
pamolloy merged 1 commit intocifrom
cicd/philip/migrate-docs

Conversation

@pamolloy
Copy link
Copy Markdown
Collaborator

  • Migrate docs from Xilinx development branch
  • Document kernel versions that are available, upstream stable releases, how to pick a version, etc

@pamolloy pamolloy requested a review from gastmaier January 22, 2026 09:33
@gastmaier
Copy link
Copy Markdown
Collaborator

We re-use pages from the kernel Documentation/, what do you suggest? drop this approach? or make the CI fancy (e.g., aggregate from multiple branches)?

@gastmaier
Copy link
Copy Markdown
Collaborator

gastmaier commented Jan 22, 2026

On important thing is that sparce checkout does fetch all files at head, the only thing it does is to not put all at the current worktree.
So, if github default checkout I would say no to aggregate from multiple branches.
Still, we have the fancy cached-checkout to speed things up.

Or play with

https://api.github.com/repos/analogdevicesinc/linux/git/trees/main
# get sha for path 'Documentation', e.g.
https://api.github.com/repos/analogdevicesinc/linux/git/trees/99dd308027d28eb8e006f4fde949c9fbf4b28f19
# same for iio
https://api.github.com/repos/analogdevicesinc/linux/git/trees/6a15237a2487556e1e17002d2a984493d61167fc
# Yippie! enjoy your raw files! :)

And curl raw files


import requests

REPO = "analogdevicesinc/linux"
TARGET_PATH = "Documentation/iio"
BASE_URL = f"https://api.github.com/repos/{REPO}/git/trees"

def get_sha_for_path(tree_sha, path_segment):
    url = f"{BASE_URL}/{tree_sha}"
    response = requests.get(url).json()
    
    for item in response.get('tree', []):
        if item['path'] == path_segment:
            return item['sha']
    return None

current_sha = "main"

for segment in TARGET_PATH.split('/'):
    current_sha = get_sha_for_path(current_sha, segment)
    if not current_sha:
        print(f"Path segment '{segment}' not found.")
        exit()

final_tree_url = f"{BASE_URL}/{current_sha}"
files = requests.get(final_tree_url).json()

rst_files = [f for f in files['tree'] if f['path'].endswith('.rst')]

for f in rst_files:
    print(f"File: {f['path']} | SHA: {f['url']}")

then for a url

import requests
import base64

url = "https://api.github.com/repos/analogdevicesinc/linux/git/blobs/9a489a79d8f5a8682334266ab8c444eeddd51773"
response = requests.get(url).json()

file_content = base64.b64decode(response['content']).decode('utf-8')
print(file_content)

We can create a action like

    steps:
    - uses: analogdevicesinc/doctools/fetch-tree@action
        with:
          # what to fetch
          fetch: |
            Documentation/iio
            Documentation/other/path
          # write to
          path: /tmp/some/path

@nunojsa
Copy link
Copy Markdown
Collaborator

nunojsa commented Jan 22, 2026

The commit hash in the commit seems to reference the wrong commit...

or make the CI fancy (e.g., aggregate from multiple branches)?

Is there a real need for that? I would say not to overcomplicate things unless we really have too.

@nunojsa
Copy link
Copy Markdown
Collaborator

nunojsa commented Jan 22, 2026

Store ADI specific documentation for all product groups on the CI branch
rather than separately on each branch. This is also necessary for
products like ADSP that do not maintain a main development branch

Ok, I see now the point...

@@ -0,0 +1 @@
.. include:: ../../Documentation/iio/ad3552r.rst
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then, can you delete all files that include ../../Documentation?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's do the wipe first. and leave the 'aggregate' for a future pr

@pamolloy
Copy link
Copy Markdown
Collaborator Author

The commit hash in the commit seems to reference the wrong commit...

It is the latest commit on main?

https://github.com/analogdevicesinc/linux/commits/main/

@nunojsa
Copy link
Copy Markdown
Collaborator

nunojsa commented Jan 22, 2026

It is the latest commit on main?

Ahaha, I get now what you mean in the message 🤦‍♂️. But you do leave some room for false interpretation 😄

@pamolloy pamolloy force-pushed the cicd/philip/migrate-docs branch from 0eb430b to 2be4bee Compare January 23, 2026 08:29
@pamolloy
Copy link
Copy Markdown
Collaborator Author

Still plenty to do, but just pushed what I have so far about CVEs and stable versions. Found the last two quotes from the LWN article especially interesting.

2be4bee

@gastmaier
Copy link
Copy Markdown
Collaborator

Still plenty to do, but just pushed what I have so far about CVEs and stable versions. Found the last two quotes from the LWN article especially interesting.

2be4bee

Ok, but why not further prs adding more docs?

Copied from the latest commit on xlnx-main:

ed8775f

Signed-off-by: Philip Molloy <philip@philipmolloy.com>
@pamolloy pamolloy force-pushed the cicd/philip/migrate-docs branch from a0be1a5 to 823cb13 Compare January 23, 2026 14:00
@pamolloy pamolloy marked this pull request as ready for review January 26, 2026 09:45
@pamolloy pamolloy requested a review from gastmaier January 26, 2026 09:45
@pamolloy pamolloy merged commit 43d3f19 into ci Jan 26, 2026
3 checks passed
@pamolloy pamolloy deleted the cicd/philip/migrate-docs branch January 26, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants