-
Notifications
You must be signed in to change notification settings - Fork 1.1k
91 lines (85 loc) · 3.04 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
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: >-
scheme-basic 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')"
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
uses: actions/upload-artifact@v4
with:
name: build-result
path: |
thuthesis.pdf
thuthesis-example.pdf
- name: Build release zip
run: |
version=$(git describe --tags)
echo "Current git revision: $version"
python3 utils/create_release.py --version $version
- name: Build CTAN release zip with l3build
run: l3build ctan --config utils/build-ctan
- name: Upload release zip
uses: actions/upload-artifact@v4
with:
name: thuthesis-snapshot-release
path: |
thuthesis-ctan.zip
dist/thuthesis-*.zip
test:
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
matrix:
os: [ubuntu-latest, macos-14, windows-latest]
runs-on: ${{ matrix.os }}
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
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-result-${{ matrix.os }}
path: |
build/test
build/test-testfiles