[latex3-commits] [git/LaTeX3-latex3-fontspec] gh-actions-test: Minimal test setup (5fb9754)

Marcel Fabian Krüger tex at 2krueger.de
Sat Jul 2 12:43:24 CEST 2022


Repository : https://github.com/latex3/fontspec
On branch  : gh-actions-test
Link       : https://github.com/latex3/fontspec/commit/5fb9754e8438b5ea0d812af8a680db691ea70907

>---------------------------------------------------------------

commit 5fb9754e8438b5ea0d812af8a680db691ea70907
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Sat Jul 2 12:34:48 2022 +0200

    Minimal test setup


>---------------------------------------------------------------

5fb9754e8438b5ea0d812af8a680db691ea70907
 .github/tl_packages         |  70 +++++++++++++++++++++++++++++++
 .github/workflows/main.yaml | 100 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 170 insertions(+)

diff --git a/.github/tl_packages b/.github/tl_packages
new file mode 100644
index 0000000..e49a5d7
--- /dev/null
+++ b/.github/tl_packages
@@ -0,0 +1,70 @@
+# l3build itself and LuaTeX: need for texlua
+l3build luatex texlive-scripts
+
+# Required to build plain and LaTeX formats:
+# TeX90 plain for unpacking
+cm etex knuth-lib latex-bin tex tex-ini-files unicode-data
+xetex
+
+# Dependencies
+geometry
+graphics
+graphics-def
+luatexbase
+ctablestack
+iftex
+luaotfload
+oberdiek
+ltxcmds
+kvsetkeys
+ucharcat
+filehook
+xcolor
+babel
+babel-english
+unicode-math
+polyglossia
+hyph-utf8
+epstopdf-pkg
+lualatex-math
+mathspec
+
+# Fonts
+sourcecodepro
+Asana-Math
+lm-math
+ebgaramond
+tex-gyre
+tex-gyre-math
+gfsporson
+libertine
+stix2-otf
+fira
+tempora
+cm-unicode
+fandol
+
+# for docs
+amsmath
+booktabs
+caption
+colortbl
+csquotes
+docmute
+enumitem
+fancyvrb
+framed
+hyperref
+inconsolata
+kurier
+microtype
+oberdiek
+psnfss
+standalone
+symbol
+tocloft
+tools
+underscore
+url
+varwidth
+zapfding
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
new file mode 100644
index 0000000..8a9314c
--- /dev/null
+++ b/.github/workflows/main.yaml
@@ -0,0 +1,100 @@
+name: Automated testing
+
+# Currently we run in two situations:
+on:
+  # Whenever someone pushes to a branch in our repo
+  push:
+    branches:
+      - "*"
+  # Whenever a pull request is opened, reopened or gets new commits.
+  pull_request:
+# This implies that for every push to a local branch in our repo for which a
+# pull request is open this runs twice. But it's important to ensure that pull
+# requests get tested even if their branch comes from a fork.
+# Also the PR check runs on the merged commit, not on the unmerged branch.
+
+jobs:
+  # The l3build job contains the actual work. We misuse the matrix mechanism to
+  # create three jobs which only differ in minimal elements.
+  # For tags we do not run this since we run the release job instead.
+  l3build:
+    runs-on: ubuntu-20.04
+    strategy:
+      matrix:
+        # include indicates that we want to set explicitly these combinations
+        # and don't want full matrix testing.
+        # "name" is just to make the output more readable.
+        # "l3build_cmd" is the actual command to run
+        # "artifact_name" is which artifact might get generated by this step.
+        # IMPORTANT: artifact_name == "Documentation" is used as a trigger to
+        # generate the artifact from PDF files and not the build directory and
+        # to generate the artifact when the run is successful, not when it fails.
+        include:
+          - name: "Tests: LuaTeX"
+            l3build_cmd: l3build check -e luatex -q --show-log-on-error
+            artifact_name: testfiles
+          - name: "Tests: XeTeX"
+            l3build_cmd: l3build check -e xetex -q --show-log-on-error
+            artifact_name: testfiles
+          # Uses proprietary fonts
+          # - name: "Documentation"
+          #   l3build_cmd: l3build doc -q -H --show-log-on-error
+          #   artifact_name: Documentation
+    name: ${{ matrix.name }}
+    steps:
+      # Boilerplate
+      - name: Checkout repository
+        uses: actions/checkout at v3
+      # GitHub Actions don't regenerate the test if the key doesn't change, so
+      # we integrate a random UUID into the key to keep them different.
+      # DO NOT CHANGE THIS
+      - name: Generate unique ID
+        id: get-id
+        run: |
+          echo -n ::set-output name=id::
+          cat /proc/sys/kernel/random/uuid
+      # Actually load the cache. Since we never reuse the key, we need restore-keys
+      # to indicate the prefix of our caches. This loads the newest cache with this
+      # prefix in the key.
+      #
+      # If we want to force regeneration of the cache, increase the number after
+      # *both* instances of "texlive-v"
+      - name: Load cache
+        uses: actions/cache at v2
+        with:
+          path: ~/texlive
+          key: texlive2022-v0-${{ steps.get-id.outputs.id }}
+          restore-keys: texlive2022-v0-
+      - name: Install TeX Live
+        uses: zauguin/install-texlive at v1
+        with:
+          # List the required TeX Live packages in a separate file to allow reuse in
+          # different workflows.
+          package_file: .github/tl_packages
+      - name: Checkout fonts for testing
+        uses: actions/checkout at v3
+        with:
+          repository: wspr/fontspec-test-fonts
+          path: fontspec-test-fonts
+      - name: Install fonts for testing
+        run: ./fontspec-test-fonts/install.sh
+      - name: Run l3build
+        run: ${{ matrix.l3build_cmd }}
+      # Now we create the artifacts: There are two cases where this happens.
+      # 1. If we failed running tests
+      - name: Archive failed test output
+        if: ${{ always() }}
+        uses: zauguin/l3build-failure-artifacts at v1
+        with:
+          name: ${{ matrix.artifact_name }}
+          # Decide how long to keep the test output artifact:
+          retention-days: 3
+      # 2. If we succeed building documentation
+      - name: Archive documentation
+        if: ${{ matrix.artifact_name == 'Documentation' && success() }}
+        uses: actions/upload-artifact at v2
+        with:
+          name: ${{ matrix.artifact_name }}
+          path: "**/*.pdf"
+          # Decide how long to keep the test output artifact:
+          retention-days: 21





More information about the latex3-commits mailing list.