Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,104 @@ jobs:
echo "WOLFCOSE_REF=$ref" >> "$GITHUB_ENV"
- name: wolfCOSE html and pdf
run: cd wolfCOSE && make

# The Japanese (DOC_LANG=JA) manuals from each src-ja, in a separate job so
# they build in parallel with the English ones and from a clean checkout.
# wolfSentry is not built here yet: its Japanese PDF needs the pre-build
# step that only "make" (not "make pdf") runs.
build-ja:

runs-on: ubuntu-latest
container: pandoc/latex:latest-ubuntu

# Keep these setup steps in sync with the build job, plus fonts-noto-cjk
# and xecjk which the Japanese PDFs need
steps:
- name: Install Dependencies
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
git make patch unzip wget ca-certificates mkdocs doxygen \
fonts-noto-core fonts-noto-mono fonts-noto-cjk
git config --global --add safe.directory '*'
- name: Install LaTeX packages
run: |
tlmgr update --self
tlmgr install titlesec tocloft fvextra listings fancyhdr xecjk
- name: Install doxybook2
run: |
wget -q -O /tmp/doxybook2.zip https://github.com/matusnovak/doxybook2/releases/download/v1.5.0/doxybook2-linux-amd64-v1.5.0.zip
unzip -q /tmp/doxybook2.zip -d /tmp/doxybook2
cp /tmp/doxybook2/bin/doxybook2 /usr/local/bin/
- uses: actions/checkout@v4
- name: wolfssl html
run: cd wolfSSL && make html DOC_LANG=JA
- name: wolfssl pdf
run: cd wolfSSL && make pdf DOC_LANG=JA
- name: wolfssh html
run: cd wolfSSH && make html DOC_LANG=JA
- name: wolfssh pdf
run: cd wolfSSH && make pdf DOC_LANG=JA
- name: Pin wolfTPM source for this build
run: |
ref=$(git ls-remote https://github.com/wolfSSL/wolfTPM.git refs/heads/master | cut -f1)
test -n "$ref"
echo "WOLFTPM_REF=$ref" >> "$GITHUB_ENV"
- name: wolftpm html and pdf
run: cd wolfTPM && make DOC_LANG=JA
- name: wolfmqtt html
run: cd wolfMQTT && make html DOC_LANG=JA
- name: wolfmqtt pdf
run: cd wolfMQTT && make pdf DOC_LANG=JA
- name: wolfBoot html
run: cd wolfBoot && make html DOC_LANG=JA
- name: wolfBoot pdf
run: cd wolfBoot && make pdf DOC_LANG=JA
- name: wolfclu html
run: cd wolfCLU && make html DOC_LANG=JA
- name: wolfclu pdf
run: cd wolfCLU && make pdf DOC_LANG=JA
- name: wolfssl-jni html
run: cd wolfSSL-JNI && make html DOC_LANG=JA
- name: wolfssl-jni pdf
run: cd wolfSSL-JNI && make pdf DOC_LANG=JA
- name: wolfcrypt-jni html
run: cd wolfCrypt-JNI && make html DOC_LANG=JA
- name: wolfcrypt-jni pdf
run: cd wolfCrypt-JNI && make pdf DOC_LANG=JA
- name: wolfHSM html
run: cd wolfHSM && make html DOC_LANG=JA
- name: wolfHSM pdf
run: cd wolfHSM && make pdf DOC_LANG=JA
- name: wolfEngine html
run: cd wolfEngine && make html DOC_LANG=JA
- name: wolfEngine pdf
run: cd wolfEngine && make pdf DOC_LANG=JA
- name: wolfProvider html
run: cd wolfProvider && make html DOC_LANG=JA
- name: wolfProvider pdf
run: cd wolfProvider && make pdf DOC_LANG=JA
- name: wolfssl-fips-ready html
run: cd wolfSSL-FIPS-Ready && make html DOC_LANG=JA
- name: wolfssl-fips-ready pdf
run: cd wolfSSL-FIPS-Ready && make pdf DOC_LANG=JA
- name: wolfssl-tuning html
run: cd wolfSSL-Tuning && make html DOC_LANG=JA
- name: wolfssl-tuning pdf
run: cd wolfSSL-Tuning && make pdf DOC_LANG=JA
- name: wolfssl-porting html
run: cd wolfSSL-Porting && make html DOC_LANG=JA
- name: wolfssl-porting pdf
run: cd wolfSSL-Porting && make pdf DOC_LANG=JA
- name: wolfssl-faq html
run: cd wolfSSL-FAQ && make html DOC_LANG=JA
- name: wolfssl-faq pdf
run: cd wolfSSL-FAQ && make pdf DOC_LANG=JA
- name: wolfssl-fips-faq html
run: cd wolfSSL-FIPS-FAQ && make html DOC_LANG=JA
- name: wolfssl-fips-faq pdf
run: cd wolfSSL-FIPS-FAQ && make pdf DOC_LANG=JA
- name: mbedtls-migration html
run: cd MbedTLS-Migration && make html DOC_LANG=JA
- name: mbedtls-migration pdf
run: cd MbedTLS-Migration && make pdf DOC_LANG=JA
22 changes: 14 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ FROM pandoc/latex:latest-ubuntu AS builder
RUN apt-get -y update
# mkdocs is used for the HTML manuals
# Doxygen to convert the Doxygen docs
# The Noto fonts are needed by our PDF generator
# The Noto fonts are needed by our PDF generator, fonts-noto-cjk for the
# Japanese manuals
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends mkdocs doxygen git make patch ca-certificates fonts-noto-core fonts-noto-mono fonts-noto-cjk
# The LaTeX packages our PDF headers use beyond the minimal TeX Live
RUN tlmgr update --self && tlmgr install titlesec tocloft fvextra listings fancyhdr
# The LaTeX packages our PDF headers use beyond the minimal TeX Live, xecjk
# is needed for the Japanese (DOC_LANG=JA) PDFs
RUN tlmgr update --self && tlmgr install titlesec tocloft fvextra listings fancyhdr xecjk
COPY --from=doxybook2 /usr/local/bin/doxybook2 /usr/local/bin/doxybook2
RUN doxybook2 --version

Expand All @@ -36,32 +38,36 @@ WORKDIR /src/wolfssl
COPY . .

# Build wolfSSL PDF
# DOC_LANG=JA builds the Japanese manual from src-ja
FROM builder AS wolfssl-stage1
ARG MANPATH
ARG PDFFILE
ARG V
ARG DOC_LANG
ARG WOLFCOSE_REF=main
ARG WOLFTPM_REF=master
WORKDIR /src/wolfssl/${MANPATH}
RUN make pdf V=${V} WOLFCOSE_REF=${WOLFCOSE_REF} WOLFTPM_REF=${WOLFTPM_REF}
RUN make pdf V=${V} DOC_LANG=${DOC_LANG} WOLFCOSE_REF=${WOLFCOSE_REF} WOLFTPM_REF=${WOLFTPM_REF}

# Build wolfSSL HTML
FROM wolfssl-stage1 AS wolfssl-stage2
ARG MANPATH
ARG PDFFILE
ARG V
ARG DOC_LANG
WORKDIR /src/wolfssl/${MANPATH}
RUN if [ "${MANPATH}" = wolfCOSE ]; then \
WOLFCOSE_REF="$(git -C wolfcose rev-parse HEAD)" make html V=${V}; \
WOLFCOSE_REF="$(git -C wolfcose rev-parse HEAD)" make html V=${V} DOC_LANG=${DOC_LANG}; \
elif [ "${MANPATH}" = wolfTPM ]; then \
WOLFTPM_REF="$(git -C wolftpm rev-parse HEAD)" make html V=${V}; \
WOLFTPM_REF="$(git -C wolftpm rev-parse HEAD)" make html V=${V} DOC_LANG=${DOC_LANG}; \
else \
make html V=${V}; \
make html V=${V} DOC_LANG=${DOC_LANG}; \
fi

# Build both wolfSSL HTML and PDF
FROM scratch AS manual
ARG MANPATH
ARG PDFFILE
ARG HTMLDIR=${MANPATH}-html
COPY --from=wolfssl-stage1 /src/wolfssl/${MANPATH}/${PDFFILE} ${PDFFILE}
COPY --from=wolfssl-stage2 /src/wolfssl/${MANPATH}/html ${MANPATH}-html
COPY --from=wolfssl-stage2 /src/wolfssl/${MANPATH}/html ${HTMLDIR}
Loading
Loading