forked from InsightSoftwareConsortium/ITKSoftwareGuide
-
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.
Merge pull request InsightSoftwareConsortium#143 from InsightSoftware…
…Consortium/github-action ENH: Add GitHub Action to build and publish Guide PDFs
- Loading branch information
Showing
3 changed files
with
69 additions
and
39 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,69 @@ | ||
name: Build | ||
|
||
on: [push,pull_request] | ||
|
||
jobs: | ||
build-publish-pdf: | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Install build dependencies | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y \ | ||
apt-utils \ | ||
build-essential \ | ||
ccache \ | ||
cmake \ | ||
curl \ | ||
git \ | ||
ninja-build \ | ||
python | ||
# Using --no-install-recommends greatly reduces the installed packages | ||
sudo apt-get install -y --no-install-recommends \ | ||
texlive-latex-base \ | ||
texlive-latex-extra | ||
sudo apt-get install -y \ | ||
dvipng \ | ||
ghostscript \ | ||
locales \ | ||
imagemagick \ | ||
python \ | ||
python-pygments \ | ||
texlive-latex-recommended \ | ||
tex4ht \ | ||
texlive-fonts-recommended | ||
sudo echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \ | ||
sudo locale-gen | ||
sudo sed -i 's/none/read|write/' /etc/ImageMagick-6/policy.xml | ||
sudo apt-get clean | ||
- name: Set environmental variables | ||
run: | | ||
echo '::set-env name=LC_ALL::en_US.UTF-8' | ||
echo '::set-env name=LANG::en_US.UTF-8' | ||
echo '::set-env name=LANGUAGE::en_US.UTF-8' | ||
- name: Build | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake -GNinja -DCMAKE_BUILD_TYPE=MinSizeRel .. | ||
ninja | ||
- name: Publish ITK Software Guide Book 1 artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: ITKSoftwareGuide-Book1.pdf | ||
path: build/ITKSoftwareGuide-build/SoftwareGuide/Latex/ITKSoftwareGuide-Book1.pdf | ||
|
||
- name: Publish ITK Software Guide Book 2 artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: ITKSoftwareGuide-Book2.pdf | ||
path: build/ITKSoftwareGuide-build/SoftwareGuide/Latex/ITKSoftwareGuide-Book2.pdf |
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