Skip to content

Commit

Permalink
feat: add ubuntu series
Browse files Browse the repository at this point in the history
  • Loading branch information
zydou committed Aug 29, 2023
1 parent 556f977 commit f28e6e1
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 21 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Test Github Action
on:
push:
branches:
- master
- ubuntu
paths:
- .github/workflows/test.yml
- entrypoint.sh
Expand All @@ -21,8 +21,8 @@ jobs:
fail-fast: false
matrix:
texlive_version: [2018, 2019, 2020, 2021, 2022, 2023, latest]
debian_release: [buster, bullseye, bookworm, trixie]
name: Test ${{matrix.texlive_version}}-${{matrix.debian_release}}
base_image: [buster, bullseye, bookworm, trixie, xenial, bionic, focal, jammy]
name: Test ${{matrix.texlive_version}}-${{matrix.base_image}}
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
Expand All @@ -32,15 +32,15 @@ jobs:
uses: ./
with:
texlive_version: ${{ matrix.texlive_version }}
debian_release: ${{ matrix.debian_release }}
base_image: ${{ matrix.base_image }}
root_file: test.tex
working_directory: test/

- name: Compile LaTeX document with pre/post compile actions
uses: ./
with:
texlive_version: ${{ matrix.texlive_version }}
debian_release: ${{ matrix.debian_release }}
base_image: ${{ matrix.base_image }}
root_file: test.tex
working_directory: test/
pre_compile: |
Expand All @@ -52,7 +52,7 @@ jobs:
uses: ./
with:
texlive_version: ${{ matrix.texlive_version }}
debian_release: ${{ matrix.debian_release }}
base_image: ${{ matrix.base_image }}
root_file: |
file1.tex
file2.tex
Expand All @@ -62,15 +62,15 @@ jobs:
uses: ./
with:
texlive_version: ${{ matrix.texlive_version }}
debian_release: ${{ matrix.debian_release }}
base_image: ${{ matrix.base_image }}
root_file: glob_test*.tex
working_directory: test/

- name: Compile multiple LaTeX documents in different directories
uses: ./
with:
texlive_version: ${{ matrix.texlive_version }}
debian_release: ${{ matrix.debian_release }}
base_image: ${{ matrix.base_image }}
root_file: subdir*/main.tex
working_directory: test/
work_in_root_file_dir: true
Expand All @@ -79,7 +79,7 @@ jobs:
uses: ./
with:
texlive_version: ${{ matrix.texlive_version }}
debian_release: ${{ matrix.debian_release }}
base_image: ${{ matrix.base_image }}
root_file: extglob/!(subdir3)_glob/*.tex
working_directory: test/
work_in_root_file_dir: true
Expand All @@ -88,7 +88,7 @@ jobs:
uses: ./
with:
texlive_version: ${{ matrix.texlive_version }}
debian_release: ${{ matrix.debian_release }}
base_image: ${{ matrix.base_image }}
root_file: globstar/**/*.tex
working_directory: test/
work_in_root_file_dir: true
Expand All @@ -97,31 +97,31 @@ jobs:
uses: ./
with:
texlive_version: ${{ matrix.texlive_version }}
debian_release: ${{ matrix.debian_release }}
base_image: ${{ matrix.base_image }}
root_file: math.tex
working_directory: test/

- name: Compile LaTeX document with biblatex/biber
uses: ./
with:
texlive_version: ${{ matrix.texlive_version }}
debian_release: ${{ matrix.debian_release }}
base_image: ${{ matrix.base_image }}
root_file: biblatex.tex
working_directory: test/

- name: Compile LaTeX document with eps figure
uses: ./
with:
texlive_version: ${{ matrix.texlive_version }}
debian_release: ${{ matrix.debian_release }}
base_image: ${{ matrix.base_image }}
root_file: eps.tex
working_directory: test/

- name: Compile LaTeX document with minted and lualatex
uses: ./
with:
texlive_version: ${{ matrix.texlive_version }}
debian_release: ${{ matrix.debian_release }}
base_image: ${{ matrix.base_image }}
root_file: minted.tex
working_directory: test/
latexmk_shell_escape: true
Expand All @@ -135,7 +135,7 @@ jobs:
uses: ./
with:
texlive_version: ${{ matrix.texlive_version }}
debian_release: ${{ matrix.debian_release }}
base_image: ${{ matrix.base_image }}
root_file: extra_fonts.tex
working_directory: test/
latexmk_use_xelatex: true
Expand All @@ -145,7 +145,7 @@ jobs:
uses: ./
with:
texlive_version: ${{ matrix.texlive_version }}
debian_release: ${{ matrix.debian_release }}
base_image: ${{ matrix.base_image }}
root_file: graphviz.tex
working_directory: test/
compiler: arara
Expand All @@ -156,7 +156,7 @@ jobs:
uses: ./
with:
texlive_version: ${{ matrix.texlive_version }}
debian_release: ${{ matrix.debian_release }}
base_image: ${{ matrix.base_image }}
root_file: |
error.tex
not_error.tex
Expand Down Expand Up @@ -219,6 +219,6 @@ jobs:
- name: Upload
uses: actions/upload-artifact@v3
with:
name: texlive-${{ matrix.texlive_version }}-${{ matrix.debian_release }}
name: texlive-${{ matrix.texlive_version }}-${{ matrix.base_image }}
path: test
if: always()
18 changes: 15 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ inputs:
texlive_version:
description: Tex Live version to be used
default: latest
debian_release:
description: Debian debian_release to be used
base_image:
description: Base image to be used
default: trixie
debian_release:
description: "[Deprecated] use `base_image` instead"
default: deprecated
root_file:
description: The root LaTeX file to be compiled
required: true
Expand Down Expand Up @@ -52,6 +55,15 @@ inputs:
runs:
using: composite
steps:
- name: set base_image
shell: bash
run: |
if [[ "${{ inputs.base_image }}" != "deprecated" ]]; then
echo "Deprecated warning: `debian_release` is deprecated, use `base_image` instead."
echo "BASE_IMG=${{ inputs.debian_release }}" >> "${GITHUB_ENV}"
else
echo "BASE_IMG=${{ inputs.base_image }}" >> "${GITHUB_ENV}"
fi
- shell: bash
run: >
docker run --rm
Expand Down Expand Up @@ -115,7 +127,7 @@ runs:
-v "$GITHUB_ACTION_PATH/entrypoint.sh":/entrypoint.sh
-w "$GITHUB_WORKSPACE"
--entrypoint "/entrypoint.sh"
zydou/texlive:${{ inputs.texlive_version }}-${{ inputs.debian_release }}
zydou/texlive:${{ inputs.texlive_version }}-${{ env.BASE_IMG }}
"${{ inputs.root_file }}"
"${{ inputs.working_directory }}"
"${{ inputs.work_in_root_file_dir }}"
Expand Down

0 comments on commit f28e6e1

Please sign in to comment.