Skip to content

Commit

Permalink
Merge pull request InsightSoftwareConsortium#143 from InsightSoftware…
Browse files Browse the repository at this point in the history
…Consortium/github-action

ENH: Add GitHub Action to build and publish Guide PDFs
  • Loading branch information
thewtex authored May 14, 2020
2 parents dcd82f3 + 68e2f9f commit 38b876b
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 39 deletions.
37 changes: 0 additions & 37 deletions .circleci/config.yml

This file was deleted.

69 changes: 69 additions & 0 deletions .github/workflows/build.yml
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
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
ITK Software Guide
==================

[![Build Status](https://circleci.com/gh/InsightSoftwareConsortium/ITKSoftwareGuide.svg?style=shield)](https://circleci.com/gh/InsightSoftwareConsortium/ITKSoftwareGuide)

This [ITK Software Guide] is the handbook for developing software with ITK.

It is divided into two companion books.
Expand Down

0 comments on commit 38b876b

Please sign in to comment.