|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +# deploy artifacts to a directory, in preparation for GitHub deployment |
| 4 | + |
| 5 | +ROOT=$(dirname $(dirname $(realpath $BASH_SOURCE[0]))) |
| 6 | + |
| 7 | +DEPLOY_DIR="$ROOT/_site" |
| 8 | +PAGES_URL="https://riscv-software-src.github.io/riscv-unified-db" |
| 9 | + |
| 10 | +mkdir -p $DEPLOY_DIR |
| 11 | + |
| 12 | +echo "Create _site/example_cfg" |
| 13 | +mkdir -p $DEPLOY_DIR/example_cfg |
| 14 | + |
| 15 | +echo "Create _site/manual" |
| 16 | +mkdir -p $DEPLOY_DIR/manual |
| 17 | + |
| 18 | +echo "Create _site/pdfs" |
| 19 | +mkdir -p $DEPLOY_DIR/pdfs |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | +echo "Resolve / Create Index" |
| 24 | +./do gen:resolved_arch |
| 25 | + |
| 26 | +echo "Build manual" |
| 27 | +./do gen:html_manual MANUAL_NAME=isa VERSIONS=all |
| 28 | + |
| 29 | +echo "Copy manual html" |
| 30 | +cp -R gen/manual/isa/top/all/html $DEPLOY_DIR/manual |
| 31 | + |
| 32 | +echo "Build html documentation for generic_rv64" |
| 33 | +./do gen:html[generic_rv64] |
| 34 | + |
| 35 | +echo "Generate YARD docs" |
| 36 | +./do gen:tool_doc |
| 37 | + |
| 38 | +echo "Create _site/htmls" |
| 39 | +mkdir mkdir -p $DEPLOY_DIR/htmls |
| 40 | + |
| 41 | +echo "Copy cfg html" |
| 42 | +cp -R gen/cfg_html_doc/generic_rv64/html $DEPLOY_DIR/example_cfg |
| 43 | + |
| 44 | +echo "Create RVA20 Profile Release PDF Spec" |
| 45 | +./do gen:profile[RVA20] |
| 46 | + |
| 47 | +echo "Copy RVA20 Profile Release PDF" |
| 48 | +cp gen/profile_doc/pdf/RVA20.pdf $DEPLOY_DIR/pdfs/RVA20.pdf |
| 49 | + |
| 50 | +echo "Create RVA22 Profile Release PDF Spec" |
| 51 | +./do gen:profile[RVA22] |
| 52 | + |
| 53 | +echo "Copy RVA22 Profile Release PDF" |
| 54 | +cp gen/profile_doc/pdf/RVA22.pdf $DEPLOY_DIR/pdfs/RVA22.pdf |
| 55 | + |
| 56 | +echo "Create RVI20 Profile Release PDF Spec" |
| 57 | +./do gen:profile[RVI20] |
| 58 | + |
| 59 | +echo "Copy RVI20 Profile Release PDF" |
| 60 | +cp gen/profile_doc/pdf/RVA20.pdf $DEPLOY_DIR/pdfs/RVI20.pdf |
| 61 | + |
| 62 | +echo "Create MC100-32 PDF Spec" |
| 63 | +./do gen:cert_model_pdf[MC100-32] |
| 64 | + |
| 65 | +echo "Copy MC100-32 PDF" |
| 66 | +cp gen/certificate_doc/pdf/MC100-32.pdf $DEPLOY_DIR/pdfs/MC100-32.pdf |
| 67 | + |
| 68 | +echo "Create MC100-32 HTML Spec" |
| 69 | +./do gen:cert_model_html[MC100-32] |
| 70 | + |
| 71 | +echo "Copy MC100-32 HTML" |
| 72 | +cp gen/certificate_doc/html/MC100-32.html $DEPLOY_DIR/htmls/MC100-32.html |
| 73 | + |
| 74 | +echo "Create MC100-64 PDF Spec" |
| 75 | +./do gen:cert_model_pdf[MC100-64] |
| 76 | + |
| 77 | +echo "Copy MC100-64 PDF" |
| 78 | +cp gen/certificate_doc/pdf/MC100-64.pdf $DEPLOY_DIR/pdfs/MC100-64.pdf |
| 79 | + |
| 80 | +echo "Create MC100-64 HTML Spec" |
| 81 | +./do gen:cert_model_html[MC100-64] |
| 82 | + |
| 83 | +echo "Copy MC100-64 HTML" |
| 84 | +cp gen/certificate_doc/html/MC100-64.html $DEPLOY_DIR/htmls/MC100-64.html |
| 85 | + |
| 86 | +echo "Create index" |
| 87 | +cat <<- EOF > $DEPLOY_DIR/index.html |
| 88 | +<!doctype html> |
| 89 | +<html lang="en-us"> |
| 90 | + <head> |
| 91 | + <title>Release artifacts for $GITHUB_REF_NAME</title> |
| 92 | + </head> |
| 93 | + <body> |
| 94 | + <h1>Release artifacts for <code>riscv-unified-db</code>, ref $GITHUB_REF_NAME</h1> |
| 95 | + <h2>Commit $GITHUB_SHA</h2> |
| 96 | + <p>Created on $(date)</p> |
| 97 | +
|
| 98 | + <br/> |
| 99 | + <h3>Resolved architecture</h3> |
| 100 | + <ul> |
| 101 | + <li><a href="$PAGES_URL/resolved_arch/index.yaml">index.yaml</a> Database index, as array of relative paths from $PAGES_URL/resolved_arch</li> |
| 102 | + </ul> |
| 103 | +
|
| 104 | + <br/> |
| 105 | + <h3>ISA Manual</h3> |
| 106 | + <ul> |
| 107 | + <li><a href="$PAGES_URL/manual/html/index.html">Generated HTML ISA manuals, all versions</a></li> |
| 108 | + </ul> |
| 109 | +
|
| 110 | + <br/> |
| 111 | + <h3>Profiles</h3> |
| 112 | + <ul> |
| 113 | + <li><a href="$PAGES_URL/pdfs/RVI20.pdf">RVI20</a></li> |
| 114 | + <li><a href="$PAGES_URL/pdfs/RVA20.pdf">RVA20</a></li> |
| 115 | + <li><a href="$PAGES_URL/pdfs/RVA22.pdf">RVA22</a></li> |
| 116 | + </ul> |
| 117 | +
|
| 118 | + <br/> |
| 119 | + <h3>Certification Requirements Documents</h3> |
| 120 | + <ul> |
| 121 | + <li><a href="$PAGES_URL/pdfs/MC100-32.pdf">MC100-32</a></li> |
| 122 | + <li><a href="$PAGES_URL/pdfs/MC100-64.pdf">MC100-64</a></li> |
| 123 | + </ul> |
| 124 | +
|
| 125 | + <br/> |
| 126 | + <h3>Configuration-specific documentation</h3> |
| 127 | + <ul> |
| 128 | + <li><a href="$PAGES_URL/example_cfg/html/index.html">Architecture documentation for example RV64 config</a></li> |
| 129 | + </ul> |
| 130 | +
|
| 131 | + <br/> |
| 132 | + <h3>UDB Tool Documentation</h3> |
| 133 | + <ul> |
| 134 | + <li><a href="$PAGES_URL/ruby/idl/index.html">IDL language documentation</a></li> |
| 135 | + <li><a href="$PAGES_URL/ruby/arch_def/index.html">Ruby UDB interface documentation</a></li> |
| 136 | + </ul> |
| 137 | + </body> |
| 138 | +</html> |
| 139 | +EOF |
0 commit comments