-
Notifications
You must be signed in to change notification settings - Fork 1
443 lines (430 loc) · 19.2 KB
/
nfssext-autochecks.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
# This is a basic workflow to help you get started with Actions
# https://github.com/latex3/hyperref/blob/adc36adbc3650db73329469b43afb0ee86e3c807/.github/workflows/main.yaml
# https://github.com/josephwright/siunitx/blob/main/.github/workflows/main.yaml
name: Automatic Checks for nfssext
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches:
# - "*"
# - "*workflow"
- '*'
paths:
- '**'
- '!**.md'
- '!**.txt'
- '!.github/workflows/*.yml'
- '.github/workflows/nfssext-autochecks.yml'
- '!licences/**'
- '!test/**'
pull_request:
branches:
- "*"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# addaswyd o https://github.com/latex3/latex2e/blob/develop/.github/workflows/main.yaml
# update TL tree if needed
texlive-cache:
runs-on: ubuntu-latest
name: Update TeX Live cache
outputs:
cache_key: ${{ steps.texlive.outputs.cache_key }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repo
uses: actions/checkout@v4
- name: Install TeX Live
id: texlive
uses: zauguin/install-texlive@v3
with:
# List the required TeX Live packages in a separate file to allow reuse in
# different workflows.
package_file: .github/tl_packages
clm:
if: ${{ !cancelled() }}
# The type of runner that the job will run on
runs-on: ubuntu-latest
name: "Test build: cfr-lm"
needs: texlive-cache
# nfssext-cfr uses cfr-lm (though it falls back if built first)
# cfr-lm uses nfssext-cfr but there's nothing to build
outputs:
clm_cache_key: $(( steps.clm-cache.outputs.cache_key }}
fnttarg_clm_output: ${{ steps.fnttarg-clm.outputs.build_ret_clm }}
ctan_clm_output: ${{ steps.ctan-clm.outputs.ctan_ret_clm }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repo
uses: actions/checkout@v4
# https://github.com/josephwright/siunitx/blob/549cad913591b92a3a199b7477a325866303bf29/.github/workflows/main.yaml
# We need Ghostscript for XeTeX tests.
- run: sudo apt-get update #&& sudo apt-get install ghostscript
# Steps represent a sequence of tasks that will be executed as part of the job
- name: Restore TeX Live from cache
uses: actions/cache/restore@v4
with:
path: ~/texlive
key: ${{ needs.texlive-cache.outputs.cache_key }}
fail-on-cache-miss: true
# oes angen hwn?
# oes!
- name: Set PATH
run: echo $HOME/texlive/bin/x86_64-linux >> $GITHUB_PATH
- name: Run l3build fnttarg
id: fnttarg-clm
working-directory: cfr-lm
# run: (l3build fnttarg && echo "BUILD_RET=0" >> "$GITHUB_OUTPUT") || echo "BUILD_RET=1" >> "$GITHUB_OUTPUT"
run: |
(l3build fnttarg && echo -e "BUILD_RET=0\nbuild_ret_clm=0" >> "$GITHUB_OUTPUT") || echo -e "BUILD_RET=1\nbuild_ret_clm=1" >> "$GITHUB_OUTPUT"
cat "$GITHUB_OUTPUT"
- name: Archive failed build output
# run even iff previous step failed
if: ${{ !cancelled() && !(steps.fnttarg-clm.outputs.BUILD_RET) }}
# dwyn o https://github.com/latex3/latex2e/blob/develop/.github/workflows/main.yaml
uses: actions/upload-artifact@v4
with:
name: buildfiles-clm
path: build/fnt/*.log
# Decide how long to keep the test output artefact:
retention-days: 7
- name: Run l3build ctan
# run only if build succeeded
if: ${{ !cancelled() && (steps.fnttarg-clm.outputs.BUILD_RET) }}
working-directory: cfr-lm
id: ctan-clm
# run: l3build ctan
run: |
(l3build ctan && echo "CTAN_RET=0" >> "$GITHUB_OUTPUT") || echo "CTAN_RET=1" >> "$GITHUB_OUTPUT"
cat "$GITHUB_OUTPUT"
- name: Run l3build install
# run only if ctan succeeded
if: ${{ !cancelled() && (steps.ctan-clm.outputs.CTAN_RET) }}
working-directory: cfr-lm
id: install-clm
# run: l3build install
run: |
(l3build install && echo "INSTALL_RET=0" >> "$GITHUB_OUTPUT") || echo "INSTALL_RET=1" >> "$GITHUB_OUTPUT"
cat "$GITHUB_OUTPUT"
- name: Update map
# run only if install succeeded
if: ${{ !cancelled() && (steps.install-clm.outputs.INSTALL_RET) }}
id: updmap-clm
run: |
(updmap --user --enable Map=clm.map && echo "UPDMAP_RET=0" >> "$GITHUB_OUTPUT") || echo "UPDMAP_RET=1" >> "GITHUB_OUTPUT"
cat "$GITHUB_OUTPUT"
- name: Archive failed test output for clm
# run even if previous step failed
if: ${{ !cancelled() }}
uses: zauguin/l3build-failure-artifacts@v1
with:
name: testfiles-clm
# Decide how long to keep the test output artefact:
retention-days: 7
- name: Cache build results
# run only if updmap succeeded
if: ${{ !cancelled() && (steps.updmap-clm.outputs.UPDMAP_RET) }}
id: clm-cache
uses: actions/cache/save@v4
with:
path: |
~/.texlive
~/texmf
key: clm-${{ github.sha }}
- name: Archive docs
# dwyn o https://github.com/latex3/latex2e/blob/develop/.github/workflows/main.yaml
uses: actions/upload-artifact@v4
with:
name: docs-cfr-lm
path: cfr-lm/*.pdf
# Decide how long to keep the test output artefact:
retention-days: 30
# addaswyd o https://github.com/latex3/latex2e/blob/develop/.github/workflows/main.yaml
# these do not depend on clm
nfssext:
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
needs: texlive-cache
outputs:
fnttarg_baskervaldadf_output: ${{ steps.fnttarg.outputs.build_ret_baskervaldadf }}
fnttarg_berenisadf_output: ${{ steps.fnttarg.outputs.build_ret_berenisadf }}
fnttarg_electrumadf_output: ${{ steps.fnttarg.outputs.build_ret_electrumadf }}
fnttarg_librisadf_output: ${{ steps.fnttarg.outputs.build_ret_librisadf }}
fnttarg_romandeadf_output: ${{ steps.fnttarg.outputs.build_ret_romandeadf }}
fnttarg_venturisadf_output: ${{ steps.fnttarg.outputs.build_ret_venturisadf }}
ctan_baskervaldadf_output: ${{ steps.ctan.outputs.ctan_ret_baskervaldadf }}
ctan_berenisadf_output: ${{ steps.ctan.outputs.ctan_ret_berenisadf }}
ctan_electrumadf_output: ${{ steps.ctan.outputs.ctan_ret_electrumadf }}
ctan_librisadf_output: ${{ steps.ctan.outputs.ctan_ret_librisadf }}
ctan_romandeadf_output: ${{ steps.ctan.outputs.ctan_ret_romandeadf }}
ctan_venturisadf_output: ${{ steps.ctan.outputs.ctan_ret_venturisadf }}
# don't abandon other builds if one module fails
# continue-on-error: true
strategy:
fail-fast: false
matrix:
# include indicates that we want to set explicitly these combinations
# and don't want full matrix testing.
include:
- module: baskervaldadf
working_directory: arkandis/baskervaldadf
pre_target: fnttarg
# fnttarg_id: fnttarg-baskervaldadf
- module: berenisadf
working_directory: arkandis/berenisadf
# berenis needs make, ff
extra_packages: make fontforge
pre_target: fnttarg
# fnttarg_id: fnttarg-berenisadf
- module: electrumadf
working_directory: arkandis/electrumadf
pre_target: fnttarg
# fnttarg_id: fnttarg-electrumadf
- module: librisadf
working_directory: arkandis/librisadf
pre_target: fnttarg
# fnttarg_id: fnttarg-librisadf
- module: romandeadf
working_directory: arkandis/romandeadf
pre_target: fnttarg
# fnttarg_id: fnttarg-romandeadf
- module: venturisadf
working_directory: arkandis/venturisadf
pre_target: fnttarg
# fnttarg_id: fnttarg-venturisadf
name: "Test build: ${{ matrix.module }}"
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repo
uses: actions/checkout@v4
# https://github.com/josephwright/siunitx/blob/549cad913591b92a3a199b7477a325866303bf29/.github/workflows/main.yaml
# We need Ghostscript for XeTeX tests.
- name: Update system
run: sudo apt-get update
- name: Install additional packages if needed
if: ${{ matrix.extra_packages }}
run: sudo apt-get install ${{ matrix.extra_packages }}
- name: Restore TeX Live from cache
uses: actions/cache/restore@v4
with:
path: ~/texlive
key: ${{ needs.texlive-cache.outputs.cache_key }}
fail-on-cache-miss: true
# oes angen hwn?
# oes!
- name: Set PATH
run: echo $HOME/texlive/bin/x86_64-linux >> $GITHUB_PATH
- name: Run l3build fnttarg
if: ${{ matrix.pre_target }}
working-directory: ${{ matrix.working_directory }}
id: fnttarg
run: |
module="${{ matrix.module }}"
(l3build fnttarg && echo -e "BUILD_RET=0\nbuild_ret_${module}=0" >> "$GITHUB_OUTPUT") || echo -e "BUILD_RET=1\nbuild_ret_${module}=1" >> "$GITHUB_OUTPUT"
cat "$GITHUB_OUTPUT"
- name: Archive failed build output
# run even iff previous step failed
if: ${{ !cancelled() && !(steps.fnttarg.outputs.BUILD_RET) }}
# dwyn o https://github.com/latex3/latex2e/blob/develop/.github/workflows/main.yaml
uses: actions/upload-artifact@v4
with:
name: buildfiles-${{ matrix.module }}
path: build/fnt/*.log
# Decide how long to keep the test output artefact:
retention-days: 7
- name: Run l3build
working-directory: ${{ matrix.working_directory }}
id: ctan
run: |
module="${{ matrix.module }}"
(l3build ctan && echo -e "CTAN_RET=0\nctan_ret_${module}=0" >> "$GITHUB_OUTPUT") || echo -e "CTAN_RET=1\nctan_ret_${module}=1" >> "$GITHUB_OUTPUT"
cat "$GITHUB_OUTPUT"
- name: Archive failed test output
# run even if previous step failed
if: ${{ !cancelled() }}
uses: zauguin/l3build-failure-artifacts@v1
with:
name: testfiles-${{ matrix.module }}
# Decide how long to keep the test output artefact:
retention-days: 7
# - name: Archive failed test output workaround
# ddim yn gweithio
# # run iff previous step failed
# if: ${{ !cancelled() && !(steps.ctan.outputs.CTAN_RET) }}
# # dwyn o https://github.com/latex3/latex2e/blob/develop/.github/workflows/main.yaml
# uses: actions/upload-artifact@v4
# with:
# name: testfiles-${{ matrix.module }}
# path: |
# build/test/*.log
# build/test/*.tlg
# build/test/*-auto-test.lvt
# build/test/*.diff
# # Decide how long to keep the test output artefact:
# retention-days: 7
- name: Archive docs
# dwyn o https://github.com/latex3/latex2e/blob/develop/.github/workflows/main.yaml
uses: actions/upload-artifact@v4
with:
name: docs-${{ matrix.module }}
path: ${{ matrix.working_directory }}/*.pdf
# Decide how long to keep the test output artefact:
retention-days: 30
# addaswyd o https://github.com/latex3/latex2e/blob/develop/.github/workflows/main.yaml
# need cfr-lm
# we don't really need the variable doing it in a separate matrix ...
# but leave for now as may be useful
nfssext-needy:
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
needs: [ texlive-cache, clm ]
outputs:
fnttarg_adforn_output: ${{ steps.fnttarg.outputs.build_ret_adforn }}
fnttarg_adfsymbols_output: ${{ steps.fnttarg.outputs.build_ret_adfsymbols }}
ctan_adforn_output: ${{ steps.ctan.outputs.ctan_ret_adforn }}
ctan_adfsymbols_output: ${{ steps.ctan.outputs.ctan_ret_adfsymbols }}
ctan_fontscripts_output: ${{ steps.ctan.outputs.ctan_ret_fontscripts }}
ctan_nfssext_cfr_output: ${{ steps.ctan.outputs.ctan_ret_nfssext-cfr }}
# don't abandon other builds if one module fails
# continue-on-error: true
strategy:
fail-fast: false
matrix:
# include indicates that we want to set explicitly these combinations
# and don't want full matrix testing.
include:
- module: adforn
working_directory: arkandis/adforn
pre_target: fnttarg
extra_needs: clm
- module: adfsymbols
working_directory: arkandis/adfsymbols
pre_target: fnttarg
extra_needs: clm
- module: fontscripts
working_directory: fontscripts
extra_needs: clm
- module: nfssext-cfr
working_directory: nfssext-cfr
extra_needs: clm
name: "Test build: ${{ matrix.module }}"
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repo
uses: actions/checkout@v4
# https://github.com/josephwright/siunitx/blob/549cad913591b92a3a199b7477a325866303bf29/.github/workflows/main.yaml
# We need Ghostscript for XeTeX tests.
- name: Update system
run: sudo apt-get update
- name: Install additional packages if needed
if: ${{ matrix.extra_packages }}
run: sudo apt-get install ${{ matrix.extra_packages }}
- name: Restore TeX Live from cache
uses: actions/cache/restore@v4
with:
path: ~/texlive
key: ${{ needs.texlive-cache.outputs.cache_key }}
fail-on-cache-miss: true
# oes angen hwn?
# oes!
- name: Set PATH
run: echo $HOME/texlive/bin/x86_64-linux >> $GITHUB_PATH
- name: Restore cfr-lm from cache
if: ${{ matrix.extra_needs }}
uses: actions/cache/restore@v4
with:
path: |
~/.texlive
~/texmf
key: clm-${{ github.sha }}
fail-on-cache-miss: true
- name: Run l3build fnttarg
if: ${{ matrix.pre_target }}
working-directory: ${{ matrix.working_directory }}
id: fnttarg
run: |
module="${{ matrix.module }}"
(l3build fnttarg && echo -e "BUILD_RET=0\nbuild_ret_${module}=0" >> "$GITHUB_OUTPUT") || echo -e "BUILD_RET=1\nbuild_ret_${module}=1" >> "$GITHUB_OUTPUT"
cat "$GITHUB_OUTPUT"
- name: Archive failed build output
# run even iff previous step failed
if: ${{ !cancelled() && !(steps.fnttarg.outputs.BUILD_RET) && matrix.pre_target }}
# dwyn o https://github.com/latex3/latex2e/blob/develop/.github/workflows/main.yaml
uses: actions/upload-artifact@v4
with:
name: buildfiles-${{ matrix.module }}
path: build/fnt/*.log
# Decide how long to keep the test output artefact:
retention-days: 7
- name: Run l3build
working-directory: ${{ matrix.working_directory }}
id: ctan
run: |
module="${{ matrix.module }}"
(l3build ctan && echo -e "CTAN_RET=0\nctan_ret_${module}=0" >> "$GITHUB_OUTPUT") || echo -e "CTAN_RET=1\nctan_ret_${module}=1" >> "$GITHUB_OUTPUT"
cat "$GITHUB_OUTPUT"
- name: Archive failed test output
# run even if previous step failed
if: ${{ !cancelled() }}
uses: zauguin/l3build-failure-artifacts@v1
with:
name: testfiles-${{ matrix.module }}
# Decide how long to keep the test output artefact:
retention-days: 7
# - name: Archive failed test output
# ddim yn gweithio
# # run iff previous step failed
# if: ${{ !cancelled() && !(steps.ctan.outputs.CTAN_RET) }}
# uses: actions/upload-artifact@v4
# with:
# name: testfiles-${{ matrix.module }}
# path: |
# build/test/*.log
# build/test/*.tlg
# build/test/*-auto-test.lvt
# build/test/*.diff
# retention-days: 7
- name: Archive docs
# dwyn o https://github.com/latex3/latex2e/blob/develop/.github/workflows/main.yaml
uses: actions/upload-artifact@v4
with:
name: docs-${{ matrix.module }}
path: ${{ matrix.working_directory }}/*.pdf
# Decide how long to keep the test output artefact:
retention-days: 30
summary:
name: summary
needs: [ clm, nfssext, nfssext-needy ]
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
steps:
- name: NFSSEXT Autochecks Summary
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idoutputs
env:
fnttargclm: ${{ needs.clm.outputs.fnttarg_clm_output }}
ctanclm: ${{ needs.clm.outputs.ctan_clm_output }}
fnttargbaskervaldadf: ${{ needs.nfssext.outputs.fnttarg_baskervaldadf_output }}
fnttargberenisadf: ${{ needs.nfssext.outputs.fnttarg_berenisadf_output }}
fnttargelectrumadf: ${{ needs.nfssext.outputs.fnttarg_electrumadf_output }}
fnttarglibrisadf: ${{ needs.nfssext.outputs.fnttarg_librisadf_output }}
fnttargromandeadf: ${{ needs.nfssext.outputs.fnttarg_romandeadf_output }}
fnttargventurisadf: ${{ needs.nfssext.outputs.fnttarg_venturisadf_output }}
ctanbaskervaldadf: ${{ needs.nfssext.outputs.ctan_baskervaldadf_output }}
ctanberenisadf: ${{ needs.nfssext.outputs.ctan_berenisadf_output }}
ctanelectrumadf: ${{ needs.nfssext.outputs.ctan_electrumadf_output }}
ctanlibrisadf: ${{ needs.nfssext.outputs.ctan_librisadf_output }}
ctanromandeadf: ${{ needs.nfssext.outputs.ctan_romandeadf_output }}
ctanventurisadf: ${{ needs.nfssext.outputs.ctan_venturisadf_output }}
fnttargadforn: ${{ needs.nfssext-needy.outputs.fnttarg_adforn_output }}
fnttargadfsymbols: ${{ needs.nfssext-needy.outputs.fnttarg_adfsymbols_output }}
ctanadforn: ${{ needs.nfssext-needy.outputs.ctan_adforn_output }}
ctanadfsymbols: ${{ needs.nfssext-needy.outputs.ctan_adfsymbols_output }}
ctanfontscripts: ${{ needs.nfssext-needy.outputs.ctan_fontscripts_output }}
ctannfssextcfr: ${{ needs.nfssext-needy.outputs.ctan_nfssext_cfr_output }}
run: |
([[ $fnttargclm != 0 || $ctanclm != 0 || $fnttargbaskervaldadf != 0 || $fnttargberenisadf != 0 || $fnttargelectrumadf != 0 || $fnttarglibrisadf != 0 || $fnttargromandeadf != 0 || $fnttargventurisadf != 0 || $ctanbaskervaldadf != 0 || $ctanberenisadf != 0 || $ctanelectrumadf != 0 || $ctanlibrisadf != 0 || $ctanromandeadf != 0 || $ctanventurisadf != 0 || $fnttargadforn != 0 || $fnttargadfsymbols != 0 || $ctanadforn != 0 || $ctanadfsymbols != 0 || $ctanfontscripts != 0 || $ctannfssextcfr != 0 ]] && echo -e "BUILD_RET=1" >> "$GITHUB_OUTPUT") || echo -e "BUILD_RET=0" >> "$GITHUB_OUTPUT"
cat "$GITHUB_OUTPUT"
# vim: sw=2:et:ts=2: