forked from ARM-software/acle
-
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.
Revert "Rearrange scripts for PDF generation"
This reverts commit da2507a. The output PDFs have a bug where the section numbers are one depth level below where they should be.
- Loading branch information
Showing
18 changed files
with
62 additions
and
57 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 |
---|---|---|
@@ -1,21 +1,22 @@ | ||
# SPDX-FileCopyrightText: Copyright 2021, 2023 Arm Limited and/or its affiliates <[email protected]> | ||
# SPDX-FileCopyrightText: Copyright 2021 Arm Limited and/or its affiliates <[email protected]> | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-pdfs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v2 | ||
- name: check the correctness of the sources and generate the PDFs | ||
run: ./tools/build-pdfs.sh | ||
- uses: actions/upload-artifact@v3 | ||
run: ./build_with_docker.sh | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: pdfs | ||
path: output_pdfs | ||
path: pdfs | ||
|
||
build-github-pages: | ||
runs-on: ubuntu-latest | ||
|
@@ -27,7 +28,7 @@ jobs: | |
markdown-link-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@master | ||
- uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||
with: | ||
config-file: '.github/workflows/markdown-link-check.json' |
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
File renamed without changes.
File renamed without changes.
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,27 @@ | ||
# SPDX-FileCopyrightText: Copyright 2021 Arm Limited and/or its affiliates <[email protected]> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# syntax=docker/dockerfile:1 | ||
|
||
# We use Ubuntu 20.04 (Long term Support, LTS) to avoid major updates | ||
# in the tools used to build the specification to avoid changes in the | ||
# appearance of the PDFs. | ||
FROM ubuntu:20.04 | ||
ENV DEBIAN_FRONTEND="noninteractive" | ||
# The option --no-install-recommends is used to prevent apt from | ||
# installing the texlive-*-doc packages. | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
texlive-latex-base \ | ||
texlive-fonts-recommended \ | ||
texlive-fonts-extra \ | ||
texlive-latex-extra \ | ||
lmodern \ | ||
pandoc \ | ||
inkscape \ | ||
python3 \ | ||
python3-tabulate \ | ||
librsvg2-bin \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
ENTRYPOINT ["/entrypoint.sh"] |
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
File renamed without changes.
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#!/usr/bin/env bash | ||
# SPDX-FileCopyrightText: Copyright 2021-2023 Arm Limited and/or its affiliates <[email protected]> | ||
# SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates <[email protected]> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
set -ex | ||
|
||
# Convert svg image to pdf for use in pdf generation via pandoc. | ||
mkdir -p tmp tmp/pdfs | ||
inkscape Arm_logo_blue_RGB.svg -o tmp/Arm-logo-blue-RGB.pdf | ||
mkdir -p pdfs tmp | ||
inkscape -z Arm_logo_blue_RGB.svg -e tmp/Arm-logo-blue-RGB.pdf | ||
|
||
# Extracting all broken hyperref detected by PDFTex | ||
for file in "./main/acle.md" "./morello/morello.md" "./mve_intrinsics/mve.md" "./neon_intrinsics/advsimd.md" \ | ||
|
@@ -17,9 +17,9 @@ for file in "./main/acle.md" "./morello/morello.md" "./mve_intrinsics/mve.md" ". | |
# - Using tee to output the error and warning messages generated by pandoc pdf conversion into a file | ||
# - Using grep to extract all unresolved links from the file, eg "pdfTeX warning (dest): name{ssec-bf16-scalar}" | ||
# - Using wc to count all the lines and thus all the warnings/detected broken links | ||
pandoc --template=tools/pdf/acle_template.tex $file --verbose -o tmp/pdfs/tmp.pdf --resource-path=$(dirname $file):. 2>&1 | tee tmp/output | ||
pandoc --template=tools/acle_template.tex $file --verbose -o pdfs/tmp.pdf --resource-path=$(dirname $file) 2>&1 | tee tmp/output | ||
number_of_broken_refs=`cat tmp/output | grep 'pdfTeX warning (dest): name' | wc -l` | ||
rm tmp/pdfs/tmp.pdf tmp/output | ||
rm pdfs/tmp.pdf tmp/output | ||
|
||
if [[ $number_of_broken_refs -gt 0 ]]; then | ||
echo "**** ERROR! There are $number_of_broken_refs unresolved internal references in $file." | ||
|
@@ -28,5 +28,3 @@ for file in "./main/acle.md" "./morello/morello.md" "./mve_intrinsics/mve.md" ". | |
exit 1 | ||
fi | ||
done | ||
|
||
rm -rf tmp |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.