-
-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add manual trigger to test with TL pretest
- Loading branch information
Showing
1 changed file
with
157 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
name: Automated testing with TeX Live pretest | ||
|
||
# Currently we run in two situations: | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
# Update the TeX Live tree if necessary | ||
texlive-cache: | ||
runs-on: ubuntu-20.04 | ||
name: Update TeX Live | ||
outputs: | ||
cache_key: ${{ steps.texlive.outputs.cache_key }} | ||
steps: | ||
# Boilerplate | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Install TeX Live | ||
id: texlive | ||
uses: zauguin/install-texlive@v3 | ||
with: | ||
# List the required TeX Live packages in a separate file to allow reuse in | ||
# different workflows. | ||
package_file: .github/tl_packages | ||
repository: https://pretest.math.hamburg/ | ||
cache_version: 0-2023 | ||
# 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: | ||
- module: base | ||
config: build | ||
engine: pdftex | ||
- module: base | ||
config: build | ||
engine: xetex | ||
- module: base | ||
config: build | ||
engine: luatex | ||
extra_command: kpsewhich -mktex=tfm -must-exist ecssdc10.tfm | ||
- module: base | ||
config: config-1run | ||
- module: base | ||
config: config-TU | ||
- module: base | ||
config: config-legacy | ||
- module: base | ||
config: config-lthooks | ||
- module: base | ||
config: config-lthooks2 | ||
- module: base | ||
config: config-ltcmd | ||
- module: base | ||
config: config-doc | ||
- module: base | ||
config: config-ltmarks | ||
- module: required/amsmath | ||
- module: required/cyrillic | ||
- module: required/firstaid | ||
- module: required/graphics | ||
- module: required/latex-lab | ||
config: build | ||
- module: required/latex-lab | ||
config: config-OR | ||
- module: required/latex-lab | ||
config: config-mathtagging | ||
- module: required/latex-lab | ||
config: config-OR-luatex | ||
- module: required/latex-lab | ||
config: config-sec-tagging | ||
- module: required/latex-lab | ||
config: config-toc-tagging | ||
- module: required/latex-lab | ||
config: config-block-tagging | ||
- module: required/tools | ||
name: "Tests: ${{ matrix.module }}${{ matrix.config && format(' - {0}', matrix.config) || ''}}${{ matrix.engine && format(' - {0}', matrix.engine) || ''}}" | ||
needs: texlive-cache | ||
continue-on-error: true | ||
steps: | ||
# Boilerplate | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
# We need Ghostscript for dvips and XeTeX tests. | ||
- run: sudo apt-get update && sudo apt-get install ghostscript | ||
- name: Restore TeX Live from cache | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: ~/texlive | ||
key: ${{ needs.texlive-cache.outputs.cache_key }} | ||
fail-on-cache-miss: true | ||
- run: echo $HOME/texlive/bin/x86_64-linux >> $GITHUB_PATH | ||
- if: ${{ matrix.extra_command }} | ||
run: ${{ matrix.extra_command }} | ||
- name: Run l3build | ||
working-directory: ${{ matrix.module }} | ||
run: "l3build check -q${{ matrix.config && format(' -c {0}', matrix.config) || ''}}${{ matrix.engine && format(' -e {0}', matrix.engine) || ''}}" | ||
# Now we create the artifacts for the logs of failed tests | ||
- name: Archive failed test output | ||
if: ${{ always() }} | ||
uses: zauguin/l3build-failure-artifacts@v1 | ||
with: | ||
name: testfiles | ||
# Decide how long to keep the test output artifact: | ||
retention-days: 3 | ||
docs: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
include: | ||
- module: base | ||
environment: LTX_DOC_COMPONENT=1 | ||
- module: base | ||
environment: LTX_DOC_COMPONENT=2 | ||
- module: base | ||
environment: LTX_DOC_COMPONENT=3 | ||
- module: required | ||
name: "Documentation: ${{ matrix.module }}" | ||
needs: texlive-cache | ||
continue-on-error: true | ||
steps: | ||
# Boilerplate | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
# We need Ghostscript for dvips and XeTeX tests. | ||
- run: sudo apt-get update && sudo apt-get install ghostscript | ||
- name: Restore TeX Live from cache | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: ~/texlive | ||
key: ${{ needs.texlive-cache.outputs.cache_key }} | ||
fail-on-cache-miss: true | ||
- run: echo $HOME/texlive/bin/x86_64-linux >> $GITHUB_PATH | ||
- if: ${{ matrix.environment }} | ||
run: echo "${{ matrix.environment }}" >> $GITHUB_ENV | ||
- name: Run l3build | ||
working-directory: ${{ matrix.module }} | ||
run: l3build doc -q -H --show-log-on-error | ||
# Now we create the artifacts for the generated documentation | ||
- name: Archive documentation | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Documentation | ||
path: "**/*.pdf" | ||
# Decide how long to keep the test output artifact: | ||
retention-days: 21 |