From 0e83f48cd556d47b9f23558250021d52c6ee59d8 Mon Sep 17 00:00:00 2001 From: "Jonathan R. Madsen" Date: Fri, 12 Apr 2024 14:55:13 -0500 Subject: [PATCH] Update docs workflow (#760) * Update docs workflow - Switch from s-weigand/setup-conda to conda-incubator/setup-miniconda * Update docs workflow - Update shell for steps using conda - Add build-docs-from-source job * Update docs workflow - fix run command for build-docs-from-source * Update docs workflow - fix run command for build-docs-from-source * Update docs workflow - configure, build, install, and package * Update continuous_integration.yml workflow - Disable building the docs in the core workflow --- .github/workflows/continuous_integration.yml | 2 +- .github/workflows/docs.yml | 43 +++++++++++++++++++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index e255a53769..e293b089f6 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -76,7 +76,7 @@ jobs: ${{ matrix.ci-flags }} -- -DROCPROFILER_DEP_ROCMCORE=ON - -DROCPROFILER_BUILD_DOCS=ON + -DROCPROFILER_BUILD_DOCS=OFF -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DCMAKE_INSTALL_PREFIX=/opt/rocprofiler-sdk -DCPACK_GENERATOR='DEB;RPM;TGZ' diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 32298a895a..fae6fa98d6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -41,17 +41,23 @@ jobs: with: submodules: true - name: Install Conda - uses: s-weigand/setup-conda@v1 + uses: conda-incubator/setup-miniconda@v3 + with: + miniconda-version: "latest" + auto-activate-base: true + activate-environment: "" - name: Setup Pages uses: actions/configure-pages@v5 - name: Create Docs Directory run: mkdir -p docs - name: Install Conda environment + shell: bash -el {0} working-directory: source/docs run: | conda env create -n rocprofiler-docs -f environment.yml - name: Build Docs + shell: bash -el {0} working-directory: source/docs run: | source activate @@ -77,3 +83,38 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 + + build-docs-from-source: + runs-on: rocprofiler-cluster-runner-set + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + + - 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: 30 + 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