[commit: ghc] wip/jenkins: Handle documentation (d0a53b6)
git at git.haskell.org
git at git.haskell.org
Sat Jun 17 13:49:59 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/jenkins
Link : http://ghc.haskell.org/trac/ghc/changeset/d0a53b6695d572e2014de552606e97963c050e6f/ghc
>---------------------------------------------------------------
commit d0a53b6695d572e2014de552606e97963c050e6f
Author: Ben Gamari <ben at smart-cactus.org>
Date: Tue May 30 01:46:06 2017 -0400
Handle documentation
>---------------------------------------------------------------
d0a53b6695d572e2014de552606e97963c050e6f
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