Skip to content

Commit

Permalink
Generate and upload PDF spec as part of Travis CI
Browse files Browse the repository at this point in the history
Not just HTML version.

Fixes #16
  • Loading branch information
antoninbas committed Jul 27, 2018
1 parent d306ed9 commit 35e2631
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ install:
# protoc), then we generate the HTML for the spec.
script:
- docker run -t p4runtime-ci /p4runtime/CI/compile_protos.sh /tmp/
- docker run -v `pwd`/docs/v1:/usr/src/p4-spec p4lang/madoko-debian:sid-with-fonts make html
- docker run -v `pwd`/docs/v1:/usr/src/p4-spec p4lang/madoko-debian:sid-with-fonts make

after_success:
- ls docs/v1/build
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ Git tags are used to mark minor and patch release versions.

## Reading the latest version of the documentation

The HTML for the latest version (working draft) of the P4Runtime v1
specification is available
[here](https://s3-us-west-2.amazonaws.com/p4runtime/docs/master/P4Runtime-Spec.html). It
is updated every time a new commit is pushed to the master branch.
The latest version of the P4Runtime v1 specification is available:
* [here](https://s3-us-west-2.amazonaws.com/p4runtime/docs/master/P4Runtime-Spec.html)
in **HTML** format
* [here](https://s3-us-west-2.amazonaws.com/p4runtime/docs/master/P4Runtime-Spec.pdf)
in **PDF** format

It is updated every time a new commit is pushed to the master branch.

## Overview
P4 is a language for programming the data plane of network devices. The
Expand Down
9 changes: 6 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,12 @@ Travis takes care of uploading the built HTML version of the spec to AWS S3. The
latest working draft (master branch) can be found
[here](https://s3-us-west-2.amazonaws.com/p4runtime/docs/master/P4Runtime-Spec.html).

Additionally, you can access the HTML version of the spec for any given branch
of this repository by using the following URL:
https://s3-us-west-2.amazonaws.com/p4runtime/travis/<your_branch_name>/P4Runtime-Spec.html.
Additionally, you can access the HTML & PDF versions of the spec for any given
branch of this repository by using the following URLs:
* `https://s3-us-west-2.amazonaws.com/p4runtime/travis/<your_branch_name>/P4Runtime-Spec.html`
for the **HTML** version
* `https://s3-us-west-2.amazonaws.com/p4runtime/travis/<your_branch_name>/P4Runtime-Spec.pdf`
for the **PDF** version

Unfortunately, because of how Travis encrypts environment variables (which are
required to upload documents to S3), this does not work for branches in forked
Expand Down

0 comments on commit 35e2631

Please sign in to comment.