This repository has been archived by the owner on Jun 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
132 lines (128 loc) · 4.3 KB
/
continuous-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
name: Generating Variable Fonts
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
font-source:
- NotoLoopedLao.glyphs
- NotoSansLao-MM.glyphs
- NotoSerifLao-MM.glyphs
- NotoLoopedLaoUI.glyphs
- NotoSansLaoUI-MM.glyphs
steps:
- name: Cancel previous
uses: styfle/cancel-workflow-action@0.8.0
with:
access_token: ${{ github.token }}
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Pull main repository
uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build ${{ matrix.font-source }}
run: |
fontmake -g sources/${{ matrix.font-source}} -o variable
- name: Store fonts
uses: actions/upload-artifact@v1
with:
name: variable-fonts
path: variable_ttf
fontbakery:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
font-family:
- NotoLoopedLao
- NotoSansLao
- NotoSerifLao
- NotoLoopedLaoUI
- NotoSansLaoUI
steps:
- name: Pull main repository
uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install fontbakery
- name: Download fonts
uses: actions/download-artifact@v2
id: download
with:
name: variable-fonts
path: builds/variable_ttf
- name: List files
run: |
find builds
- name: Create Fontbakery report directory
run: |
mkdir -p reports/fontbakery
- name: Fontbakery checks ${{ matrix.font-family }}
uses: f-actions/font-bakery@v1
with:
subcmd: "check-opentype"
args: "-x monospace -x glyf_nested_components -x fontbakery_version -x dsig --loglevel WARN --ghmarkdown reports/fontbakery/${{ matrix.font-family }}.md"
path: "builds/variable_ttf/${{ matrix.font-family }}-VF.ttf"
- name: Fontbakery shaping checks ${{ matrix.font-family }}
uses: f-actions/font-bakery@v1
with:
subcmd: "check-profile"
args: "--config fontbakery.yml --html reports/fontbakery/${{ matrix.font-family }}-shaping.html fontbakery.profiles.shaping"
path: "builds/variable_ttf/${{ matrix.font-family }}-VF.ttf"
- name: Store Fontbakery reports
uses: actions/upload-artifact@v1
with:
name: reports-fontbakery
path: reports/fontbakery
fontdiffenator:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
font-family:
- NotoSansLao
- NotoSerifLao
- NotoSansLaoUI
# - NotoLoopedLao
# - NotoLoopedLaoUI
weight: [100, 400, 900]
width: [70, 100]
steps:
- name: Pull main repository
uses: actions/checkout@v2
- name: Setup
run: |
pip install fontdiffenator
- name: Download fonts
uses: actions/download-artifact@v2
id: download
with:
name: variable-fonts
path: builds/variable_ttf
- name: Download previous fonts
run: |
mkdir -p previous
curl -o previous/${{ matrix.font-family }}-VF.ttf https://raw.githubusercontent.com/googlefonts/noto-fonts/main/unhinted/variable-ttf/${{ matrix.font-family }}-VF.ttf
- name: Run fontdiffenator
run: |
mkdir -p reports/fontdiffenator/${{ matrix.font-family }}-weight${{ matrix.weight }}-width${{ matrix.width }}
fontdiffenator previous/${{ matrix.font-family }}-VF.ttf builds/variable_ttf/${{ matrix.font-family }}-VF.ttf -i "wght=${{ matrix.weight }}, wdth=${{ matrix.width }}" --html -r images > ${{ matrix.font-family }}-weight${{ matrix.weight }}-width${{ matrix.width }}.html
mv images ${{ matrix.font-family }}-weight${{ matrix.weight }}-width${{ matrix.width }}.html reports/fontdiffenator/${{ matrix.font-family }}-weight${{ matrix.weight }}-width${{ matrix.width }}
- name: Store FontDiffenator reports
uses: actions/upload-artifact@v1
with:
name: fontdiffenator-reports
path: reports/fontdiffenator