diff --git a/.github/ci/texlive-win.profile b/.github/ci/texlive-win.profile new file mode 100644 index 0000000..40ee3d6 --- /dev/null +++ b/.github/ci/texlive-win.profile @@ -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 \ No newline at end of file diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 327c674..19cb216 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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: @@ -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 @@ -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 \ No newline at end of file + 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 \ No newline at end of file