[commit: ghc] wip/jenkins: Handle documentation (9e36489)
git at git.haskell.org
git at git.haskell.org
Thu Jul 27 20:51:14 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/jenkins
Link : http://ghc.haskell.org/trac/ghc/changeset/9e36489a72e1820750375274c54f1e53284eb457/ghc
>---------------------------------------------------------------
commit 9e36489a72e1820750375274c54f1e53284eb457
Author: Ben Gamari <ben at smart-cactus.org>
Date: Tue May 30 01:46:06 2017 -0400
Handle documentation
>---------------------------------------------------------------
9e36489a72e1820750375274c54f1e53284eb457
Jenkinsfile | 46 +++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 45 insertions(+), 1 deletion(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 9420de6..4b7a9a5 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -12,7 +12,13 @@ properties(
parallel (
"linux x86-64" : {
- node(label: 'linux && amd64') {buildAndTestGhc(targetTriple: 'x86_64-linux-gnu')}
+ node(label: 'linux && amd64') {
+ buildAndTestGhc(targetTriple: 'x86_64-linux-gnu')
+ if (params.build_docs) {
+ updateReadTheDocs()
+ updateUsersGuide()
+ }
+ }
},
"linux x86-64 -> aarch64 unreg" : {
node(label: 'linux && amd64') {buildAndTestGhc(cross: true, targetTriple: 'aarch64-linux-gnu', unreg: true)}
@@ -194,3 +200,41 @@ def testGhc(params) {
}
}
}
+
+// Push update to ghc.readthedocs.org.
+// Expects to be sitting in a build source tree.
+def updateReadTheDocs() {
+ git clone 'git at github.com:bgamari/ghc-users-guide'
+ def commit = sh("git rev-parse HEAD", returnStdout=true)
+ sh """
+ export GHC_TREE=$(pwd)
+ cd ghc-users-guide
+ ./export.sh
+ git commit -a -m "Update to ghc commit ${commit}" || true
+ git push
+ """
+}
+
+// Push update to downloads.haskell.org/~ghc/master/doc.
+// Expects to be sitting in a configured source tree.
+def updateUsersGuide() {
+ sh """
+ $(makeCmd) html haddock EXTRA_HADDOCK_OPTS=--hyperlinked-sources
+
+ out="$(mktemp -d)"
+ mkdir -p $out/libraries
+ echo $out
+
+ cp -R docs/users_guide/build-html/users_guide $out/users-guide
+ for d in libraries/*; do
+ if [ ! -d $d/dist-install/doc ]; then continue; fi
+ mkdir -p $out/libraries/$(basename $d)
+ cp -R $d/dist-install/doc/*/* $out/libraries/$(basename $d)
+ done
+ cp -R libraries/*/dist-install/doc/* $out/libraries
+ chmod -R ugo+r $out
+
+ rsync -az $out/ downloads.haskell.org:public_html/master
+ rm -R $out
+ """
+}
More information about the ghc-commits
mailing list