Skip to content

Commit d79ed3d

Browse files
PR: #17 from Eternal-Night-Archer/fix-ci
add: ci for windows
2 parents 33f48a8 + 65d3c36 commit d79ed3d

File tree

2 files changed

+57
-5
lines changed

2 files changed

+57
-5
lines changed

.github/ci/texlive-win.profile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# From latex3 & fduthesis
2+
# https://github.com/latex3/latex3/blob/main/support/texlive.profile
3+
# https://github.com/stone-zeng/fduthesis/blob/main/.github/workflows/texlive-win.profile
4+
5+
# We use relative paths since the environment variables may not be resolved.
6+
7+
selected_scheme scheme-infraonly
8+
TEXDIR ../tmp/texlive
9+
TEXMFSYSCONFIG ../tmp/texlive/texmf-config
10+
TEXMFSYSVAR ../tmp/texlive/texmf-var
11+
TEXMFLOCAL ../tmp/texlive/texmf-local
12+
TEXMFHOME ../texmf
13+
TEXMFCONFIG ../.texlive/texmf-config
14+
TEXMFVAR ../.texlive/texmf-var
15+
option_doc 0
16+
option_src 0
17+
tlpdbopt_autobackup 0

.github/workflows/test.yaml

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919
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
2020

2121
jobs:
22-
build-ubuntu:
22+
build-linux:
2323
runs-on: ubuntu-latest
2424
strategy:
2525
matrix:
@@ -31,12 +31,12 @@ jobs:
3131
uses: xu-cheng/texlive-action/full@v1
3232
with:
3333
run: |
34-
latexmk ${{ matrix.compiler }} -interaction=nonstopmode -file-line-error -halt-on-error -shell-escape main
34+
latexmk ${{ matrix.compiler }} -interaction=nonstopmode -file-line-error -halt-on-error -shell-escape -jobname=linux${{ matrix.compiler }} main
3535
- name: upload pdf
3636
uses: actions/upload-artifact@v2
3737
with:
3838
name: document linux output
39-
path: main.pdf
39+
path: linux${{ matrix.compiler }}.pdf
4040

4141
build-macos:
4242
runs-on: macos-latest
@@ -65,9 +65,44 @@ jobs:
6565
tlmgr path add
6666
- name: compile LaTeX document
6767
run: |
68-
latexmk ${{ matrix.compiler }} -interaction=nonstopmode -file-line-error -halt-on-error -shell-escape main
68+
latexmk ${{ matrix.compiler }} -interaction=nonstopmode -file-line-error -halt-on-error -shell-escape -jobname=macos${{ matrix.compiler }} main
6969
- name: upload pdf
7070
uses: actions/upload-artifact@v2
7171
with:
7272
name: document macos output
73-
path: main.pdf
73+
path: macos${{ matrix.compiler }}.pdf
74+
75+
build-windows:
76+
runs-on: windows-latest
77+
strategy:
78+
matrix:
79+
compiler: [-xelatex, -lualatex]
80+
env:
81+
SET_PATH: ${env:PATH} = "${{ github.workspace }}\tmp\texlive\bin\win32;" + ${env:PATH}
82+
steps:
83+
- name: checkout
84+
uses: actions/checkout@v2
85+
- name: install Python for minted
86+
uses: actions/setup-python@v4
87+
with:
88+
python-version: '3.9'
89+
- name: pip install Pygments for minted
90+
run: pip install Pygments
91+
- name: install TeXLive
92+
run: |
93+
${{ env.SET_PATH }}
94+
Invoke-WebRequest -Uri https://mirrors.rit.edu/CTAN/systems/texlive/tlnet/install-tl.zip -OutFile install-tl.zip
95+
Expand-Archive install-tl.zip -DestinationPath .
96+
Set-Location install-tl-*
97+
.\install-tl-windows --no-gui --profile ..\.github\ci\texlive-win.profile
98+
tlmgr install ${{ env.TL_PACKAGES }}
99+
tlmgr update --self --all --no-auto-install --repository=https://mirrors.rit.edu/CTAN/systems/texlive/tlnet/
100+
- name: compile LaTeX document
101+
run: |
102+
${{ env.SET_PATH }}
103+
latexmk ${{ matrix.compiler }} -interaction=nonstopmode -file-line-error -halt-on-error -shell-escape -jobname=windows${{ matrix.compiler }} main
104+
- name: upload pdf
105+
uses: actions/upload-artifact@v2
106+
with:
107+
name: document windows output
108+
path: windows${{ matrix.compiler }}.pdf

0 commit comments

Comments
 (0)