04ace57589
* Add roctx doc
* Add roctx doxyfile input
* Update links and toc
* Build doxysphinx for both doxygen files
* Update scripts
* Generate roctx doxygen files
* Change doxygen path
to allow for 2 doxyfiles
* Make doxygen dir for script
* Call make _doxygen dir with p flag
* Create _doxygen dir in workfllow
* Create doc dirs for doxygen
* Run update docs as sudo
* Fix typo in mkdir command
* Include graphviz for dot
* Install dot for docs CI
* Install dot as sudo due to permission denied
* Install doxygen via sudo
* Install doxysphinx
* Add postcheckout step to RTD to config and gen doxygen docs
* On RTD, update doxygen after creating env
* update docs.yml
* update docs.yml
* fixing build-docs-from-source
* Fixing build docs from source
* update docs.yml
* trying to fix readthedocs
* trying to fix readthedocs
* update docs.yml
* improve mainpage documentation
* update docs
* clang-format fix
---------
Co-authored-by: Sam Wu <22262939+samjwu@users.noreply.github.com>
Co-authored-by: Madsen, Jonathan <Jonathan.Madsen@amd.com>
[ROCm/rocprofiler-sdk commit: 73e7f8cfb1]
135 строки
4.0 KiB
YAML
135 строки
4.0 KiB
YAML
name: Documentation
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [ amd-staging, amd-mainline ]
|
|
paths:
|
|
- '*.md'
|
|
- 'VERSION'
|
|
- 'source/docs/**'
|
|
- 'source/scripts/update-docs.sh'
|
|
- 'source/include/rocprofiler-sdk/**'
|
|
- '.github/workflows/docs.yml'
|
|
pull_request:
|
|
paths:
|
|
- '*.md'
|
|
- 'VERSION'
|
|
- 'source/docs/**'
|
|
- 'source/scripts/update-docs.sh'
|
|
- 'source/include/rocprofiler-sdk/**'
|
|
- '.github/workflows/docs.yml'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
|
|
|
|
jobs:
|
|
build-docs:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- name: Install Conda
|
|
shell: bash -el {0}
|
|
run: |
|
|
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
|
|
bash ./Miniconda3-latest-Linux-x86_64.sh -b
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@v5
|
|
- name: Create Docs Directory
|
|
run:
|
|
mkdir -p docs/_doxygen/rocprofiler-sdk
|
|
mkdir -p docs/_doxygen/roctx
|
|
- name: Install Conda environment
|
|
shell: bash -el {0}
|
|
working-directory: source/docs
|
|
run: |
|
|
conda env create -n rocprofiler-docs -f environment.yml
|
|
- name: Install documentation dependencies
|
|
timeout-minutes: 10
|
|
shell: bash
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y doxygen graphviz
|
|
sudo python3 -m pip install sphinx
|
|
sudo python3 -m pip install doxysphinx rocm-docs-core
|
|
- name: Build Docs
|
|
shell: bash -el {0}
|
|
working-directory: source/docs
|
|
run: |
|
|
source /home/runner/.bashrc
|
|
export PATH=/home/runner/miniconda3/bin:$PATH
|
|
conda init
|
|
conda env create -n rocprofiler-docs -f environment.yml
|
|
source activate
|
|
conda activate rocprofiler-docs
|
|
sudo ../scripts/update-docs.sh
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: ./docs
|
|
|
|
deploy-docs:
|
|
if: github.ref == 'refs/heads/amd-mainline'
|
|
runs-on: ubuntu-latest
|
|
needs: build-docs
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|
|
|
|
build-docs-from-source:
|
|
runs-on: gpuless-emu-runner-set
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- name: Create Docs Directory
|
|
run:
|
|
mkdir -p source/docs/_doxygen/rocprofiler-sdk
|
|
mkdir -p source/docs/_doxygen/roctx
|
|
- name: Install requirements
|
|
timeout-minutes: 10
|
|
shell: bash
|
|
run: |
|
|
git config --global --add safe.directory '*'
|
|
apt-get update
|
|
apt-get install -y cmake gcc g++ libdw-dev
|
|
python3 -m pip install -r requirements.txt
|
|
|
|
- name: Configure, Build, Install, and Package
|
|
timeout-minutes: 60
|
|
shell: bash
|
|
run:
|
|
export CMAKE_PREFIX_PATH=/opt/rocm:${CMAKE_PREFIX_PATH};
|
|
cmake -B build
|
|
-DROCPROFILER_DEP_ROCMCORE=ON
|
|
-DROCPROFILER_BUILD_DOCS=ON
|
|
-DCMAKE_INSTALL_PREFIX=/opt/rocprofiler-sdk
|
|
-DCPACK_GENERATOR='DEB;RPM;TGZ'
|
|
-DCPACK_PACKAGING_INSTALL_PREFIX="$(realpath /opt/rocm)"
|
|
-DPython3_EXECUTABLE=$(which python3)
|
|
. &&
|
|
cmake --build build --target docs --parallel 4 &&
|
|
cmake --build build --target all --parallel 12 &&
|
|
cmake --build build --target install --parallel 12 &&
|
|
cmake --build build --target package --parallel 12
|