[Skiboot] [PATCH] doc: travis-ci deploy docs!
Stewart Smith
stewart at linux.ibm.com
Mon Jun 24 15:53:22 AEST 2019
Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
.travis.yml | 11 +++++++++++
doc/ghpages-skeleton/index.html | 17 +++++++++++++++++
opal-ci/Dockerfile-docs | 5 +----
opal-ci/Dockerfile-fedora30 | 8 ++++++--
opal-ci/build-docs.sh | 19 +++++++++++++++++--
5 files changed, 52 insertions(+), 8 deletions(-)
create mode 100644 doc/ghpages-skeleton/index.html
mode change 100644 => 120000 opal-ci/Dockerfile-docs
mode change 100644 => 100755 opal-ci/build-docs.sh
diff --git a/.travis.yml b/.travis.yml
index cfc8c088f1ed..5a3226c22706 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,6 +17,7 @@ env:
- RUN_ON_CONTAINER=fedora-rawhide
- RUN_ON_CONTAINER=debian-stretch
- RUN_ON_CONTAINER=debian-unstable
+ - RUN_ON_CONTAINER=docs
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
@@ -31,6 +32,8 @@ matrix:
exclude:
- os: linux-ppc64le
env: RUN_ON_CONTAINER=centos7
+ - os: linux-ppc64le
+ env: RUN_ON_CONTAINER=docs
sudo: required
@@ -50,3 +53,11 @@ addons:
notification_email: stewart at linux.vnet.ibm.com
branch_pattern: coverity_scan
+deploy:
+ provider: pages
+ skip-cleanup: true
+ github-token: $GITHUB_TOKEN # set in travis-ci.org dashboard, marked secure
+ local_dir: "doc/_build/ghpages"
+ on:
+ branch: master
+ condition: "$RUN_ON_CONTAINER = docs"
diff --git a/doc/ghpages-skeleton/index.html b/doc/ghpages-skeleton/index.html
new file mode 100644
index 000000000000..ea5ed8ab927b
--- /dev/null
+++ b/doc/ghpages-skeleton/index.html
@@ -0,0 +1,17 @@
+<html>
+<head>
+<title>Skiboot: low level firmware for POWER</title>
+</head>
+<body>
+<h1>Skiboot: low level firmware for POWER</h1>
+<h2>Mailing list</h2>
+<p><a href="https://lists.ozlabs.org/listinfo/skiboot">skiboot mailing list</a> for discussions on development.</p>
+<h2>Patchwork</h2>
+<p><a href="http://patchwork.ozlabs.org/project/skiboot/list/">skiboot patchwork</a></p>
+<h2>Developer resources</h2>
+<ul>
+<li><a href="doc/index.html">Skiboot Documentation</a></li>
+<li><a href="coverage-report/">gcov coverage report for unittests</a></li>
+</ul>
+</body>
+</html>
diff --git a/opal-ci/Dockerfile-docs b/opal-ci/Dockerfile-docs
deleted file mode 100644
index 4e5f2d8f7e82..000000000000
--- a/opal-ci/Dockerfile-docs
+++ /dev/null
@@ -1,4 +0,0 @@
-FROM fedora:27
-RUN dnf -y install wget curl xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel ccache dtc openssl-devel
-COPY . /build/
-WORKDIR /build
diff --git a/opal-ci/Dockerfile-docs b/opal-ci/Dockerfile-docs
new file mode 120000
index 000000000000..900b2e80f888
--- /dev/null
+++ b/opal-ci/Dockerfile-docs
@@ -0,0 +1 @@
+Dockerfile-fedora30
\ No newline at end of file
diff --git a/opal-ci/Dockerfile-fedora30 b/opal-ci/Dockerfile-fedora30
index cd6b064184e7..17ba79bc952a 100644
--- a/opal-ci/Dockerfile-fedora30
+++ b/opal-ci/Dockerfile-fedora30
@@ -1,6 +1,10 @@
FROM fedora:30
-RUN dnf -y install --allowerasing wget curl xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel ccache dtc openssl-devel
-RUN dnf -y install gcc-powerpc64-linux-gnu
+RUN dnf -y update
+RUN dnf -y install --allowerasing wget curl xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel ccache dtc openssl-devel gcc-powerpc64-linux-gnu
+# for building documentation
+RUN dnf -y install python-pip
+# for GCOV coverage reports (need testing due to https://bugzilla.redhat.com/show_bug.cgi?id=1668843 )
+RUN dnf -y install lcov --enablerepo=updates-testing
# below packages are for building dtc
RUN dnf -y install flex bison
RUN if [ `arch` = "x86_64" ]; then dnf -y install http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0.f22.x86_64.rpm; fi
diff --git a/opal-ci/build-docs.sh b/opal-ci/build-docs.sh
old mode 100644
new mode 100755
index 817773bf3172..e7cc87c9b503
--- a/opal-ci/build-docs.sh
+++ b/opal-ci/build-docs.sh
@@ -4,5 +4,20 @@ set -uo pipefail
set -e
set -vx
-cd doc;
-make html latexpdf text
+MAKE_J=$(grep -c processor /proc/cpuinfo)
+export CROSS="ccache powerpc64-linux-gnu-"
+
+# There's a bug in dtc v1.4.7 packaged on fedora 28 that makes our device tree
+# tests fail, so for the moment, build a slightly older DTC
+git clone --depth=1 -b v1.4.4 https://git.kernel.org/pub/scm/utils/dtc/dtc.git
+(cd dtc; make -j${MAKE_J})
+export PATH=`pwd`/dtc:$PATH
+
+make -j${MAKE_J} SKIBOOT_GCOV=1 coverage-report
+
+pip install -r doc/requirements.txt
+(cd doc; make html)
+
+cp -r doc/ghpages-skeleton doc/_build/ghpages
+mv coverage-report doc/_build/ghpages/
+mv doc/_build/html doc/_build/ghpages/doc
--
2.21.0
More information about the Skiboot
mailing list