mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-01 13:25:46 -04:00
manual: Add cover PDF build to CI
This is not invoked as part of the normal build process, and shouldn't be: we only ever want to build the cover PDFs when we're uploading them for printing, and don't want everyone who wants to build Freedoom to have to install Inkscape. However, we should nonetheless include it in the CI to check that the build step works.
This commit is contained in:
parent
5fa5e23400
commit
5b89315bcc
2 changed files with 14 additions and 2 deletions
7
.github/workflows/make.yml
vendored
7
.github/workflows/make.yml
vendored
|
@ -18,7 +18,8 @@ jobs:
|
|||
- name: Install Prerequisites
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install python3-pil asciidoc unzip zip ruby dos2unix
|
||||
sudo apt install python3-pil asciidoc unzip zip ruby dos2unix \
|
||||
inkscape
|
||||
sudo gem install asciidoctor-pdf --pre
|
||||
- name: Install Deutex
|
||||
run: |
|
||||
|
@ -43,6 +44,10 @@ jobs:
|
|||
export VERSION=${VERSION:1}
|
||||
fi
|
||||
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
|
||||
- name: Make manual cover PDFs
|
||||
run: |
|
||||
cd manual
|
||||
make covers
|
||||
- name: Upload Freedoom
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
|
|
@ -11,9 +11,16 @@
|
|||
ASCIIDOCTOR_FLAGS = -a pdf-page-size=A5
|
||||
MANUAL_ADOC_FILES=$(wildcard freedoom-manual-??.adoc)
|
||||
MANUAL_PDF_FILES=$(subst .adoc,.pdf,$(MANUAL_ADOC_FILES))
|
||||
COVER_PDF_FILES=cover.pdf
|
||||
|
||||
all: $(MANUAL_PDF_FILES)
|
||||
|
||||
# We only build the cover PDFs if the user explicitly runs `make covers`;
|
||||
# this is because it requires Inkscape and we don't want it as a build
|
||||
# dependency. Most users won't ever need these, we only use them when we're
|
||||
# uploading the PDF files to print physical manuals.
|
||||
covers: $(COVER_PDF_FILES)
|
||||
|
||||
freedoom-manual-%.pdf: freedoom-manual-%.adoc
|
||||
-asciidoctor-pdf $(ASCIIDOCTOR_FLAGS) $< -o $@
|
||||
|
||||
|
@ -21,4 +28,4 @@ cover.pdf: cover/cover.svg cover/serpentipede.png cover/minigunner.png
|
|||
inkscape -o $@ $<
|
||||
|
||||
clean:
|
||||
$(RM) $(MANUAL_PDF_FILES)
|
||||
$(RM) $(MANUAL_PDF_FILES) $(COVER_PDF_FILES)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue