Skip to content

Commit

Permalink
Fix doxygen run in jenkins
Browse files Browse the repository at this point in the history
Summary:
The buildables stash rule only stashes files beginning with `bazel_`.
As a result `run_doxygen` never exists in the docs runtime stage even though
the build deps stage might create it.
We are also checking for empty cc targets instead of non empty to determine
whether we should run doxygen.
Note that this has been broken since D6922 :(

This fixes both problems.

Test Plan: This diff should cause doxygen to run.

Reviewers: zasgar, oazizi, michelle

Reviewed By: oazizi

Signed-off-by: Vihang Mehta <vihang@pixielabs.ai>

Differential Revision: https://phab.corp.pixielabs.ai/D12635

GitOrigin-RevId: e0af41751a5cb426e2990675fff1846997be95d3
  • Loading branch information
vihangm authored and copybaranaut committed Dec 21, 2022
1 parent 99885ab commit daa4ab5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -918,10 +918,10 @@ builders['Lint & Docs'] = {
sh 'arc lint --trace'
}

if (shFileExists('run_doxygen')) {
if (shFileExists('bazel_run_doxygen')) {
def stashName = 'doxygen-docs'
container('pxbuild') {
sh 'doxygen'
sh 'LD_LIBRARY_PATH="" doxygen'
}
container('gcloud') {
stashOnGCS(stashName, 'docs/html')
Expand Down
8 changes: 4 additions & 4 deletions ci/bazel_build_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ done

targets=()
function compute_targets() {
if [ "${all_targets}" = "true" ]; then
if [[ "${all_targets}" = "true" ]]; then
targets=("//...")
return 0
fi
Expand Down Expand Up @@ -176,7 +176,7 @@ ${bazel_query} "${cc_tests} ${bpf_excludes}" > bazel_tests_gcc_opt 2>/dev/null
${bazel_query} "${cc_buildables} ${bpf_excludes} ${sanitizer_only}" > bazel_buildables_sanitizer 2>/dev/null
${bazel_query} "${cc_tests} ${bpf_excludes} ${sanitizer_only}" > bazel_tests_sanitizer 2>/dev/null

if [ "${run_bpf_targets}" = "true" ]; then
if [[ "${run_bpf_targets}" = "true" ]]; then
# BPF.
${bazel_query} "${bpf_buildables}" > bazel_buildables_bpf 2>/dev/null
${bazel_query} "${bpf_tests}" > bazel_tests_bpf 2>/dev/null
Expand Down Expand Up @@ -204,6 +204,6 @@ ${bazel_query} "${go_tests} ${go_xcompile_excludes}" > bazel_tests_go_race 2>/de

# Should we run doxygen?
bazel_cc_touched=$(${bazel_query} "${cc_buildables} union ${cc_tests}" 2>/dev/null)
if [ "${all_targets}" = "true" ] || [[ -z $bazel_cc_touched ]]; then
touch run_doxygen
if [[ "${all_targets}" = "true" || -n $bazel_cc_touched ]]; then
touch bazel_run_doxygen
fi

0 comments on commit daa4ab5

Please sign in to comment.