[latex3-commits] [git/LaTeX3-latex3-latex2e] gh-actions-split-config: New Actions setup (2ca31254)
Marcel Fabian Krüger
tex at 2krueger.de
Thu Mar 9 03:45:52 CET 2023
Repository : https://github.com/latex3/latex2e
On branch : gh-actions-split-config
Link : https://github.com/latex3/latex2e/commit/2ca312544644cb5bc3b3c0a83721a682575fea6a
>---------------------------------------------------------------
commit 2ca312544644cb5bc3b3c0a83721a682575fea6a
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Thu Mar 9 03:30:47 2023 +0100
New Actions setup
>---------------------------------------------------------------
2ca312544644cb5bc3b3c0a83721a682575fea6a
.github/workflows/main.yaml | 115 ++++++++++++++++++++++++--------------------
1 file changed, 64 insertions(+), 51 deletions(-)
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
index 8c1c03b2..2447495a 100644
--- a/.github/workflows/main.yaml
+++ b/.github/workflows/main.yaml
@@ -46,49 +46,34 @@ jobs:
# 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: base - build - pdftex"
- l3build_cmd: cd base && l3build check -q --show-log-on-error -c build -e pdftex
- artifact_name: testfiles
- - name: "Tests: base - build - xetex"
- l3build_cmd: cd base && l3build check -q --show-log-on-error -c build -e xetex
- artifact_name: testfiles
- - name: "Tests: base - build - luatex"
- l3build_cmd: cd base && kpsewhich -mktex=tfm -must-exist ecssdc10.tfm && l3build check -q --show-log-on-error -c build -e luatex
- artifact_name: testfiles
- - name: "Tests: base - 1run"
- l3build_cmd: cd base && l3build check -q --show-log-on-error -c config-1run
- artifact_name: testfiles
- - name: "Tests: base - TU"
- l3build_cmd: cd base && l3build check -q --show-log-on-error -c config-TU
- artifact_name: testfiles
- - name: "Tests: base - legacy"
- l3build_cmd: cd base && l3build check -q --show-log-on-error -c config-legacy
- artifact_name: testfiles
- - name: "Tests: base - lthooks"
- l3build_cmd: cd base && l3build check -q --show-log-on-error -c config-lthooks
- artifact_name: testfiles
- - name: "Tests: base - lthooks2"
- l3build_cmd: cd base && l3build check -q --show-log-on-error -c config-lthooks2
- artifact_name: testfiles
- - name: "Tests: base - ltcmd"
- l3build_cmd: cd base && l3build check -q --show-log-on-error -c config-ltcmd
- artifact_name: testfiles
- - name: "Tests: base - doc"
- l3build_cmd: cd base && l3build check -q --show-log-on-error -c config-doc
- artifact_name: testfiles
- - name: "Tests: base - ltmarks"
- l3build_cmd: cd base && l3build check -q --show-log-on-error -c config-ltmarks
- artifact_name: testfiles
- - name: "Tests: required"
- l3build_cmd: cd required && l3build check -q --show-log-on-error
- artifact_name: testfiles
- - name: "Documentation: base"
- l3build_cmd: cd base && l3build doc -q -H --show-log-on-error
- artifact_name: Documentation
- - name: "Documentation: required"
- l3build_cmd: cd required && l3build doc -q -H --show-log-on-error
- artifact_name: Documentation
- name: ${{ matrix.name }}
+ - 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
+ name: "Tests: ${{ matrix.module }}${{ matrix.config && format(' - {0}', matrix.config) || ''}}${{ matrix.engine && format(' - {0}', matrix.engine) || ''}}"
needs: texlive-cache
steps:
# Boilerplate
@@ -103,23 +88,49 @@ jobs:
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
- run: ${{ matrix.l3build_cmd }}
- # Now we create the artifacts: There are two cases where this happens.
- # 1. If we failed running tests
+ working-directory: ${{ matrix.module }}
+ run: "l3build check -q --show-log-on-error${{ 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 at v1
with:
- name: ${{ matrix.artifact_name }}
+ name: testfiles
# Decide how long to keep the test output artifact:
retention-days: 3
- # 2. If we succeed building documentation
+ docs:
+ runs-on: ubuntu-20.04
+ strategy:
+ matrix:
+ module:
+ - base
+ - required
+ name: "Documentation: ${{ matrix.module }}"
+ needs: texlive-cache
+ steps:
+ # Boilerplate
+ - name: Checkout repository
+ uses: actions/checkout at 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 at 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
+ - 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
- if: ${{ matrix.artifact_name == 'Documentation' && success() }}
uses: actions/upload-artifact at v3
with:
- name: ${{ matrix.artifact_name }}
+ name: Documentation
path: "**/*.pdf"
# Decide how long to keep the test output artifact:
retention-days: 21
@@ -130,7 +141,9 @@ jobs:
name: Send notifications
runs-on: ubuntu-20.04
# Run after the `l3build` job in order to be able to react to it's output.
- needs: l3build
+ needs:
+ - l3build
+ - docs
# Only run if the tests failed, we don't want to get notifications for every run.
# We don't want information for pull requests since for pull requests from local
# branches we already send notifications when the branch test fails and pull requests
More information about the latex3-commits
mailing list.