-
Notifications
You must be signed in to change notification settings - Fork 60
87 lines (74 loc) · 1.88 KB
/
CI.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
name: CI
on:
push:
branches:
- master
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
skip_check:
name: Skip check
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
cancel_others: 'true'
paths: '["src/**", "Makefile", "fixdate.pl"]'
check:
name: Check LaTeX
needs: skip_check
if: ${{ needs.skip_check.outputs.should_skip != true }}
runs-on: ubuntu-latest
container: ghcr.io/xu-cheng/texlive-small:latest
steps:
- name: Install tools
run: |
apk add make
tlmgr update --self
tlmgr install chktex
tlmgr install latexindent
- name: Checkout the repository
uses: actions/checkout@v4
- name: Run ChkTeX
run: |
make src/title.tex
cd src
chktex lshort.tex -l ../.chktexrc
- name: Run latexindent
run: |
latexindent -kv -m -l .localSettings.yaml src/*.tex > /dev/null
cat src/indent.log
build_latex:
name: Build LaTeX
needs: skip_check
if: ${{ needs.skip_check.outputs.should_skip != true }}
runs-on: ubuntu-latest
container: ghcr.io/xu-cheng/texlive-full:latest
steps:
- name: Install tools
run: |
tlmgr update --self
tlmgr update --all
apk add make
apk add git
apk add py3-pygments
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build all
run: |
make all
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: result
path: |
*.pdf
pdfbuild