Skip to content

Commit 0b9f5e7

Browse files
i#2260 web: Finalize new automated web generation (#2408)
Fixes issues with the initial commit of the Action to generate the new web content: - Wrong path to runsuite_wrapper.pl - Add missing submodules - Add package.cmake copy of embedded docs - Add error checking for an empty glob - Fix install path for embedded docs Removes the old drmemory_docs generation step from the ci-package action. Issue: #2260
1 parent ddda8a1 commit 0b9f5e7

File tree

3 files changed

+32
-15
lines changed

3 files changed

+32
-15
lines changed

.github/workflows/ci-docs.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ jobs:
5353

5454
steps:
5555
- uses: actions/checkout@v2
56+
with:
57+
submodules: true
5658

5759
- name: Fetch Sources
5860
run: |
@@ -85,7 +87,7 @@ jobs:
8587
8688
- name: Build Docs
8789
working-directory: ${{ github.workspace }}
88-
run: ./suite/runsuite_wrapper.pl travis 64_only
90+
run: ./tests/runsuite_wrapper.pl travis 64_only
8991
env:
9092
CI_TARGET: package
9193
VERSION_NUMBER: ${{ steps.version.outputs.version_number }}
@@ -100,7 +102,7 @@ jobs:
100102

101103
- name: Deploy Embedded Docs
102104
run: |
103-
rsync -av --delete embed/html/ drmemory.github.io/docs/
105+
rsync -av --delete html_embed/ drmemory.github.io/docs/
104106
cd drmemory.github.io
105107
git config --local user.name "cronbuild"
106108
git config --local user.email "drmemory-devs@googlegroups.com"

.github/workflows/ci-package.yml

+2-11
Original file line numberDiff line numberDiff line change
@@ -92,24 +92,15 @@ jobs:
9292
env:
9393
CI_TARGET: package
9494
VERSION_NUMBER: ${{ steps.version.outputs.version_number }}
95-
DEPLOY_DOCS: yes
95+
# Docs are deployed separately in ci-docs.yml.
96+
DEPLOY_DOCS: no
9697

9798
- name: Upload Artifacts
9899
uses: actions/upload-artifact@v2
99100
with:
100101
name: linux-tarball
101102
path: DrMemory-Linux-${{ steps.version.outputs.version_number }}.tar.gz
102103

103-
- name: Deploy Docs
104-
uses: crazy-max/ghaction-github-pages@v2
105-
with:
106-
build_dir: html
107-
repo: DynamoRIO/drmemory_docs
108-
target_branch: master
109-
env:
110-
# We need a personal access token for write access to another repo.
111-
GH_PAT: ${{ secrets.DOCS_TOKEN }}
112-
113104
###########################################################################
114105
# Mac tarball with x86-64 build:
115106
osx:

package.cmake

+26-2
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,12 @@ if (NOT arg_sub_package)
222222
if (arg_copy_docs)
223223
# Prepare for copying the documentation to our Github Pages site by placing it
224224
# in a single fixed-name location with a .nojekyll file.
225-
message("Copying documentation into ${arg_outdir}/html")
225+
message("Copying standalone documentation into ${arg_outdir}/html")
226226
message("Looking for ${last_package_build_dir}/_CPack_Packages/*/*/DrMemory-*/drmemory/docs/html")
227227
file(GLOB allhtml "${last_package_build_dir}/_CPack_Packages/*/*/DrMemory-*/drmemory/docs/html")
228+
if (NOT allhtml)
229+
message(FATAL_ERROR "failed to find html docs dir")
230+
endif ()
228231
# If there's a source package we'll have multiple. Just take the first one.
229232
list(GET allhtml 0 html)
230233
if (EXISTS "${html}")
@@ -233,9 +236,30 @@ if (NOT arg_sub_package)
233236
${CMAKE_COMMAND} -E copy_directory ${html} "${arg_outdir}/html")
234237
# Create a .nojekyll file so Github Pages will display this as raw html.
235238
execute_process(COMMAND ${CMAKE_COMMAND} -E touch "${arg_outdir}/html/.nojekyll")
236-
message("Successully copied docs")
239+
message("Successully copied standalone docs")
237240
else ()
238241
message(FATAL_ERROR "failed to find html docs")
239242
endif ()
243+
244+
message("Copying embedded documentation into ${arg_outdir}/html_embed")
245+
message("Looking for ${last_package_build_dir}/_CPack_Packages/*/*/DrMemory-*/drmemory/docs_embed/html")
246+
file(GLOB allhtml "${last_package_build_dir}/_CPack_Packages/*/*/DrMemory-*/drmemory/docs_embed/html")
247+
if (NOT allhtml)
248+
message(FATAL_ERROR "failed to find embedded html docs dir")
249+
endif ()
250+
# If there's a source package we'll have multiple. Just take the first one.
251+
list(GET allhtml 0 html)
252+
if (EXISTS "${html}")
253+
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory
254+
"${arg_outdir}/html_embed")
255+
execute_process(COMMAND
256+
${CMAKE_COMMAND} -E copy_directory ${html} "${arg_outdir}/html_embed")
257+
# Create a .nojekyll file so Github Pages will display this as raw html.
258+
execute_process(COMMAND ${CMAKE_COMMAND} -E touch
259+
"${arg_outdir}/html_embed/.nojekyll")
260+
message("Successully copied embedded docs")
261+
else ()
262+
message(FATAL_ERROR "failed to find embedded html docs")
263+
endif ()
240264
endif ()
241265
endif ()

0 commit comments

Comments
 (0)