[latex3-commits] [latex3/luaotfload] dev, mac-ci: Switch to matrixes (49f564c2)
github at latex-project.org
github at latex-project.org
Sun Feb 25 14:02:09 CET 2024
Repository : https://github.com/latex3/luaotfload
On branches: dev,mac-ci
Link : https://github.com/latex3/luaotfload/commit/49f564c2d2c4d7af56375555b9b7cabe449922af
>---------------------------------------------------------------
commit 49f564c2d2c4d7af56375555b9b7cabe449922af
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Sun Feb 25 14:02:09 2024 +0100
Switch to matrixes
>---------------------------------------------------------------
49f564c2d2c4d7af56375555b9b7cabe449922af
.github/workflows/main.yaml | 71 +++++++++------------------------------------
1 file changed, 13 insertions(+), 58 deletions(-)
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
index 99cdc522..8e44ea11 100644
--- a/.github/workflows/main.yaml
+++ b/.github/workflows/main.yaml
@@ -16,7 +16,7 @@ jobs:
# The l3build job contains the actual work. We misuse the matrix mechanism to
# create three jobs which only differ in minimal elements.
l3build:
- runs-on: ubuntu-20.04
+ runs-on: ${{(matrix.platform == 'Linux' && 'ubuntu-22.04') || (matrix.platform == 'Windows' && 'windows-2022') || (matrix.platform == 'macOS' && 'macos-13')}}
strategy:
matrix:
# include indicates that we want to set explicitly these combinations
@@ -27,20 +27,25 @@ jobs:
# 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.
+ kind: [test]
+ platform: [Linux, Windows, macOS]
include:
+ - kind: doc
+ platform: Linux
- name: "Test suite"
l3build_cmd: l3build check -q -H --show-log-on-error
artifact_name: testfiles
- name: "Documentation"
l3build_cmd: l3build doc -q -H
artifact_name: Documentation
- name: ${{matrix.name }}
+ name: "${{ format('{0} - {1}', matrix.kind == 'doc' && 'Documentation' || 'Test suite', matrix.platform) }}"
steps:
# Boilerplate
- name: Checkout repository
uses: actions/checkout at v4
# We need docutils for our documentation
- - run: sudo apt-get install python3-docutils
+ - if: ${{ matrix.kind == 'doc' }}
+ run: sudo apt-get update && sudo apt-get install python3-docutils
- name: Install TeX Live
uses: zauguin/install-texlive at v3
with:
@@ -49,75 +54,25 @@ jobs:
package_file: .github/tl_packages
cache_version: 0
- name: Run l3build
- run: ${{ matrix.l3build_cmd }}
+ run: ${{ format('l3build {0} -q -H', matrix.kind == 'doc' && 'doc' || 'check --show-log-on-error') }}
# 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() }}
+ if: ${{ matrix.kind == 'test' && always() }}
uses: zauguin/l3build-failure-artifacts at v1
with:
- name: ${{ matrix.artifact_name }}
+ name: testfiles-${{ matrix.platform }}
# 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() }}
+ if: ${{ matrix.kind == 'doc' && success() }}
uses: actions/upload-artifact at v4
with:
- name: ${{ matrix.artifact_name }}
+ name: Documentation
path: "**/*.pdf"
# Decide how long to keep the test output artifact:
retention-days: 21
- windows:
- runs-on: windows-latest
- name: Tests on Windows
- steps:
- # Boilerplate
- - name: Checkout repository
- uses: actions/checkout at v4
- - name: Install TeX Live
- uses: zauguin/install-texlive at v3
- with:
- # The list of packages to install is in a separate file under .github/tl_packages
- # to allow reuse.
- package_file: .github/tl_packages
- cache_version: 0
- - name: Run l3build
- run: l3build check -q -H --show-log-on-error
- # 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: testfiles-windows
- # Decide how long to keep the test output artifact:
- retention-days: 3
- mac:
- runs-on: macos-13
- name: Tests on macOS
- steps:
- # Boilerplate
- - name: Checkout repository
- uses: actions/checkout at v4
- - name: Install TeX Live
- uses: zauguin/install-texlive at v3.4-alpha1
- with:
- # The list of packages to install is in a separate file under .github/tl_packages
- # to allow reuse.
- package_file: .github/tl_packages
- cache_version: 0
- - name: Run l3build
- run: l3build check -q -H --show-log-on-error
- # 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: testfiles-macos
- # Decide how long to keep the test output artifact:
- retention-days: 3
# GitHub automatically informs the initiator of any action about the result, but
# we additionally want to keep the latex-commits mailing list informed about
# test failures.
More information about the latex3-commits
mailing list.