-
Notifications
You must be signed in to change notification settings - Fork 1
158 lines (136 loc) · 4.93 KB
/
build-test-bundle.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
# lua-widow-control
# https://github.com/gucci-on-fleek/lua-widow-control
# SPDX-License-Identifier: MPL-2.0+
# SPDX-FileCopyrightText: 2022 Max Chernoff
name: Build, Test, and Bundle
on:
push:
branches:
- master
workflow_dispatch:
pull_request:
jobs:
build:
runs-on: ubuntu-22.04
name: Build, Test, and Bundle
steps:
- name: Checkout the Repository
uses: actions/checkout@v2
- name: Install Dependencies
run: >
(sudo apt-get update &&
sudo apt-get install --no-install-recommends -y
poppler-utils
xsltproc
libcurl4-openssl-dev
moreutils
pandoc
) & disown
# From https://github.com/zauguin/install-texlive
- name: Generate unique ID
id: get-id
run: |
echo "id=$(cat /proc/sys/kernel/random/uuid)" >> $GITHUB_STATE
# From https://github.com/zauguin/install-texlive
- name: Load cache
uses: actions/cache@v3
with:
path: |
~/texlive
key: tex-v1-${{ steps.get-id.outputs.id }}
restore-keys: tex-v1-
- name: Install TeX Live
uses: zauguin/install-texlive@v1
continue-on-error: true
with:
packages: >
babel-czech
babel-slovak
beebe
biber
biblatex
biblatex-iso690
blindtext
collection-latexrecommended
context
csbulletin
hyperxmp
hyphen-czech
hyphen-slovak
ifmtarg
kantlipsum
l3build
latex-bin-dev
libertinus-fonts
linebreaker
luacode
luatex85
luatexbase
optex
path
pgfplots
plex
tex-gyre
tex-gyre-math
tugboat
- name: Post-installation setup
run: |
echo "TEXMFHOME=$GITHUB_WORKSPACE/texmf" >> $GITHUB_ENV
sed -i 's/"rb"/"r"/' $(kpsewhich util-sbx.lmt)
tlmgr paper letter &
(mtxrun --generate && context --make && mtxrun --script fonts --reload) &
(mtxrun --luatex --generate && context --luatex --make) &
wait
- uses: actions/cache/save@v3
if: always()
with:
path: |
~/texlive
key: tex-v1-${{ steps.get-id.outputs.id }}
# - name: Install LuaMetaLaTeX
# run: |
# cd ~
# git clone --depth 1 https://github.com/zauguin/luametalatex.git
# cd luametalatex
# l3build install
# mktexlsr
# cd ~
# wget https://lmltx.typesetting.eu/installer-linux64.zip
# unzip installer-linux64.zip
# ./installer
# tlmgr paper letter
- name: Build Documentation
run: |
cd "$GITHUB_WORKSPACE"
l3build doc
- name: Test the package
run: |
l3build check --show-log-on-error
- name: Bundle the package
run: |
# cd ~/luametalatex
# l3build uninstall
cd "$GITHUB_WORKSPACE"
l3build bundle
- name: Archive on failure
if: failure()
uses: actions/upload-artifact@v3
with:
path: |
.
!.git
- name: Generate Release
uses: ncipollo/release-action@v1
if: ${{ github.event_name == 'push' }}
with:
prerelease: true
artifacts: ./lua-widow-control.tds.zip, ./lua-widow-control.ctan.zip, ./texmf/doc/luatex/lua-widow-control/lua-widow-control.pdf, ./texmf/doc/luatex/lua-widow-control/tb133chernoff-widows.pdf, ./texmf/doc/luatex/lua-widow-control/lwc-zpravodaj.pdf
tag: release-${{github.sha}}
commit: ${{github.sha}}
name: Prerelease ${{github.sha}}
body: |
Automatically generated release for ${{github.sha}}
> Lua-widow-control is a Plain TeX/LaTeX/ConTeXt/OpTeX package that removes widows and orphans without any user intervention. Using the power of LuaTeX, it does so _without_ stretching any glue or shortening any pages. Instead, lua-widow-control automatically lengthens a paragraph on a page where a widow or orphan would otherwise occur.
Please note that this is a **prerelease** version of lua-widow-control. Most users should use the [latest release](https://github.com/gucci-on-fleek/lua-widow-control/releases/latest).
---
`lua-widow-control.tds.zip` is a [TDS](https://texdoc.org/serve/tds/0) archive that is designed to be unpacked directly in your `TEXMF/` directory tree. `lua-widow-control.pdf` is the compiled package documentation. `lua-widow-control.ctan.zip` is an archive designed to be uploaded to [CTAN](https://www.ctan.org/help/upload-pkg) by the author (me). `test-results.zip` is a zip archive containing the results of the automated tests.