-
Notifications
You must be signed in to change notification settings - Fork 198
75 lines (65 loc) · 2.17 KB
/
test-formats.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
name: build-doc-formats
on:
push:
branches: [master]
pull_request:
jobs:
doc-builds:
name: Documentation builds
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
format: ["man", "text"]
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[linkify,rtd]
- name: Build docs
run: |
sphinx-build -nW --keep-going -b ${{ matrix.format }} docs/ docs/_build/${{ matrix.format }}
doc-builds-pdf:
name: Documentation builds
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
format: ["latex"]
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[linkify,rtd]
- name: Build docs
run: |
sphinx-build -nW --keep-going -b ${{ matrix.format }} docs/ docs/_build/${{ matrix.format }}
- name: Make PDF
uses: xu-cheng/latex-action@v2
with:
working_directory: docs/_build/latex
root_file: "mystparser.tex"
# https://github.com/marketplace/actions/github-action-for-latex#it-fails-due-to-xindy-cannot-be-found
pre_compile: |
ln -sf /opt/texlive/texdir/texmf-dist/scripts/xindy/xindy.pl /opt/texlive/texdir/bin/x86_64-linuxmusl/xindy
ln -sf /opt/texlive/texdir/texmf-dist/scripts/xindy/texindy.pl /opt/texlive/texdir/bin/x86_64-linuxmusl/texindy
wget https://sourceforge.net/projects/xindy/files/xindy-source-components/2.4/xindy-kernel-3.0.tar.gz
tar xf xindy-kernel-3.0.tar.gz
cd xindy-kernel-3.0/src
apk add make
apk add clisp --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
make
cp -f xindy.mem /opt/texlive/texdir/bin/x86_64-linuxmusl/
cd ../../
env:
XINDYOPTS: -L english -C utf8 -M sphinx.xdy