Skip to content

Commit

Permalink
Matrix-test all supported TeX Live versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Witiko committed Sep 9, 2021
1 parent 872fb4d commit 69b9edc
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 9 deletions.
37 changes: 31 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,27 @@ jobs:
files: .
config_file: .markdownlint.yaml
test:
name: Test and publish
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
texlive:
- latest
- TL2014-historic
- TL2015-historic
- TL2016-historic
- TL2017-historic
- TL2018-historic
- TL2019-historic
- TL2020-historic
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build Docker image
run: make docker-image
run: TEXLIVE_TAG=${{ matrix.texlive }} make docker-image
- name: Test Lua command-line interface
run: |
RESULT="$(printf '%s\n' 'Hello *Markdown*! $a_x + b_x = c_x$' |
Expand All @@ -47,6 +59,23 @@ jobs:
run: docker run -v "$PWD":/git-repo -w /git-repo witiko/markdown make test
- name: Build distribution archives
run: docker run -v "$PWD":/git-repo -w /git-repo witiko/markdown make dist gh-pages
publish:
name: Publish
if: github.ref == 'refs/heads/main'
needs:
- shellcheck
- markdownlint
- test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build Docker image
run: make docker-image
- name: Build distribution archives
run: docker run -v "$PWD":/git-repo -w /git-repo witiko/markdown make dist gh-pages
- name: Upload artifact markdown.tds.zip
uses: actions/upload-artifact@v2
with:
Expand All @@ -68,15 +97,13 @@ jobs:
name: markdown.pdf
path: markdown.pdf
- name: Publish user manual
if: github.ref == 'refs/heads/main'
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create a prerelease
if: github.ref == 'refs/heads/main'
uses: marvinpinto/action-automatic-releases@latest
with:
title: The latest version
Expand All @@ -89,11 +116,9 @@ jobs:
markdown.zip
markdown.pdf
- name: Authenticate registry
if: github.ref == 'refs/heads/main'
uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Publish Docker image
if: github.ref == 'refs/heads/main'
run: docker push witiko/markdown --all-tags
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ ARG BINARY_DIR=/usr/local/bin
ARG BUILD_DIR=/git-repo
ARG INSTALL_DIR=/usr/local/texlive/texmf-local

ARG TEXLIVE_TAG=latest-with-cache

FROM texlive/texlive:latest-with-cache as build
FROM texlive/texlive:$TEXLIVE_TAG as build

ARG DEPENDENCIES

Expand Down Expand Up @@ -82,7 +83,7 @@ unzip ${BUILD_DIR}/markdown.tds.zip -d ${BUILD_DIR}/dist
EOF


FROM texlive/texlive:latest-with-cache
FROM texlive/texlive:$TEXLIVE_TAG

ARG AUXILIARY_FILES
ARG DEPENDENCIES
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ base: $(INSTALLABLES)

# This pseudo-target builds a witiko/markdown Docker image.
docker-image:
DOCKER_BUILDKIT=1 docker build -t witiko/markdown:latest .
DOCKER_BUILDKIT=1 docker build --build-arg TEXLIVE_TAG -t witiko/markdown:latest .
docker tag witiko/markdown:latest witiko/markdown:$(VERSION)

# This targets produces a directory with files for the GitHub Pages service.
Expand Down

0 comments on commit 69b9edc

Please sign in to comment.