-
Notifications
You must be signed in to change notification settings - Fork 4
150 lines (148 loc) · 5.28 KB
/
build.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: build
on:
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install apt packages
run: sudo apt-get install --no-install-recommends -y gettext
- name: Setup problem matcher
uses: xt0rted/markdownlint-problem-matcher@v2
- name: Markdownlint
run: >
npx --package [email protected] --
markdownlint '**/*.md' --ignore '_*' --ignore README.md
- name: Make check-po
run: |
echo '::add-matcher::.github/matchers/gettext.json'
make check-po
echo '::remove-matcher owner=gettext::'
echo '::remove-matcher owner=gettext-no-severity::'
linkcheck:
runs-on: ubuntu-22.04
env:
SPHINXOPTS: --color -n -Dsuppress_warnings=git.too_shallow
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install apt packages
run: sudo apt-get install --no-install-recommends -y gettext graphviz
- name: Restore pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('.github/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install pip packages
run: pip install -r .github/requirements.txt
- name: Make linkcheck
run: make linkcheck --keep-going
- name: Collect Sphinx errors
if: ${{ always() }}
run: |
echo '::add-matcher::.github/matchers/sphinx.json'
sort -u -k2 _build/linkcheck/*/output.txt
echo '::remove-matcher owner=sphinx::'
echo '::remove-matcher owner=sphinx-translated::'
echo '::remove-matcher owner=sphinx-loose::'
echo '::remove-matcher owner=sphinx-loose-no-severity::'
echo '::remove-matcher owner=sphinx-no-file::'
html:
runs-on: ubuntu-22.04
env:
SPHINXOPTS: --color -n -Dsuppress_warnings=git.too_shallow
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install apt packages
run: sudo apt-get install --no-install-recommends -y gettext graphviz
- name: Restore pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('.github/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install pip packages
run: pip install -r .github/requirements.txt
- name: Make html/fr
run: make html/fr O='-w errors.html.fr.log'
- name: Make html/en
run: make html/en O='-w errors.html.en.log'
- name: Collect Sphinx errors
if: ${{ always() }}
run: |
echo '::add-matcher::.github/matchers/sphinx.json'
sed 's/\x1b\[[0-9;]*[mGKHF]//g' errors.*.log | sort -u
echo '::remove-matcher owner=sphinx::'
echo '::remove-matcher owner=sphinx-translated::'
echo '::remove-matcher owner=sphinx-loose::'
echo '::remove-matcher owner=sphinx-loose-no-severity::'
echo '::remove-matcher owner=sphinx-no-file::'
- name: Upload html artifact
uses: actions/upload-artifact@v3
with:
name: docs-html
path: _build/html
latex:
runs-on: ubuntu-22.04
env:
SPHINXOPTS: --color -Dsuppress_warnings=git.too_shallow
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install apt packages
run: >
sudo apt-get install --no-install-recommends -y
graphviz
latexmk
texlive-luatex
texlive-latex-extra
texlive-fonts-recommended
texlive-lang-french
fonts-dejavu
xindy
imagemagick
- name: Install TwemojiMozilla font
run: |
wget -nv https://github.com/mozilla/twemoji-colr/releases/download/v0.6.0/TwemojiMozilla.ttf
echo 'e52ebdb734105d3d634936b5ee436b2b91bed9c0200f0e9c84c7d663224610c7 TwemojiMozilla.ttf' | sha256sum -c
mkdir ~/.fonts
mv TwemojiMozilla.ttf ~/.fonts/
fc-cache
- name: Restore pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('.github/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install pip packages
run: pip install -r .github/requirements.txt
- name: Restore LuaTex cache
uses: actions/cache@v3
with:
path: ~/.texlive2021
key: ${{ runner.os }}-texlive2021-${{ hashFiles('.github/workflows/deploy.yml') }}
restore-keys: |
${{ runner.os }}-texlive2021-
- name: Make latexpdf/fr
run: |
echo '::add-matcher::.github/matchers/latex.json'
make latexpdf/fr
echo '::remove-matcher owner=latex-error::'
echo '::remove-matcher owner=latex-line-error::'
echo '::remove-matcher owner=latex-under-over-full::'
echo '::remove-matcher owner=latex-warning::'
- name: Upload pdf artifact
uses: actions/upload-artifact@v3
with:
name: docs-pdf
path: _build/latex/fr/club1.pdf