Skip to content

all: pdfl v

all: pdfl v #36

Workflow file for this run

# R-hub's generic GitHub Actions workflow file. It's canonical location is at
# https://github.com/r-hub/rhub2/blob/v1/inst/workflow/rhub.yaml
# You can update this file to a newer version using the rhub2 package:
#
# rhub2::rhub_setup()
#
# It is unlikely that you need to modify this file manually.
name: R-hub
run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}"
on:
workflow_dispatch:
inputs:
config:
description: 'A comma separated list of R-hub platforms to use.'
type: string
default: 'linux,windows,macos'
name:
description: 'Run name (optional)'
type: string
id:
description: 'Unique ID (optional)'
type: string
jobs:
setup:
runs-on: ubuntu-latest
outputs:
containers: ${{ steps.rhub-setup.outputs.containers }}
platforms: ${{ steps.rhub-setup.outputs.platforms }}
steps:
# NO NEED TO CHECKOUT HERE
- uses: r-hub/rhub2/actions/rhub-setup@v1
with:
config: ${{ github.event.inputs.config }}
id: rhub-setup
linux-containers:
needs: setup
if: ${{ needs.setup.outputs.containers != '[]' }}
runs-on: ubuntu-latest
name: ${{ matrix.config.label }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.setup.outputs.containers) }}
container:
image: ${{ matrix.config.container }}
steps:
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-hub/rhub2/actions/rhub-checkout@v1
- uses: r-hub/rhub2/actions/rhub-platform-info@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/rhub2/actions/rhub-setup-deps@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/rhub2/actions/rhub-run-check@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
other-platforms:
needs: setup
if: ${{ needs.setup.outputs.platforms != '[]' }}
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.label }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.setup.outputs.platforms) }}
steps:
- name: Setup TeX Live
uses: teatimeguest/setup-texlive-action@v3
with:
packages: scheme-basic
- name: Check `tlmgr` version
run: tlmgr --version
- name: Check `pdflatex` version
run: pdflatex --version
- name: Install apt packages (Linux)
run: |
sudo apt-get install \
texlive-latex-base texlive-fonts-recommended texlive-latex-extra \
libcurl4-openssl-dev
- name: Install System dependencies and LaTeX (Windows)
if: runner.os == 'Windows'
shell: bash
run: |
set -x
echo "Downloading MiKTeX CLI installer"
# We download from a specific miror already
curl -L -O https://ctan.math.illinois.edu/systems/win32/miktex/setup/windows-x64/miktexsetup-5.5.0%2B1763023-x64.zip
unzip miktexsetup-5.5.0%2B1763023-x64.zip
echo "Setting up the local package directory via download"
./miktexsetup_standalone --verbose \
--local-package-repository=C:/MiKTeX-Repo \
--remote-package-repository="https://ctan.math.illinois.edu/systems/win32/miktex/tm/packages/" \
--package-set=essential \
download
echo "Installing from the local package directory previously set up"
./miktexsetup_standalone --verbose \
--local-package-repository=C:/MiKTeX-Repo \
--package-set=essential \
--shared=yes \
install
echo "Adding MiKTeX bin folder to PATH and to GITHUB_PATH"
echo "C:/Program Files/MiKTeX/miktex/bin/x64/" >> $GITHUB_PATH
export PATH="/c/Program Files/MiKTeX/miktex/bin/x64/:$PATH"
echo "Configuring MiKTeX to install missing packages on the fly"
initexmf --admin --verbose --set-config-value='[MPM]AutoInstall=1'
echo "Configure default mirror for packages"
mpm --admin --set-repository="https://ctan.math.illinois.edu/systems/win32/miktex/tm/packages/"
# If later we pre-package into a zip/tar.gz all the packages we need, we can preinstall them via
# mpm --admin --set-repository=C:/MiKTeX-Repo
# mpm --verbose --admin --repository=C:\MiKTeX-Repo --require=@C:\MiKTeX-Repo\energyplus_packages.lst
# Avoid annoying warning: "xelatex: major issue: So far, you have not checked for updates as a MiKTeX user."
miktex packages update
miktex --admin packages update
mpm --find-updates # TODO remove
mpm --admin --find-updates # TODO remove
# initexmf --enable-installer --update-fndb
# initexmf --admin --enable-installer --update-fndb
# initexmf --enable-installer --dump-by-name=xelatex --engine=xetex
- uses: r-lib/actions/setup-pandoc@v2
- name: Install system dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install xquartz basictex
- name: Update PATH (macOS)
if: runner.os == 'macOS'
run: |
eval "$(/usr/libexec/path_helper)"
- name: Check versions (macOS)
if: runner.os == 'macOS'
run: |
export BINARIES_PATH=$(find /usr/local/texlive -type d -name 'bin' | grep -m 1 'x86_64-darwin')
echo "set-output name=binaries-path:$BINARIES_PATH"
echo "::set-output name=binaries-path::$BINARIES_PATH"
- name: Add BasicTeX binaries directory to PATH
if: runner.os == 'macOS'
run: |
echo "export PATH=${{ steps.find-binaries.outputs.binaries-path }}:\$PATH" >> $HOME/.bash_profile
source $HOME/.bash_profile
pdflatex --version
- name: Check pdflatex version (Windows)
if: runner.os == 'Windows'
run: pdflatex --version
- uses: r-hub/rhub2/actions/rhub-checkout@v1
- uses: r-hub/rhub2/actions/rhub-setup-r@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
- uses: r-hub/rhub2/actions/rhub-platform-info@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/rhub2/actions/rhub-setup-deps@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
- name: Check pdflatex installed
run: pdflatex --version
- uses: r-hub/rhub2/actions/rhub-run-check@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}