Skip to content

Allow building Sphinx docs #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions jenkins/open-mpi-build-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ fi
# ./configure --help. In prep for 5.0, we added a developer
# requirement for pandoc to build (not required for dist tarballs),
# with an explicit option to disable.
# JMS: The requirement will shortly change from pandoc to Sphinx.
# Keep pandoc for now; when Sphinx is brought to the v5.0.x branch, we
Copy link
Member

Choose a reason for hiding this comment

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

We run CI tests on branches prior to 5.0.x, so we can't remove this block for some time. That said, it needs to change. I think the logic becomes:

  1. if no --disable-man-pages option to configure, do nothing. (this is a pre-pandoc build)
  2. if docs/requirements.txt exists, do nothing (this is a 5.0.x or later build, so configure will autoselct forward whether or not Sphinx is found).
  3. if pandoc is found, do nothing (this is a pandoc-era build, and we have pandoc)
  4. else, add --disable-man-pages to configure (this is a pandoc-era build, and we don't have pandoc, so we need to add a configure argument to let the build succeed).

# can delete this whole Pandoc-specific if/else block.
if `which pandoc > /dev/null 2>&1` ; then
echo "--> Found pandoc. Allowing default manpage behavior"
else
Expand Down
20 changes: 18 additions & 2 deletions jenkins/open-mpi.dist.create-tarball.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,25 @@ parallel (
node(manpage_builder) {
stage('Build Man Pages') {
checkout_code();
sh "ls -lR . ; /bin/bash ompi-scripts/jenkins/open-mpi.dist.create-tarball.build-manpages.sh ${build_prefix} ${tarball} ${branch}"
// JMS As of 8 Mar 2022, Open MPI master has been converted
// away from Pandoc to Sphinx. The difference in the source
// tree is that master has a Python-style
// docs/requirements.txt file. Meaning: if we see that file,
// then we don't have Pandoc, and there's no extra step needed
// to build HTML man pages.
//
// Once the Sphinx stuff has been brought to v5.0.x, Pandoc
// will be fully gone, and this whole Pandoc-specific
// build-manpages.sh stuff can be deleted.
sh """
if test ! -f docs/requirements.txt; then
ls -lR . ; /bin/bash ompi-scripts/jenkins/open-mpi.dist.create-tarball.build-manpages.sh ${build_prefix} ${tarball} ${branch}
fi
"""
artifacts = sh(returnStdout:true, script:'cat ${WORKSPACE}/manpage-build-artifacts.txt').trim()
currentBuild.description="${currentBuild.description}<b>Manpages:</b> <A HREF=\"${artifacts}\">${artifacts}</A><BR>\n"
if (artifacts != "") {
currentBuild.description="${currentBuild.description}<b>Manpages:</b> <A HREF=\"${artifacts}\">${artifacts}</A><BR>\n"
}
}
}
},
Expand Down