Skip to content

Commit

Permalink
[actions] Extend GitHub action to run also on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoeppe committed Sep 8, 2022
1 parent 7772de4 commit fd027ea
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
30 changes: 27 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,53 @@ defaults:

jobs:
run-checks:
name: Run checks
runs-on: ubuntu-22.04
name: Run checks on ${{matrix.cfg.name}}
runs-on: ${{matrix.cfg.os}}

strategy:
matrix:
cfg:
- { name: 'Linux', os: 'ubuntu-22.04' }
- { name: 'MacOS', os: 'macos-12' }

steps:
- name: checkout
uses: actions/checkout@v2

- name: install GNU tools
if: matrix.cfg.os == 'macos-12'
run: |
brew install gnu-sed
echo "/usr/local/opt/gnu-sed/libexec/gnubin" >> ${GITHUB_PATH}
- name: check-source.sh
run: ../tools/check-source.sh

- name: update-apt-cache
if: matrix.cfg.os == 'ubuntu-22.04'
run: sudo apt-get update

- name: install
- name: install (Linux)
if: matrix.cfg.os == 'ubuntu-22.04'
run: sudo apt-get install latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended lmodern

- name: install (MacOS, Part 1/2)
if: matrix.cfg.os == 'macos-12'
run: |
brew install basictex
eval "$(/usr/libexec/path_helper)"
echo "PATH=${PATH}" >> ${GITHUB_ENV}
sudo tlmgr update --self
sudo tlmgr install latexmk isodate substr relsize ulem fixme rsfs extract layouts enumitem l3packages l3kernel imakeidx splitindex xstring
- name: make
run: make quiet

- name: check-output.sh
run: ../tools/check-output.sh

- name: upload PDF
if: matrix.cfg.os == 'ubuntu-22.04'
uses: actions/upload-artifact@v2
with:
name: draft-snapshot
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Install the `MacTeX distribution <http://tug.org/mactex/>`_.
If you are on a slow network, you'll want to get the `BasicTeX package <http://tug.org/mactex/morepackages.html>`_ instead,
then run the following command to install the other packages that the draft requires:

sudo tlmgr install latexmk isodate substr relsize ulem fixme rsfs extract layouts enumitem l3packages l3kernel imakeidx splitindex
sudo tlmgr install latexmk isodate substr relsize ulem fixme rsfs extract layouts enumitem l3packages l3kernel imakeidx splitindex xstring

---------------------------------------
Getting Started on Debian-based Systems
Expand Down

0 comments on commit fd027ea

Please sign in to comment.