-
Notifications
You must be signed in to change notification settings - Fork 1
151 lines (128 loc) · 4.91 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
# 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
) & disown
# From https://github.com/zauguin/install-texlive
- name: Generate unique ID
id: get-id
run: |
echo -n ::set-output name=id::
cat /proc/sys/kernel/random/uuid
# From https://github.com/zauguin/install-texlive
- name: Load cache
uses: actions/cache@v2
with:
path: |
~/texlive
~/lmtx
key: tex-v1-${{ steps.get-id.outputs.id }}
restore-keys: tex-v1-
- name: Install TeX Live
uses: zauguin/install-texlive@v1
with:
packages: >
collection-latexrecommended
latex-bin-dev
context
l3build
beebe
blindtext
hyperxmp
ifmtarg
kantlipsum
linebreaker
luacode
luatexbase
optex
path
pgfplots
tugboat
- name: Install ConTeXt LMTX
run: |
if [ ! -d ~/lmtx ]; then
mkdir ~/lmtx
cd ~/lmtx
wget http://lmtx.pragma-ade.nl/install-lmtx/context-linux-64.zip
unzip context-linux-64.zip
rm context-linux-64.zip
chmod +x ./install.sh
cd ~
wget "https://github.com/Witiko/markdown/releases/download/2.13.0/markdown.zip"
unzip markdown.zip
mkdir -p ~/lmtx/tex/texmf-modules
unzip markdown.tds.zip -d ~/lmtx/tex/texmf-modules
fi
cd ~/lmtx
./install.sh
- name: Set environment variables
run: |
echo "lmtx_context=$HOME/lmtx/tex/texmf-linux-64/bin/context" >> $GITHUB_ENV
echo "tl_context=$HOME/texlive/bin/x86_64-linux/context" >> $GITHUB_ENV
echo "TEXMFHOME=$GITHUB_WORKSPACE/texmf" >> $GITHUB_ENV
- 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
- name: Build Documentation
run: |
cd "$GITHUB_WORKSPACE"
l3build doc
- name: Test the package
run: |
# Temporary workaround; see latex3/l3build#232
sed -i '/TEXMFCNF/,+2d' "$(kpsewhich l3build-check.lua)"
l3build check --show-log-on-error
- name: Bundle the package
run: |
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
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.