Skip to content

docs: Update font installation instructions #437

docs: Update font installation instructions

docs: Update font installation instructions #437

Workflow file for this run

name: Tests + Code Analysis
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
analyze:
name: Analyze Code
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: python
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
tests-linux:
name: Unit Tests (Linux)
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Download Fonts
run: |
echo "Downloading xml2rfc-fonts..."
mkdir -p ~/.fonts/opentype /usr/share/fonts/truetype /tmp/fonts
wget -q -O /tmp/fonts.tar.gz https://github.com/ietf-tools/xml2rfc-fonts/archive/refs/tags/3.18.0.tar.gz
tar zxf /tmp/fonts.tar.gz -C /tmp/fonts
mv /tmp/fonts/*/noto/* ~/.fonts/opentype/
mv /tmp/fonts/*/roboto_mono/* ~/.fonts/opentype/
ln -sf ~/.fonts/opentype/*.[to]tf /usr/share/fonts/truetype/
echo "Reloading Font Cache..."
fc-cache -f -v
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -qy groff html2text python3-cffi python3-brotli libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0 libxml2-dev libxml2-utils libxslt-dev
echo "Installing pip + wheel..."
python -m pip install --upgrade pip wheel
echo "Installing requirements.txt + test dependencies..."
python -m pip install -r requirements.txt tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=3.2.1" "weasyprint>=53.0,!=57.0,!=60.0"
- name: Generate Valid Tests
run: |
make yestests || true
cp -af tests/out/. tests/valid
- name: Test with tox
env:
PLATFORM: ubuntu-latest
run: tox
tests-macos:
name: Unit Tests (macOS)
runs-on: macos-latest
if: github.event_name == 'pull_request'
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Download Fonts
run: |
echo "Downloading xml2rfc-fonts..."
mkdir -p ~/.fonts/opentype /Library/Fonts/ /tmp/fonts
wget -q -O /tmp/fonts.tar.gz https://github.com/ietf-tools/xml2rfc-fonts/archive/refs/tags/3.18.0.tar.gz
tar zxf /tmp/fonts.tar.gz -C /tmp/fonts
mv /tmp/fonts/*/noto/* ~/.fonts/opentype/
mv /tmp/fonts/*/roboto_mono/* ~/.fonts/opentype/
ln -sf ~/.fonts/opentype/*.[to]tf /Library/Fonts/
echo "Reloading Font Cache..."
fc-cache -f -v
- name: Install dependencies
run: |
brew install pango libffi groff make diffutils
echo "Installing pip + wheel..."
python -m pip install --upgrade pip wheel
echo "Installing requirements.txt + test dependencies..."
python -m pip install -r requirements.txt tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=3.2.1" "weasyprint>=53.0,!=57.0,!=60.0"
- name: Generate Valid Tests
run: |
echo "/usr/local/opt/make/libexec/gnubin" >> $GITHUB_PATH
make yestests || true
cp -af tests/out/. tests/valid
- name: Test with tox
env:
PLATFORM: macos-latest
run: |
echo "/usr/local/opt/make/libexec/gnubin" >> $GITHUB_PATH
tox
# tests-windows:
# name: Unit Tests (Windows)
# runs-on: windows-latest
# if: github.event_name == 'pull_request'
# strategy:
# matrix:
# python-version: ['3.7', '3.8', '3.9', '3.10']
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2
# - name: Setup Python ${{ matrix.python-version }}
# uses: actions/[email protected]
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install Fonts
# shell: pwsh
# working-directory: .github/scripts
# run: |
# Invoke-WebRequest -Uri 'https://github.com/ietf-tools/common/raw/main/scripts/font-install/font-install.exe' -OutFile font-install.exe
# & ./font-install.exe -debug https://fonts.google.com/download?family=Roboto%20Mono
# & ./font-install.exe -debug https://noto-website-2.storage.googleapis.com/pkgs/Noto-unhinted.zip
# - name: Install dependencies
# shell: pwsh
# run: |
# Invoke-WebRequest -Uri 'https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases/download/2022-01-04/gtk3-runtime-3.24.31-2022-01-04-ts-win64.exe' -OutFile gtk.exe
# & ./gtk.exe /S
# choco install make
# echo "Installing pip + wheel..."
# python -m pip install --upgrade pip wheel
# echo "Installing requirements.txt + test dependencies..."
# python -m pip install -r requirements.txt tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=3.2.1" "weasyprint>=53.0,!=57.0,!=60.0"
# - name: Generate Valid Tests
# run: |
# make yestests || true
# cp tests/out/. tests/valid
# - name: Test with tox
# env:
# PLATFORM: windows-latest
# run: tox