Skip to content

Commit 68e2f9f

Browse files
committed
ENH: Add GitHub Action to build and publish Guide PDFs
1 parent 5e18abd commit 68e2f9f

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

.github/workflows/build.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Build
2+
3+
on: [push,pull_request]
4+
5+
jobs:
6+
build-publish-pdf:
7+
runs-on: ubuntu-18.04
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: Set up Python 3.7
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: 3.7
16+
17+
- name: Install build dependencies
18+
run: |
19+
sudo apt-get update && sudo apt-get install -y \
20+
apt-utils \
21+
build-essential \
22+
ccache \
23+
cmake \
24+
curl \
25+
git \
26+
ninja-build \
27+
python
28+
# Using --no-install-recommends greatly reduces the installed packages
29+
sudo apt-get install -y --no-install-recommends \
30+
texlive-latex-base \
31+
texlive-latex-extra
32+
sudo apt-get install -y \
33+
dvipng \
34+
ghostscript \
35+
locales \
36+
imagemagick \
37+
python \
38+
python-pygments \
39+
texlive-latex-recommended \
40+
tex4ht \
41+
texlive-fonts-recommended
42+
sudo echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
43+
sudo locale-gen
44+
sudo sed -i 's/none/read|write/' /etc/ImageMagick-6/policy.xml
45+
sudo apt-get clean
46+
- name: Set environmental variables
47+
run: |
48+
echo '::set-env name=LC_ALL::en_US.UTF-8'
49+
echo '::set-env name=LANG::en_US.UTF-8'
50+
echo '::set-env name=LANGUAGE::en_US.UTF-8'
51+
52+
- name: Build
53+
run: |
54+
mkdir build
55+
cd build
56+
cmake -GNinja -DCMAKE_BUILD_TYPE=MinSizeRel ..
57+
ninja
58+
59+
- name: Publish ITK Software Guide Book 1 artifact
60+
uses: actions/upload-artifact@v1
61+
with:
62+
name: ITKSoftwareGuide-Book1.pdf
63+
path: build/ITKSoftwareGuide-build/SoftwareGuide/Latex/ITKSoftwareGuide-Book1.pdf
64+
65+
- name: Publish ITK Software Guide Book 2 artifact
66+
uses: actions/upload-artifact@v1
67+
with:
68+
name: ITKSoftwareGuide-Book2.pdf
69+
path: build/ITKSoftwareGuide-build/SoftwareGuide/Latex/ITKSoftwareGuide-Book2.pdf

0 commit comments

Comments
 (0)