Skip to content

Commit 9a3cc17

Browse files
Merge branch '26_1' into 26_1_leak_test_tune_v2
2 parents d0ccde8 + e79ad9a commit 9a3cc17

2 files changed

Lines changed: 21 additions & 6 deletions

File tree

.github/workflows/visual-tests-demos.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -658,23 +658,38 @@ jobs:
658658
- name: Install dependencies
659659
run: pnpm install --frozen-lockfile
660660

661+
- name: Set Roboto font directory
662+
if: contains(matrix.THEME, 'material')
663+
run: echo "ROBOTO_FONT_DIR=${HOME}/.local/share/fonts/roboto" >> $GITHUB_ENV
664+
661665
- name: Cache Roboto font
662666
if: contains(matrix.THEME, 'material')
663667
id: cache-roboto
664668
uses: actions/cache@v4
665669
with:
666-
path: /usr/share/fonts/truetype/roboto
667-
key: roboto-font-${{ runner.os }}
670+
path: ${{ env.ROBOTO_FONT_DIR }}
671+
key: roboto-font-${{ runner.os }}-8b0a1d0f5983c89bc2b93f1b5fb55f9e252744b5
668672

669673
- name: Install Roboto font for Material theme
670674
if: contains(matrix.THEME, 'material') && steps.cache-roboto.outputs.cache-hit != 'true'
675+
env:
676+
GOOGLE_FONTS_COMMIT: 8b0a1d0f5983c89bc2b93f1b5fb55f9e252744b5
677+
ROBOTO_SHA256: d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134
671678
run: |
672-
echo "Installing Roboto font..."
673-
sudo apt-get update -qq
674-
sudo apt-get install -y -qq fonts-roboto fonts-roboto-unhinted
675-
sudo fc-cache -f -v > /dev/null 2>&1 || true
679+
echo "Installing Roboto font from google/fonts (pinned commit)..."
680+
mkdir -p "$ROBOTO_FONT_DIR"
681+
BASE_URL="https://raw.githubusercontent.com/google/fonts/${GOOGLE_FONTS_COMMIT}/ofl/roboto"
682+
683+
curl -fsSL "${BASE_URL}/Roboto%5Bwdth%2Cwght%5D.ttf" -o /tmp/Roboto.ttf
684+
echo "${ROBOTO_SHA256} /tmp/Roboto.ttf" | sha256sum -c -
685+
686+
mv /tmp/Roboto.ttf "$ROBOTO_FONT_DIR/"
676687
echo "Roboto font installed"
677688
689+
- name: Refresh font cache
690+
if: contains(matrix.THEME, 'material')
691+
run: fc-cache -f > /dev/null 2>&1
692+
678693
- name: Run Web Server
679694
run: python -m http.server 8080 &
680695

-23 Bytes
Loading

0 commit comments

Comments
 (0)