docs: Add VS Code workspace requirement for LaTeX Workshop configuration #170
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: | |
| - master | |
| - proposal | |
| - dev | |
| - fix-ci | |
| pull_request: | |
| branches: | |
| - master | |
| - proposal | |
| - dev | |
| name: test | |
| # Limit concurrency to prevent resource conflicts | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| # Packages needed for the thesis compilation | |
| TL_PACKAGES: | | |
| adjustbox | |
| algorithmicx | |
| algorithms | |
| biber | |
| biblatex | |
| biblatex-gb7714-2015 | |
| bibtex | |
| booktabs | |
| caption | |
| carlisle | |
| cases | |
| catchfile | |
| chinese-jfm | |
| chngcntr | |
| circledsteps | |
| cleveref | |
| collectbox | |
| ctex | |
| dvips | |
| enumitem | |
| environ | |
| extarrows | |
| fancybox | |
| fancyhdr | |
| fancyvrb | |
| float | |
| framed | |
| fvextra | |
| gbt7714 | |
| gsftopk | |
| helvetic | |
| hologo | |
| ifplatform | |
| lastpage | |
| latexmk | |
| lineno | |
| listings | |
| minted | |
| multirow | |
| mwe | |
| natbib | |
| needspace | |
| newtx | |
| nth | |
| oberdiek | |
| pdftexcmds | |
| pgf | |
| pict2e | |
| picture | |
| realscripts | |
| rsfs | |
| setspace | |
| siunitx | |
| subfig | |
| tcolorbox | |
| texcount | |
| texliveonfly | |
| threeparttable | |
| threeparttablex | |
| times | |
| titling | |
| tocloft | |
| trimspaces | |
| txfonts | |
| ucs | |
| upquote | |
| was | |
| xcolor | |
| xecjk | |
| xpatch | |
| xstring | |
| zhnumber | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| strategy: | |
| matrix: | |
| compiler: [-xelatex, -lualatex] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install Python for minted | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Pygments for minted | |
| run: pip install Pygments | |
| - name: Install TeX Live | |
| uses: tex-live/setup-texlive-action@v3 | |
| with: | |
| version: 2025 | |
| packages: ${{ env.TL_PACKAGES }} | |
| update-all-packages: true | |
| - name: Compile LaTeX document | |
| run: | | |
| make ENGINE=${{ matrix.compiler }} all | |
| mv main.pdf linux${{ matrix.compiler }}.pdf | |
| - name: Check compile | |
| if: ${{ failure() }} | |
| run: | | |
| cat main.log | |
| - name: Upload pdf | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: document-linux-${{ matrix.compiler }} | |
| path: linux${{ matrix.compiler }}.pdf | |
| retention-days: 30 | |
| build-macos: | |
| runs-on: macos-latest | |
| timeout-minutes: 45 | |
| strategy: | |
| matrix: | |
| compiler: [-xelatex, -lualatex] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install Python for minted | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Pygments for minted | |
| run: pip install Pygments | |
| - name: Install TeX Live | |
| uses: tex-live/setup-texlive-action@v3 | |
| with: | |
| version: 2025 | |
| packages: ${{ env.TL_PACKAGES }} | |
| update-all-packages: true | |
| - name: Compile LaTeX document | |
| run: | | |
| make ENGINE=${{ matrix.compiler }} all | |
| mv main.pdf macos${{ matrix.compiler }}.pdf | |
| - name: Check compile | |
| if: ${{ failure() }} | |
| run: | | |
| cat main.log | |
| - name: Upload pdf | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: document-macos-${{ matrix.compiler }} | |
| path: macos${{ matrix.compiler }}.pdf | |
| retention-days: 30 | |
| build-windows: | |
| runs-on: windows-latest | |
| timeout-minutes: 45 | |
| strategy: | |
| matrix: | |
| compiler: [-xelatex, -lualatex] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install Python for minted | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Pygments for minted | |
| run: pip install Pygments | |
| - name: Install TeX Live | |
| uses: tex-live/setup-texlive-action@v3 | |
| with: | |
| version: 2025 | |
| packages: ${{ env.TL_PACKAGES }} | |
| update-all-packages: true | |
| - name: Compile LaTeX document | |
| run: | | |
| .\make.bat thesis ${{ matrix.compiler }} | |
| mv main.pdf windows${{ matrix.compiler }}.pdf | |
| - name: Check compile | |
| if: ${{ failure() }} | |
| run: | | |
| cat main.log | |
| - name: Upload pdf | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: document-windows-${{ matrix.compiler }} | |
| path: windows${{ matrix.compiler }}.pdf | |
| retention-days: 30 | |
| # Summary job to check all builds completed successfully | |
| test-summary: | |
| runs-on: ubuntu-latest | |
| needs: [build-linux, build-macos, build-windows] | |
| if: always() | |
| steps: | |
| - name: Check all builds succeeded | |
| run: | | |
| echo "Linux build status: ${{ needs.build-linux.result }}" | |
| echo "macOS build status: ${{ needs.build-macos.result }}" | |
| echo "Windows build status: ${{ needs.build-windows.result }}" | |
| if [[ "${{ needs.build-linux.result }}" != "success" || | |
| "${{ needs.build-macos.result }}" != "success" || | |
| "${{ needs.build-windows.result }}" != "success" ]]; then | |
| echo "One or more builds failed" | |
| exit 1 | |
| fi | |
| echo "All builds completed successfully" | |
| # Collect all compiled PDFs into a single artifact | |
| collect-pdfs: | |
| runs-on: ubuntu-latest | |
| needs: test-summary | |
| if: needs.test-summary.result == 'success' | |
| steps: | |
| - name: Download all PDF artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: document-* | |
| merge-multiple: true | |
| - name: List downloaded files | |
| run: | | |
| echo "Downloaded PDF files:" | |
| ls -la *.pdf | |
| - name: Upload consolidated PDFs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: all-compiled-documents | |
| path: "*.pdf" | |
| retention-days: 90 |