From 658899eaef47b66d27496edb1504e12d0315f40c Mon Sep 17 00:00:00 2001 From: Shengqi Chen Date: Thu, 21 Mar 2024 16:59:25 +0800 Subject: [PATCH] ci: drop custom Docker image again Signed-off-by: Shengqi Chen --- .github/workflows/test.yml | 57 +++++++++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a9b96d2a..dab4689f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,18 +2,42 @@ name: Test on: [push, pull_request, workflow_dispatch] +env: + XECJK_PKGS: fontspec xecjk ulem xetex + CTEX_PKGS: cjk ctex everysel zhnumber + BIBLATEX_PKGS: biber biblatex biblatex-apa biblatex-gb7714-2015 biblatex-mla xstring + HYPERREF_PKGS: pdflscape + NOMENCL_PKGS: nomencl koma-script xkeyval + BIN_PKGS: latexmk l3build + REQUIRED_PKGS: >- + bibunits bigfoot caption enumitem + environ etoolbox filehook footmisc notoccite pdfpages threeparttable + titlesec trimspaces unicode-math lt3luabridge cell + FONT_PKGS: fandol tex-gyre xits + EXTRA_PKGS: algorithms apacite booktabs ntheorem siunitx + MARKDOWN_PKGS: markdown fancyvrb csvsimple gobble + DOC_PKGS: hologo hypdoc listings xcolor + EXAMPLE_PLGS: float fp metalogo multirow mwe + + jobs: build: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'ci skip')" - container: - image: ghcr.io/tuna/thuthesis-test-env - options: --user 1001 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Install TeX Live + uses: teatimeguest/setup-texlive-action@v3 + with: + packages: >- + ${{ env.XECJK_PKGS }} ${{ env.CTEX_PKGS }} ${{ env.BIBLATEX_PKGS }} + ${{ env.HYPERREF_PKGS }} ${{ env.NOMENCL_PKGS }} ${{ env.BIN_PKGS }} + ${{ env.REQUIRED_PKGS }} ${{ env.FONT_PKGS }} ${{ env.EXTRA_PKGS }} + ${{ env.MARKDOWN_PKGS }} ${{ env.DOC_PKGS }} ${{ env.EXAMPLE_PLGS }} + update-all-packages: true - name: Build documentation and example run: make all-dev - name: Upload build results @@ -39,13 +63,32 @@ jobs: dist/thuthesis-*.zip test: - runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'ci skip')" - container: - image: ghcr.io/tuna/thuthesis-test-env - options: --user 1001 + strategy: + matrix: + include: + - runs-on: ubuntu-latest + shell: bash + - runs-on: macos-14 + shell: bash + - runs-on: windows-latest + shell: C:\msys64\usr\bin\bash.exe -e {0} + name: on ${{ matrix.runs-on }} + runs-on: ${{ matrix.runs-on }} + defaults: + run: + shell: ${{ matrix.shell }} steps: - uses: actions/checkout@v4 + - name: Install TeX Live + uses: teatimeguest/setup-texlive-action@v3 + with: + packages: >- + ${{ env.XECJK_PKGS }} ${{ env.CTEX_PKGS }} ${{ env.BIBLATEX_PKGS }} + ${{ env.HYPERREF_PKGS }} ${{ env.NOMENCL_PKGS }} ${{ env.BIN_PKGS }} + ${{ env.REQUIRED_PKGS }} ${{ env.FONT_PKGS }} ${{ env.EXTRA_PKGS }} + ${{ env.MARKDOWN_PKGS }} ${{ env.DOC_PKGS }} ${{ env.EXAMPLE_PLGS }} + update-all-packages: true - name: Test with l3build run: make test - name: Upload test results if failed