Skip to content

Commit

Permalink
PR: #17 from Eternal-Night-Archer/fix-ci
Browse files Browse the repository at this point in the history
add: ci for windows
  • Loading branch information
skyleaworlder authored Jun 14, 2022
2 parents 33f48a8 + 65d3c36 commit d79ed3d
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 5 deletions.
17 changes: 17 additions & 0 deletions .github/ci/texlive-win.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# From latex3 & fduthesis
# https://github.com/latex3/latex3/blob/main/support/texlive.profile
# https://github.com/stone-zeng/fduthesis/blob/main/.github/workflows/texlive-win.profile

# We use relative paths since the environment variables may not be resolved.

selected_scheme scheme-infraonly
TEXDIR ../tmp/texlive
TEXMFSYSCONFIG ../tmp/texlive/texmf-config
TEXMFSYSVAR ../tmp/texlive/texmf-var
TEXMFLOCAL ../tmp/texlive/texmf-local
TEXMFHOME ../texmf
TEXMFCONFIG ../.texlive/texmf-config
TEXMFVAR ../.texlive/texmf-var
option_doc 0
option_src 0
tlpdbopt_autobackup 0
45 changes: 40 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
TL_PACKAGES: adjustbox algorithmicx algorithms caption cases chngcntr collectbox ctex enumitem environ extarrows fancybox fancyhdr float lastpage latexmk multirow needspace rsfs setspace subfigure tcolorbox texcount texliveonfly titling tocloft trimspaces ucs xcolor xecjk zhnumber gbt7714 natbib chinese-jfm catchfile fancyvrb framed fvextra ifplatform lineno minted pdftexcmds upquote xstring txfonts times biber biblatex bibtex dvips gsftopk

jobs:
build-ubuntu:
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -31,12 +31,12 @@ jobs:
uses: xu-cheng/texlive-action/full@v1
with:
run: |
latexmk ${{ matrix.compiler }} -interaction=nonstopmode -file-line-error -halt-on-error -shell-escape main
latexmk ${{ matrix.compiler }} -interaction=nonstopmode -file-line-error -halt-on-error -shell-escape -jobname=linux${{ matrix.compiler }} main
- name: upload pdf
uses: actions/upload-artifact@v2
with:
name: document linux output
path: main.pdf
path: linux${{ matrix.compiler }}.pdf

build-macos:
runs-on: macos-latest
Expand Down Expand Up @@ -65,9 +65,44 @@ jobs:
tlmgr path add
- name: compile LaTeX document
run: |
latexmk ${{ matrix.compiler }} -interaction=nonstopmode -file-line-error -halt-on-error -shell-escape main
latexmk ${{ matrix.compiler }} -interaction=nonstopmode -file-line-error -halt-on-error -shell-escape -jobname=macos${{ matrix.compiler }} main
- name: upload pdf
uses: actions/upload-artifact@v2
with:
name: document macos output
path: main.pdf
path: macos${{ matrix.compiler }}.pdf

build-windows:
runs-on: windows-latest
strategy:
matrix:
compiler: [-xelatex, -lualatex]
env:
SET_PATH: ${env:PATH} = "${{ github.workspace }}\tmp\texlive\bin\win32;" + ${env:PATH}
steps:
- name: checkout
uses: actions/checkout@v2
- name: install Python for minted
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: pip install Pygments for minted
run: pip install Pygments
- name: install TeXLive
run: |
${{ env.SET_PATH }}
Invoke-WebRequest -Uri https://mirrors.rit.edu/CTAN/systems/texlive/tlnet/install-tl.zip -OutFile install-tl.zip
Expand-Archive install-tl.zip -DestinationPath .
Set-Location install-tl-*
.\install-tl-windows --no-gui --profile ..\.github\ci\texlive-win.profile
tlmgr install ${{ env.TL_PACKAGES }}
tlmgr update --self --all --no-auto-install --repository=https://mirrors.rit.edu/CTAN/systems/texlive/tlnet/
- name: compile LaTeX document
run: |
${{ env.SET_PATH }}
latexmk ${{ matrix.compiler }} -interaction=nonstopmode -file-line-error -halt-on-error -shell-escape -jobname=windows${{ matrix.compiler }} main
- name: upload pdf
uses: actions/upload-artifact@v2
with:
name: document windows output
path: windows${{ matrix.compiler }}.pdf

0 comments on commit d79ed3d

Please sign in to comment.