ci: new workflow to update setup-texlive cache #148
Workflow file for this run
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
# Based on https://github.com/CTeX-org/ctex-kit/blob/master/.github/workflows/test.yml | |
name: Test suite | |
on: | |
pull_request: | |
types: | |
# added "ready_for_review" | |
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request | |
[opened, ready_for_review, reopened, synchronize] | |
push: | |
schedule: | |
# at 12:21 UTC (20:21 CST/UTC +8) on every Friday | |
# https://crontab.guru/#21_12_*_*_5 | |
- cron: "21 12 * * 5" | |
workflow_dispatch: | |
jobs: | |
tests: | |
strategy: | |
matrix: | |
config: ["build", "config-old"] | |
# TODO: find a way to handle different testfiles when checking | |
# with latex and latex-dev | |
# option: ["", "--dev"] | |
option: [""] | |
name: "Tests: ${{ matrix.config }}\ | |
${{ matrix.option != '' && ' (latex-dev)' || '' }}" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup TeX Live | |
# v3.3.4 is too sensitive to cache update | |
# https://github.com/teatimeguest/setup-texlive-action/issues/329#issuecomment-2518562909 | |
uses: teatimeguest/[email protected] | |
with: | |
package-file: .github/tl_packages | |
update-all-packages: true | |
# imagemagick is pre-installed on Ubuntu 22.04 image | |
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#installed-apt-packages | |
- name: Install ppmcheckpdf dependencies | |
if: matrix.config == 'config-old' | |
# actively maintained | |
uses: gerlero/apt-install@v1 | |
with: | |
packages: imagemagick poppler-utils | |
- name: Run zutil tests | |
if: matrix.config == 'build' | |
run: | | |
cd zutil | |
l3build check \ | |
--halt-on-error --show-saves \ | |
${{ matrix.option }} | |
- name: Run tabularray tests | |
run: | | |
cd tabularray | |
l3build check \ | |
-c${{ matrix.config }} --halt-on-error --show-saves \ | |
${{ matrix.option }} | |
- name: Check tabularray tests with ppmcheckpdf | |
if: matrix.config == 'config-old' | |
run: | | |
cd tabularray | |
texlua buildend.lua | |
# TODO: generate a list of files related to failed tests, then | |
# upload all of them (.tex, .log, .pdf, .png, .md5, etc.) | |
- name: Upload diff files | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
# example names: | |
# - tblr-diffs | |
# - tblr-diffs-dev | |
# - tblr-diffs-config-old | |
# - tblr-diffs-config-old-dev | |
name: "tblr-diffs\ | |
${{ matrix.config != '' && format('-{0}', matrix.config) || '' }}\ | |
${{ matrix.option != '' && '-dev' || '' }}" | |
path: | | |
build/**/*.diff | |
build/**/*.diff.png |