name: rocprofiler-sdk Documentation on: workflow_dispatch: push: branches: - develop paths: - 'projects/rocprofiler-sdk/*.md' - 'projects/rocprofiler-sdk/VERSION' - 'projects/rocprofiler-sdk/source/docs/**' - 'projects/rocprofiler-sdk/source/scripts/update-docs.sh' - 'projects/rocprofiler-sdk/source/include/rocprofiler-sdk/**' - 'projects/rocprofiler-sdk/.github/workflows/docs.yml' - '.github/workflows/rocprofiler-sdk-docs.yml' - '.github/actions/rocprofiler-sdk-util/action.yml' - '.github/actions/rocprofiler-sdk-util/resolve-ci-config/**' pull_request: paths: - 'projects/rocprofiler-sdk/*.md' - 'projects/rocprofiler-sdk/VERSION' - 'projects/rocprofiler-sdk/source/docs/**' - 'projects/rocprofiler-sdk/source/scripts/update-docs.sh' - 'projects/rocprofiler-sdk/source/include/rocprofiler-sdk/**' - 'projects/rocprofiler-sdk/.github/workflows/docs.yml' - '.github/workflows/rocprofiler-sdk-docs.yml' - '.github/actions/rocprofiler-sdk-util/action.yml' - '.github/actions/rocprofiler-sdk-util/resolve-ci-config/**' concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true env: GIT_DISCOVERY_ACROSS_FILESYSTEM: 1 ROCM_PATH: "/opt/rocm" ENABLE_ROCR_BUILD: "true" ENABLE_HIP_CLR_BUILD: "true" ENABLE_ROCPROFILER_REGISTER_BUILD: "false" ENABLE_AQLPROFILE_BUILD: "false" SUBMODULE_PATHS: "projects/rocprofiler-sdk projects/rocr-runtime projects/clr projects/hip" jobs: ci_config: if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork }} name: Load CI config runs-on: ubuntu-latest permissions: contents: read outputs: gfx94x_runner: ${{ steps.runner.outputs.gfx94x_runner }} gfx94x_sandbox_runner: ${{ steps.runner.outputs.gfx94x_sandbox_runner }} steps: - name: Checkout workflow actions uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: sparse-checkout: .github/actions/rocprofiler-sdk-util/resolve-ci-config set-safe-directory: true - name: Resolve runner labels id: runner uses: ./.github/actions/rocprofiler-sdk-util/resolve-ci-config build-docs: runs-on: ubuntu-latest container: continuumio/miniconda3 permissions: contents: read pages: write id-token: write steps: - name: Checkout uses: actions/checkout@v6 with: sparse-checkout: projects/rocprofiler-sdk submodules: false set-safe-directory: true - name: Init/Update submodules run: | git config --global --add safe.directory '*' git submodule update --init --recursive --jobs 16 -- ${SUBMODULE_PATHS} - name: Create Docs Directory run: | git config --global --add safe.directory '*' git config --global --add safe.directory ${GITHUB_WORKSPACE} mkdir -p projects/rocprofiler-sdk/docs/_doxygen/rocprofiler-sdk mkdir -p projects/rocprofiler-sdk/docs/_doxygen/roctx - name: Install documentation dependencies timeout-minutes: 10 shell: bash run: | apt-get update apt-get install -y doxygen graphviz build-essential cmake - name: Build Docs shell: bash -el {0} working-directory: projects/rocprofiler-sdk/source/docs run: | git config --global --add safe.directory '*' git config --global --add safe.directory ${GITHUB_WORKSPACE} conda init conda env create -n rocprofiler-docs -f environment.yml conda activate rocprofiler-docs python3 -m pip install sphinx python3 -m pip install doxysphinx rocm-docs-core ../scripts/update-docs.sh build-docs-from-source: if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork }} needs: ci_config runs-on: ${{ needs.ci_config.outputs.gfx94x_runner }} container: image: docker.io/rocm/rocprofiler-private:ubuntu-22.04-gfx94X-latest credentials: username: ${{ secrets.ROCPROFILER_AZURE_CI_USER }} password: ${{ secrets.ROCPROFILER_AZURE_CI_PASS }} env: DEBIAN_FRONTEND: noninteractive options: --privileged env: GIT_DISCOVERY_ACROSS_FILESYSTEM: 1 CORE_EXT_RUNNER: mi325 GPU_RUNNER: mi325 steps: - name: Install os essentials timeout-minutes: 10 shell: bash run: | apt update apt install -y software-properties-common apt-add-repository ppa:git-core/ppa apt-get update apt-get install -y git echo "PATH=/usr/bin:$PATH" >> "$GITHUB_ENV" - name: Clone ROCProfiler SDK & HIP/CLR & ROCR-Runtime uses: actions/checkout@v6 with: sparse-checkout: | .github/actions/rocprofiler-sdk-util projects/rocprofiler-sdk projects/rocr-runtime projects/clr projects/hip submodules: false set-safe-directory: true - name: Configure safe directory run: | git config --system --add safe.directory '*' - name: Init/Update submodules run: git submodule update --init --recursive --jobs 16 -- ${SUBMODULE_PATHS} - name: Setup shell: bash run: | git config --global --add safe.directory '*' rm -rf /usr/local/bin/git ln -s /usr/bin/git /usr/local/bin/git git --version - name: Create Docs Directory shell: bash working-directory: projects/rocprofiler-sdk/ run: | git config --global --add safe.directory '*' git config --global --add safe.directory ${GITHUB_WORKSPACE} mkdir -p source/docs/_doxygen/rocprofiler-sdk mkdir -p source/docs/_doxygen/roctx - name: Install requirements timeout-minutes: 10 shell: bash working-directory: projects/rocprofiler-sdk/ run: | apt-get update apt-get install -y cmake gcc g++ libdw-dev libsqlite3-dev rpm python3 -m pip install -r requirements.txt - name: Build ROCProfiler SDK Dependencies uses: ./.github/actions/rocprofiler-sdk-util with: rocm-path: ${{ env.ROCM_PATH }} gpu-target: 'gfx94X' compiler-launcher: /usr/bin/ccache enable-rocr-build: ${{ env.ENABLE_ROCR_BUILD }} enable-hip-clr-build: ${{ env.ENABLE_HIP_CLR_BUILD }} enable-rocprofiler-register-build: ${{ env.ENABLE_ROCPROFILER_REGISTER_BUILD }} enable-aqlprofile-build: ${{ env.ENABLE_AQLPROFILE_BUILD }} ccache-key: ccache-docs-ubuntu-22.04-gfx94X ccache-variant: ccache - name: Configure, Build, Install, and Package timeout-minutes: 60 shell: bash working-directory: projects/rocprofiler-sdk/ run: | 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