Skip to content

Commit

Permalink
tidy up (?) workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
wspr committed Apr 27, 2024
1 parent cf93552 commit f85379e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 47 deletions.
37 changes: 10 additions & 27 deletions .github/workflows/doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,13 @@ on:
# 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.

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

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: "Documentation"
l3build_cmd: l3build doc -q -H --show-log-on-error
artifact_name: Documentation
name: ${{ matrix.name }}
runs-on: ubuntu-latest
steps:
# Boilerplate
- name: Checkout repository
uses: actions/checkout@v4
- name: Install TeX Live
Expand All @@ -50,23 +34,22 @@ jobs:
path: fontspec-test-fonts
- name: Install fonts for testing
run: ./fontspec-test-fonts/install.sh
- name: Run l3build
run: ${{ matrix.l3build_cmd }}
- name: Documentation
l3build_cmd: l3build doc -q -H --show-log-on-error
artifact_name: Documentation
# 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@v1
with:
name: ${{ matrix.artifact_name }}
# Decide how long to keep the test output artifact:
name: Documentation
retention-days: 3
# 2. If we succeed building documentation
- name: Archive documentation
if: ${{ matrix.artifact_name == 'Documentation' && success() }}
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
name: Documentation
path: "**/*.pdf"
# Decide how long to keep the test output artifact:
retention-days: 21
3 changes: 0 additions & 3 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: GitHub Pages with Jekyll

on:
Expand All @@ -22,7 +21,6 @@ concurrency:
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
Expand All @@ -38,7 +36,6 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v3

# Deployment job
deploy:
environment:
name: github-pages
Expand Down
20 changes: 3 additions & 17 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
# 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.

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
# The l3build job contains the actual work. We misuse the matrix mechanism to
Expand All @@ -36,19 +39,13 @@ jobs:
- name: "Tests: XeTeX"
l3build_cmd: l3build check -H -e xetex -q --show-log-on-error
artifact_name: testfiles
# - 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@v4
- name: Install TeX Live
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
cache_version: 2
- name: Checkout fonts for testing
Expand All @@ -60,21 +57,10 @@ jobs:
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@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@v4
with:
name: ${{ matrix.artifact_name }}
path: "**/*.pdf"
# Decide how long to keep the test output artifact:
retention-days: 21

0 comments on commit f85379e

Please sign in to comment.