fix: TeX Live 2022/2023 或更早版本无法发出警告 #1008
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
| name: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build-latex: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| tl-version: [2021, 2022, 2023, 2024, 2025] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: teatimeguest/setup-texlive-action@v3 | |
| with: | |
| version: ${{ matrix.tl-version }} | |
| package-file: | | |
| .github/tl_packages | |
| ${{ matrix.tl-version < 2024 && '.github/tl_packages_compat' || '' }} | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: fd-find, ripgrep | |
| - name: Restore Microsoft fonts cache | |
| id: microsoft-fonts | |
| uses: actions/cache@v4 | |
| with: | |
| path: /usr/share/fonts/truetype/msttcorefonts | |
| key: microsoft-fonts | |
| - name: Install Microsoft fonts | |
| if: steps.microsoft-fonts.outputs.cache-hit != 'true' | |
| run: | | |
| echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | sudo debconf-set-selections | |
| sudo apt install ttf-mscorefonts-installer | |
| fc-cache --force | |
| - name: Setup TeX Live fonts | |
| run: | | |
| mkdir -p ~/.fonts | |
| ln -s $(kpsewhich -var-value=TEXMFDIST)/fonts/ ~/.fonts/texmf-dist-fonts | |
| fc-cache | |
| - run: ${{ matrix.tl-version < 2024 && 'TEST_SKIP_DOC="1"' || '' }} make test | |
| check-latex: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: teatimeguest/setup-texlive-action@v3 | |
| with: | |
| packages: | | |
| scheme-minimal | |
| xetex | |
| expltools | |
| - run: make cls | |
| - run: make check | |
| check_typos: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check spelling of bithesis.dtx | |
| uses: crate-ci/typos@master | |
| check-links: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Restore the cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: .lycheecache | |
| key: lychee-${{ github.sha }} | |
| restore-keys: lychee- | |
| - name: Check links | |
| uses: lycheeverse/lychee-action@v2 | |
| with: | |
| args: >- | |
| --verbose | |
| --no-progress | |
| --config .github/lychee.toml | |
| . | |
| check-python: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: pipx install ruff | |
| - name: Ruff check | |
| run: | | |
| cd scripts && ruff check --output-format=github . | |
| - name: Ruff format | |
| run: | | |
| cd scripts && ruff format --check --diff |