public inbox for [email protected]
help / color / mirror / Atom feedFrom: Justin Pryzby <[email protected]>
Subject: [PATCH 3/8] cirrus: upload changed html docs as artifacts
Date: Sat, 15 Jan 2022 11:27:28 -0600
Always run doc build; to allow them to be shown in cfbot, they should not be
skipped if the linux build fails.
This could be done on the client side (cfbot). One advantage of doing it here
is that fewer docs are uploaded - many patches won't upload docs at all.
https://cirrus-ci.com/task/5396696388599808
ci-os-only: linux
---
.cirrus.yml | 43 +++++++++++++++++++++++++++++++------------
1 file changed, 31 insertions(+), 12 deletions(-)
diff --git a/.cirrus.yml b/.cirrus.yml
index 2d023a31d2d..39021804cfa 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -455,10 +455,6 @@ task:
task:
name: CompilerWarnings
- # To limit unnecessary work only run this once the normal linux test succeeds
- depends_on:
- - Linux - Debian Bullseye
-
env:
CPUS: 4
BUILD_JOBS: 4
@@ -487,6 +483,13 @@ task:
clang -v
export
+ git remote -v
+ git branch -a
+ git remote add postgres https://github.com/postgres/postgres
+ time git fetch -v postgres master
+ git log -1 postgres/master
+ git diff --name-only postgres/master..
+
ccache_cache:
folder: $CCACHE_DIR
@@ -558,16 +561,32 @@ task:
###
# Verify docs can be built
###
- # XXX: Only do this if there have been changes in doc/ since last build
always:
docs_build_script: |
- time ./configure \
- --cache gcc.cache \
- CC="ccache gcc" \
- CXX="ccache g++" \
- CLANG="ccache clang"
- make -s -j${BUILD_JOBS} clean
- time make -s -j${BUILD_JOBS} -C doc
+ # Do nothing if the patch doesn't update doc:
+ git diff --name-only --cherry-pick --exit-code postgres/master... doc && exit
+
+ # Exercise HTML and other docs:
+ ./configure >/dev/null
+ make -s -C doc
+ cp -a doc new-docs
+
+ # Build HTML docs from the parent commit
+ git checkout postgres/master -- doc
+ make -s -C doc clean
+ make -s -C doc html
+ cp -a doc old-docs
+
+ # Copy HTML which differ into html_docs
+ mkdir html_docs
+ cp new-docs/src/sgml/html/*.css new-docs/src/sgml/html/*.svg html_docs/
+ for f in `git diff --no-index --name-only old-docs/src/sgml/html new-docs/src/sgml/html`
+ do
+ cp $f html_docs/
+ done
+
+ html_docs_artifacts:
+ paths: ['html_docs/**/*.html', 'html_docs/**/*.png', 'html_docs/**/*.css']
always:
upload_caches: ccache
--
2.17.1
--4e5ZDkbgLEOfWmLx
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0004-s-build-docs-as-a-separate-task.patch"
view thread (21+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [PATCH 3/8] cirrus: upload changed html docs as artifacts
In-Reply-To: <no-message-id-1860048@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox