[latex3-commits] [latex3/luamml] main: GH Actions setup (8389cd1)

github at latex-project.org github at latex-project.org
Tue Oct 29 07:31:03 CET 2024


Repository : https://github.com/latex3/luamml
On branch  : main
Link       : https://github.com/latex3/luamml/commit/8389cd1a9d8b84d1687a0fb53a30fd36911cdd8f

>---------------------------------------------------------------

commit 8389cd1a9d8b84d1687a0fb53a30fd36911cdd8f
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Tue Oct 29 06:37:12 2024 +0100

    GH Actions setup


>---------------------------------------------------------------

8389cd1a9d8b84d1687a0fb53a30fd36911cdd8f
 .github/actions/ctan-upload/action.yaml | 38 ++++++++++++++++
 .github/tl_packages                     | 59 +++++++++++++++++++++++++
 .github/workflows/deploy.yaml           | 78 +++++++++++++++++++++++++++++++++
 .github/workflows/main.yaml             | 53 ++++++++++++++++++++++
 4 files changed, 228 insertions(+)

diff --git a/.github/actions/ctan-upload/action.yaml b/.github/actions/ctan-upload/action.yaml
new file mode 100644
index 0000000..9c278a8
--- /dev/null
+++ b/.github/actions/ctan-upload/action.yaml
@@ -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/ctan-upload at v0.1
+      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.
diff --git a/.github/tl_packages b/.github/tl_packages
new file mode 100644
index 0000000..0630b10
--- /dev/null
+++ b/.github/tl_packages
@@ -0,0 +1,59 @@
+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
+fontspec
+gettitlestring
+graphics
+graphics-cfg
+graphics-def
+hologo
+hycolor
+hypdoc
+hyperref
+iftex
+infwarerr
+intcalc
+knuth-lib
+kvdefinekeys
+kvoptions
+kvsetkeys
+l3backend
+l3build
+l3kernel
+l3packages
+latex
+latex-fonts
+latex-lab
+lm
+lm-math
+ltxcmds
+luacolor
+lualatex-math
+pdfescape
+pdfmanagement-testphase
+pdftexcmds
+psnfss
+refcount
+rerunfilecheck
+stringenc
+symbol
+tagpdf
+tools
+underscore
+unicode-math
+uniquecounter
+url
+zapfding
diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml
new file mode 100644
index 0000000..5227c45
--- /dev/null
+++ b/.github/workflows/deploy.yaml
@@ -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 at v4
+      - run: sudo apt-get install tidy
+      - name: Install TeX Live
+        uses: zauguin/install-texlive at 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 at 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: dryrun at example.com
+          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 at v4
+        with:
+          name: Package
+      - name: Create GitHub release
+        uses: ncipollo/release-action at 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 at v4
+        with:
+          sparse-checkout: .github
+      - name: Download package artifact
+        uses: actions/download-artifact at 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
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
new file mode 100644
index 0000000..16d3751
--- /dev/null
+++ b/.github/workflows/main.yaml
@@ -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 at v4
+      - run: sudo apt-get install tidy
+      - 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: ${{ 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 at 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 at v4
+        with:
+          name: Documentation
+          path: "**/*.pdf"
+          # Decide how long to keep the test output artifact:
+          retention-days: 21





More information about the latex3-commits mailing list.