Skip to content

Commit

Permalink
* .github/workflows/test-and-deploy.yml: Use TinyTeX.
Browse files Browse the repository at this point in the history
  • Loading branch information
MLopez-Ibanez committed Sep 28, 2023
1 parent 8f3018f commit 54ae0c8
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 89 deletions.
10 changes: 0 additions & 10 deletions .github/texlive/texlive.profile

This file was deleted.

34 changes: 0 additions & 34 deletions .github/texlive/texlive_install.sh

This file was deleted.

62 changes: 32 additions & 30 deletions .github/texlive/texlive_packages → .github/texlive_packages
Original file line number Diff line number Diff line change
Expand Up @@ -4,59 +4,61 @@

# Base tools to compile
# texliveonfly
latexmk
# latexmk

# Collections
# collection-langeuropean
collection-fontsrecommended

# Assuming a 'basic' font set up, metafont is required to avoid
# warnings with some packages and errors with others
metafont mfware
# metafont mfware

# texliveonfly does not detect the following packages automatically
amsfonts
amsmath
# amsfonts
# amsmath
babel-english
biber
biblatex
bigintcalc
bitset
# bigintcalc
# bitset
bookmark
caption
csquotes
enumitem
epstopdf-pkg
etexcmds
fancyvrb
# epstopdf-pkg
# etexcmds
fancyhdr
# fancyvrb
fandol
framed
# framed
fvextra
gettitlestring
graphics
hycolor
# gettitlestring
# graphics
# hycolor
hypdoc
hyperref
# hyperref
hyphenat
infwarerr
intcalc
kvdefinekeys
kvoptions
kvsetkeys
letltxmacro
# infwarerr
# intcalc
# kvdefinekeys
# kvoptions
# kvsetkeys
# letltxmacro
lineno
listings
ltxcmds
# ltxcmds
minted
oberdiek
pdfescape
pdftexcmds
psnfss
# pdfescape
# pdftexcmds
# pnfss
ragged2e
refcount
rerunfilecheck
tools
uniquecounter
# refcount
# rerunfilecheck
# tools
# uniquecounter
upquote
xcolor
xkeyval
# xcolor
# xkeyval
xstring
39 changes: 24 additions & 15 deletions .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@ name: CI

on:
push:
branches:
- "main"
- "master"
paths-ignore: ['README.md','bibpool/**','**precommit','setup_worktree.sh','mklog','**.latexmkrc','.gitignore']

pull_request:
branches:
- "main"
- "master"
paths-ignore: ['README.md','bibpool/**','**precommit','setup_worktree.sh','mklog','**.latexmkrc','.gitignore']

env:
Expand Down Expand Up @@ -58,25 +52,40 @@ jobs:
fi
echo "FILES_CHANGED=${#FILES_CHANGED}" >> $GITHUB_ENV # get the char len of diff output (used later)
- name: Cache TeX Live
- name: Cache TinyTeX
if: ${{ env.FILES_CHANGED != 0 }}
id: cache-texlive
id: cache-tinytex
uses: actions/cache@v3
with:
path: /tmp/texlive
key: ${{ env.cache-version }}-${{ runner.os }}-texlive-essential
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-texlive-essential
path: ~/.TinyTeX
key: ${{ env.cache-version }}-${{ runner.os }}-tinytex
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-tinytex

- name: Install packages
if: ${{ env.FILES_CHANGED != 0 }}
run: |
sudo apt -y update
sudo apt -y install bibtex2html tidy ghostscript qpdf
- name: Install Tex Live
if: ${{ env.FILES_CHANGED != 0 && steps.cache-texlive.outputs.cache-hit != 'true'}}
run: .github/texlive/texlive_install.sh

- uses: r-lib/actions/setup-tinytex@v2-branch
if: ${{ env.FILES_CHANGED != 0 && steps.cache-tinytex.outputs.cache-hit != 'true'}}
env:
TINYTEX_INSTALLER: TinyTeX-1
TINYTEX_VERSION: 2023.09

- name: Install additional LaTeX packages
if: ${{ env.FILES_CHANGED != 0 && steps.cache-tinytex.outputs.cache-hit != 'true'}}
run: |
texlive_packages=./.github/texlive_packages
echo "Updating TexLive"
# Keep no backups (not required, simply makes cache bigger)
tlmgr option -- autobackup 0
echo "Updating tlmgr itself"
tlmgr update --self
echo "Install ${texlive_packages}"
tlmgr install $(sed 's/\s*#.*//;/^\s*$/d' "${texlive_packages}")
tlmgr path add
- name: Run test
if: ${{ success() && env.FILES_CHANGED != 0 }}
run: cd test && ./test.sh
Expand Down

0 comments on commit 54ae0c8

Please sign in to comment.