Skip to content

Commit

Permalink
GH Actions setup
Browse files Browse the repository at this point in the history
  • Loading branch information
zauguin committed Oct 29, 2024
1 parent 3b69553 commit f4f3790
Show file tree
Hide file tree
Showing 4 changed files with 222 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/actions/ctan-upload/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CTAN upload

inputs:
filename:
required: true
dry-run:
required: true
uploader:
required: true
email:
required: true
version:
required: false
default: ${{ github.ref_name }}

runs:
using: composite
steps:
- name: Send to CTAN
uses: zauguin/[email protected]
with:
package-name: luaotfload
version: ${{ inputs.version }}
author: 'Marcel Krüger, LaTeX Project Team'
uploader: ${{ inputs.uploader }}
email: ${{ inputs.email }}
license: lppl1.3
summary: "Automatically generate MathML from LuaLaTeX math mode material"
ctan-path: /macros/luatex/latex/luamml
support: https://github.com/latex3/luamml/issues
update: true
topic: maths,luatex
description: |
LuaMML is an experimental package to automatically generate a MathML representation of mathematical expessions written in LuaLaTeX documents. These MathML representations can be used for improving accessibility or to ease conversion into new output formats like HTML.
filename: ${{ inputs.filename }}
dry-run: ${{ inputs.dry-run }}
announcement-filename: ctan.ann
note: Uploaded automatically by GitHub Actions.
53 changes: 53 additions & 0 deletions .github/tl_packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
scheme-minimal latex-bin l3build
#Proudly generated by the Island of TeX's DEPendency Printer https://gitlab.com/islandoftex/texmf/depp
alphalph
amsfonts
amsmath
bigintcalc
bitset
bookmark
booktabs
cm
colortbl
csquotes
enumitem
etoolbox
fancyvrb
firstaid
gettitlestring
graphics
graphics-cfg
graphics-def
hologo
hycolor
hypdoc
hyperref
iftex
infwarerr
intcalc
knuth-lib
kvdefinekeys
kvoptions
kvsetkeys
l3backend
l3kernel
latex
latex-fonts
latex-lab
lm
ltxcmds
luacolor
pdfescape
pdfmanagement-testphase
pdftexcmds
psnfss
refcount
rerunfilecheck
stringenc
symbol
tagpdf
tools
underscore
uniquecounter
url
zapfding
78 changes: 78 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Release

on:
# Only triggers for new tags
push:
tags: "*"

jobs:
# Mostly the same as the main.yaml workflow, but we only use a single job
l3build:
runs-on: ubuntu-latest
steps:
# Boilerplate
- name: Checkout repository
uses: actions/checkout@v4
- run: sudo apt-get install tidy
- name: Install TeX Live
uses: zauguin/install-texlive@v3
with:
# Here we use the same list of packages as in the testing workflow.
package_file: .github/tl_packages
- name: Run l3build
run: l3build ctan -H --show-log-on-error
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: Package
path: |
build/distrib/ctan/*.zip
ctan.ann
- name: Validate CTAN package
uses: ./.github/actions/ctan-upload
with:
uploader: Dummy Name
email: [email protected]
filename: "build/distrib/ctan/luaotfload-ctan.zip"
dry-run: true

github:
runs-on: ubuntu-latex
needs:
- l3build
steps:
- name: Download package artifact
uses: actions/download-artifact@v4
with:
name: Package
- name: Create GitHub release
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5
id: release
with:
artifacts: "build/distrib/ctan/*.zip"
prerelease: ${{ endsWith(github.ref, '-dev') }}
token: ${{ secrets.GITHUB_TOKEN }}
bodyFile: ctan.ann

ctan-upload:
if: "${{ !endsWith(github.ref, '-dev') }}"
runs-on: ubuntu-latest
environment: CTAN
needs:
- l3build
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
sparse-checkout: .github
- name: Download package artifact
uses: actions/download-artifact@v4
with:
name: Package
- name: Upload CTAN package
uses: ./.github/actions/ctan-upload
with:
uploader: ${{ secrets.CTAN_NAME }}
email: ${{ secrets.CTAN_EMAIL }}
filename: "build/distrib/ctan/luaotfload-ctan.zip"
dry-run: false
53 changes: 53 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Automated testing

# Currently we run in two situations:
on:
# Whenever someone pushes to a branch or tag 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.

jobs:
l3build:
runs-on: ubuntu-latest
strategy:
matrix:
kind: [doc, test]
name: "${{ format('{0}', matrix.kind == 'doc' && 'Documentation' || 'Test suite') }}"
steps:
# Boilerplate
- name: Checkout repository
uses: actions/checkout@v4
- run: sudo apt-get install tidy
- name: Install TeX Live
uses: zauguin/install-texlive@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: ${{ 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: ${{ matrix.kind == 'test' && always() }}
uses: zauguin/l3build-failure-artifacts@v1
with:
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.kind == 'doc' && success() }}
uses: actions/upload-artifact@v4
with:
name: Documentation
path: "**/*.pdf"
# Decide how long to keep the test output artifact:
retention-days: 21

0 comments on commit f4f3790

Please sign in to comment.