-
Notifications
You must be signed in to change notification settings - Fork 100
Fix CI P4Runtime Spec #541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,8 +15,7 @@ jobs: | |
| run: | | ||
| make -C docs/tools/ | ||
| docker run -v `pwd`/docs/v1:/usr/src/p4-spec p4lang/p4rt-asciidoc make | ||
| ls docs/v1/P4Runtime-Spec.pdf | ||
| ls docs/v1/P4Runtime-Spec.html | ||
| ls docs/v1/build | ||
| - name: Upload spec to S3 if needed | ||
| if: ${{ github.actor != 'dependabot[bot]' }} | ||
| uses: jakejarvis/[email protected] | ||
|
|
@@ -27,5 +26,5 @@ jobs: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
| AWS_REGION: 'us-west-2' | ||
| SOURCE_DIR: 'docs/v1' | ||
| SOURCE_DIR: 'docs/v1/build' | ||
| DEST_DIR: ci/${{ github.ref_name }} # only runs for push events | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,8 +18,7 @@ jobs: | |
| run: | | ||
| make -C docs/tools/ | ||
| docker run -v `pwd`/docs/v1:/usr/src/p4-spec p4lang/p4rt-asciidoc make | ||
| ls docs/v1/P4Runtime-Spec.pdf | ||
| ls docs/v1/P4Runtime-Spec.html | ||
| ls docs/v1/build | ||
| - name: Upload spec to S3 | ||
| uses: jakejarvis/[email protected] | ||
| with: | ||
|
|
@@ -29,15 +28,14 @@ jobs: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
| AWS_REGION: 'us-west-2' | ||
| SOURCE_DIR: 'docs/v1' | ||
| SOURCE_DIR: 'docs/v1/build' | ||
| DEST_DIR: docs/main | ||
| - name: Prepare spec for upload to gh-pages | ||
| run: | | ||
| git checkout gh-pages | ||
| mkdir -p spec | ||
| rm -rf spec/main | ||
| cp docs/v1/P4Runtime-Spec.html spec/main | ||
| cp docs/v1/P4Runtime-Spec.pdf spec/main | ||
| cp -r docs/v1/build spec/main | ||
| - name: Upload spec to gh-pages | ||
| uses: EndBug/add-and-commit@v9 | ||
| with: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,8 +20,7 @@ jobs: | |
| run: | | ||
| make -C docs/tools/ | ||
| docker run -v `pwd`/docs/v1:/usr/src/p4-spec p4lang/p4rt-asciidoc make | ||
| ls docs/v1/P4Runtime-Spec.pdf | ||
| ls docs/v1/P4Runtime-Spec.html | ||
| ls docs/v1/build | ||
| - name: Upload spec to S3 | ||
| uses: jakejarvis/[email protected] | ||
| with: | ||
|
|
@@ -38,8 +37,7 @@ jobs: | |
| git checkout gh-pages | ||
| mkdir -p spec | ||
| rm -rf spec/$TAG | ||
| cp docs/v1/P4Runtime-Spec.html spec/$TAG | ||
| cp docs/v1/P4Runtime-Spec.pdf spec/$TAG | ||
| cp -r docs/v1/build spec/$TAG | ||
| - name: Upload spec to gh-pages | ||
| uses: EndBug/add-and-commit@v9 | ||
| with: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| # Emacs | ||
| *~ | ||
| docs/v1/build/ | ||
| .DS_Store | ||
| build | ||
| dist | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,22 +5,27 @@ ROUGE_CSS=style | |
|
|
||
| all: ${SPEC}.pdf ${SPEC}.html | ||
|
|
||
| folder: | ||
| mkdir -p build | ||
|
|
||
| build: | ||
|
|
||
| ${SPEC}.pdf: ${SPEC}.adoc images | ||
| ${SPEC}.pdf: ${SPEC}.adoc images folder | ||
| time asciidoctor-pdf -v \ | ||
| -a pdf-fontsdir=resources/fonts \ | ||
| -r asciidoctor-mathematical \ | ||
| -r asciidoctor-bibtex \ | ||
| -r asciidoctor-lists \ | ||
| -a rouge-style=$(ROUGE_STYLE) $< | ||
| -a rouge-style=$(ROUGE_STYLE) \ | ||
| -D build $< | ||
|
|
||
| ${SPEC}.html: ${SPEC}.adoc images | ||
| ${SPEC}.html: ${SPEC}.adoc images folder | ||
| time asciidoctor -v \ | ||
| -r asciidoctor-mathematical \ | ||
| -r asciidoctor-bibtex \ | ||
| -r asciidoctor-lists \ | ||
| -a rouge-css=$(ROUGE_CSS) $< | ||
| -a rouge-css=$(ROUGE_CSS) \ | ||
| -D build $< | ||
|
|
||
| images: | ||
| soffice --convert-to svg --outdir resources/figs resources/figs/*.odg > /dev/null 2>&1 | ||
|
|
@@ -29,4 +34,4 @@ images: | |
| build_spec_with_images: images all | ||
|
|
||
| clean: | ||
| /bin/rm -f ${SPEC}.pdf ${SPEC}.html | ||
| /bin/rm -rf build resources/figs/*.png | ||
|
||
Uh oh!
There was an error while loading. Please reload this page.