Skip to content

Commit ac0fe3c

Browse files
committed
ci: add throwaway repro diagnostic workflow
Signed-off-by: Aaron Cupp <mrcupp@mrcupp.com>
1 parent 1016768 commit ac0fe3c

1 file changed

Lines changed: 79 additions & 0 deletions

File tree

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Repro diagnostic (throwaway)
2+
3+
on:
4+
push:
5+
branches: [ci/repro-diagnostic]
6+
workflow_dispatch:
7+
8+
jobs:
9+
diag:
10+
runs-on: ubuntu-24.04
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Install system dependencies
15+
run: |
16+
sudo apt-get update
17+
sudo apt-get install -y --no-install-recommends \
18+
imagemagick \
19+
fonts-poppins \
20+
libcairo2 \
21+
libjpeg-turbo8
22+
23+
- name: Locate Poppins on the runner
24+
run: |
25+
echo "### Poppins location" >> "$GITHUB_STEP_SUMMARY"
26+
echo '```' >> "$GITHUB_STEP_SUMMARY"
27+
echo "brand.toml default path:" >> "$GITHUB_STEP_SUMMARY"
28+
ls -la /usr/share/fonts/truetype/google-fonts/Poppins-Medium.ttf 2>&1 >> "$GITHUB_STEP_SUMMARY" || true
29+
echo "fc-list poppins:" >> "$GITHUB_STEP_SUMMARY"
30+
fc-list 2>/dev/null | grep -i poppins >> "$GITHUB_STEP_SUMMARY" || echo "(none)" >> "$GITHUB_STEP_SUMMARY"
31+
echo "find poppins-medium:" >> "$GITHUB_STEP_SUMMARY"
32+
find /usr/share/fonts -iname 'Poppins-Medium*' 2>/dev/null >> "$GITHUB_STEP_SUMMARY" || true
33+
echo '```' >> "$GITHUB_STEP_SUMMARY"
34+
35+
- uses: actions/setup-python@v5
36+
with:
37+
python-version: "3.12"
38+
cache: pip
39+
40+
- run: pip install -r requirements.txt
41+
42+
- name: make check (BRANDING.md sync)
43+
run: make check
44+
45+
- name: Rebuild all assets into logos/
46+
# Point at whatever Poppins the runner actually has, if the default path is absent.
47+
run: |
48+
if [ ! -f /usr/share/fonts/truetype/google-fonts/Poppins-Medium.ttf ]; then
49+
cand=$(find /usr/share/fonts -iname 'Poppins-Medium*' 2>/dev/null | head -1)
50+
if [ -n "$cand" ]; then echo "POPPINS_TTF=$cand" >> "$GITHUB_ENV"; fi
51+
fi
52+
make build
53+
54+
- name: Report reproduction status (vs committed bytes)
55+
run: |
56+
{
57+
echo "### logos/ changes after rebuild"
58+
echo "Changed files by type:"
59+
for d in svg png favicon; do
60+
n=$(git status --porcelain -- "logos/$d/" | wc -l | tr -d ' ')
61+
echo "- $d: $n changed"
62+
done
63+
echo ""
64+
echo '```'
65+
git status --porcelain -- logos/ || true
66+
echo '```'
67+
echo ""
68+
echo "Diffstat:"
69+
echo '```'
70+
git diff --stat -- logos/ || true
71+
echo '```'
72+
} >> "$GITHUB_STEP_SUMMARY"
73+
74+
- name: Upload rebuilt logos
75+
uses: actions/upload-artifact@v4
76+
with:
77+
name: rebuilt-logos
78+
path: logos/
79+
retention-days: 3

0 commit comments

Comments
 (0)