-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d40a124
commit e931f63
Showing
14 changed files
with
684 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
## | ||
## Copyright (c) 2023-2025 The Johns Hopkins University Applied Physics | ||
## Laboratory LLC. | ||
## | ||
## This file is part of the Bundle Protocol Security Library (BSL). | ||
## | ||
## Licensed under the Apache License, Version 2.0 (the "License"); | ||
## you may not use this file except in compliance with the License. | ||
## You may obtain a copy of the License at | ||
## http://www.apache.org/licenses/LICENSE-2.0 | ||
## Unless required by applicable law or agreed to in writing, software | ||
## distributed under the License is distributed on an "AS IS" BASIS, | ||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
## See the License for the specific language governing permissions and | ||
## limitations under the License. | ||
## | ||
## This work was performed for the Jet Propulsion Laboratory, California | ||
## Institute of Technology, sponsored by the United States Government under | ||
## the prime contract 80NM0018D0004 between the Caltech and NASA under | ||
## subcontract 1700763. | ||
## | ||
|
||
name: Build documentation | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: dependencies | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y cmake make coreutils ruby asciidoctor graphviz inkscape dblatex docbook-xsl-ns xsltproc xmlstarlet | ||
sudo gem install asciidoctor-diagram | ||
- name: build | ||
env: | ||
DESTDIR: public | ||
run: | | ||
cmake -S . -B build | ||
cmake --build build | ||
cmake --install build | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: docs | ||
path: public | ||
|
||
deploy: | ||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
needs: build | ||
if: github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: docs | ||
path: public | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: public | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
# editor files | ||
*~ | ||
*.bak | ||
.#* | ||
.project | ||
.cproject | ||
|
||
# generated files | ||
build | ||
*/docinfo.xml | ||
public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#[[ | ||
Copyright (c) 2023-2025 The Johns Hopkins University Applied Physics | ||
Laboratory LLC. | ||
This file is part of the Bundle Protocol Security Library (BSL). | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
This work was performed for the Jet Propulsion Laboratory, California | ||
Institute of Technology, sponsored by the United States Government under | ||
the prime contract 80NM0018D0004 between the Caltech and NASA under | ||
subcontract 1700763. | ||
]] | ||
cmake_minimum_required(VERSION 3.16) | ||
# No compiler checks | ||
project(bsl-docs LANGUAGES ) | ||
set(CMAKE_INSTALL_PREFIX "") | ||
|
||
#add_subdirectory(user-guide) | ||
add_subdirectory(product-guide) | ||
|
||
install( | ||
FILES index.html | ||
DESTINATION . | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/bin/bash | ||
## | ||
## Copyright (c) 2023-2025 The Johns Hopkins University Applied Physics | ||
## Laboratory LLC. | ||
## | ||
## This file is part of the Bundle Protocol Security Library (BSL). | ||
## | ||
## Licensed under the Apache License, Version 2.0 (the "License"); | ||
## you may not use this file except in compliance with the License. | ||
## You may obtain a copy of the License at | ||
## http://www.apache.org/licenses/LICENSE-2.0 | ||
## Unless required by applicable law or agreed to in writing, software | ||
## distributed under the License is distributed on an "AS IS" BASIS, | ||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
## See the License for the specific language governing permissions and | ||
## limitations under the License. | ||
## | ||
## This work was performed for the Jet Propulsion Laboratory, California | ||
## Institute of Technology, sponsored by the United States Government under | ||
## the prime contract 80NM0018D0004 between the Caltech and NASA under | ||
## subcontract 1700763. | ||
## | ||
|
||
# Apply copyright and license markings to source files. | ||
# | ||
# Requires installation of: | ||
# pip3 install licenseheaders | ||
# Run as: | ||
# ./apply_license.sh {specific dir} | ||
# | ||
set -e | ||
|
||
SELFDIR=$(realpath $(dirname "${BASH_SOURCE[0]}")) | ||
|
||
LICENSEOPTS="${LICENSEOPTS} --tmpl ${SELFDIR}/apply_license.tmpl" | ||
LICENSEOPTS="${LICENSEOPTS} --years 2023-$(date +%Y)" | ||
# Excludes only apply to directory (--dir) mode and not file mode | ||
#LICENSEOPTS="${LICENSEOPTS} --exclude *.yml " | ||
|
||
|
||
# Specific paths | ||
if [[ $# -gt 0 ]] | ||
then | ||
echo "Applying markings to selected $@ ..." | ||
licenseheaders ${LICENSEOPTS} --dir $@ | ||
exit 0 | ||
fi | ||
|
||
|
||
echo "Applying markings to source..." | ||
# Directory trees | ||
for DIRNAME in product-guide user-guide .github | ||
do | ||
licenseheaders ${LICENSEOPTS} --dir ${SELFDIR}/${DIRNAME} | ||
done | ||
# Specific top-level files | ||
for FILEPATH in $(find "${SELFDIR}" -maxdepth 1 -type f) | ||
do | ||
licenseheaders ${LICENSEOPTS} --file ${FILEPATH} | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) ${years} The Johns Hopkins University Applied Physics | ||
Laboratory LLC. | ||
|
||
This file is part of the Bundle Protocol Security Library (BSL). | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
||
This work was performed for the Jet Propulsion Laboratory, California | ||
Institute of Technology, sponsored by the United States Government under | ||
the prime contract 80NM0018D0004 between the Caltech and NASA under | ||
subcontract 1700763. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
#[[ | ||
Copyright (c) 2023-2025 The Johns Hopkins University Applied Physics | ||
Laboratory LLC. | ||
This file is part of the Bundle Protocol Security Library (BSL). | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
This work was performed for the Jet Propulsion Laboratory, California | ||
Institute of Technology, sponsored by the United States Government under | ||
the prime contract 80NM0018D0004 between the Caltech and NASA under | ||
subcontract 1700763. | ||
]] | ||
cmake_minimum_required(VERSION 3.16) | ||
get_filename_component(DIRNAME ${CMAKE_CURRENT_LIST_DIR} NAME) | ||
# No compiler checks | ||
project(${DIRNAME} VERSION 0 LANGUAGES ) | ||
|
||
|
||
# File paths | ||
set(ADOC_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/manual.adoc") | ||
|
||
|
||
find_program(ASCIIDOC asciidoctor REQUIRED) | ||
set(OUT_DOCINFO "docinfo.xml") | ||
configure_file( | ||
"${CMAKE_CURRENT_SOURCE_DIR}/${OUT_DOCINFO}.in" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/${OUT_DOCINFO}" | ||
@ONLY | ||
) | ||
set(OUT_DBOOK "manual.docbook.xml") | ||
add_custom_command( | ||
OUTPUT ${OUT_DBOOK} | ||
DEPENDS ${ADOC_SOURCE} ${OUT_DOCINFO} | ||
COMMAND | ||
${ASCIIDOC} -v -r asciidoctor-diagram | ||
--base-dir ${CMAKE_CURRENT_SOURCE_DIR} | ||
--destination-dir ${CMAKE_CURRENT_BINARY_DIR} | ||
-o ${OUT_DBOOK} | ||
${ADOC_SOURCE} | ||
) | ||
# Place source images into build directory | ||
set(INSTALL_IMGS ${CMAKE_CURRENT_SOURCE_DIR}/install_imgs.sh) | ||
add_custom_target( | ||
${PROJECT_NAME}-img-bin | ||
DEPENDS ${INSTALL_IMGS} ${OUT_DBOOK} | ||
COMMAND ${INSTALL_IMGS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${OUT_DBOOK} | ||
) | ||
|
||
find_program(XSLTPROC xsltproc REQUIRED) | ||
set(HTML_XSLT "${CMAKE_CURRENT_SOURCE_DIR}/xhtml-opts.xsl") | ||
find_program(XMLSTARLET xmlstarlet REQUIRED) | ||
set(OUT_HTML "html/index.html") | ||
set(OUT_CSS "html/docbook.css") | ||
add_custom_command( | ||
OUTPUT ${OUT_HTML} | ||
BYPRODUCTS ${OUT_CSS} | ||
DEPENDS ${OUT_DBOOK} ${HTML_XSLT} | ||
COMMAND ${XSLTPROC} -o ${OUT_HTML} ${HTML_XSLT} ${OUT_DBOOK} | ||
) | ||
# Place needed images into HTML tree | ||
add_custom_target( | ||
${PROJECT_NAME}-img-html | ||
DEPENDS ${INSTALL_IMGS} ${OUT_HTML} ${PROJECT_NAME}-img-bin | ||
COMMAND ${INSTALL_IMGS} ${CMAKE_CURRENT_BINARY_DIR} "${CMAKE_CURRENT_BINARY_DIR}/html" | ||
) | ||
add_custom_target( | ||
${PROJECT_NAME}-html ALL | ||
DEPENDS ${OUT_HTML} ${PROJECT_NAME}-img-html | ||
) | ||
install( | ||
DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html" | ||
DESTINATION ${PROJECT_NAME} | ||
) | ||
|
||
|
||
find_program(DBLATEX dblatex REQUIRED) | ||
set(PDF_XSLT "${CMAKE_CURRENT_SOURCE_DIR}/pdf-opts.xsl") | ||
set(OUT_PDF "manual.pdf") | ||
add_custom_command( | ||
OUTPUT ${OUT_PDF} | ||
DEPENDS ${OUT_DBOOK} ${PDF_XSLT} ${PROJECT_NAME}-img-bin | ||
COMMAND ${DBLATEX} -o ${OUT_PDF} --xsl-user=${PDF_XSLT} ${OUT_DBOOK} | ||
) | ||
add_custom_target( | ||
${PROJECT_NAME}-pdf ALL | ||
DEPENDS ${OUT_PDF} | ||
) | ||
install( | ||
FILES "${CMAKE_CURRENT_BINARY_DIR}/${OUT_PDF}" | ||
DESTINATION ${PROJECT_NAME} | ||
# RENAME "ANMS Product Guide v${PROJECT_VERSION}.pdf" | ||
) |
Oops, something went wrong.