Refactor font generation script for FontAwesome-Icons #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Generate LVGL Built-in Fonts | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - '.github/workflows/build-fonts.yml' | |
| - 'scripts/built_in_font/**' | |
| jobs: | |
| generate-fonts: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: false # Fonts are in repo | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - name: Install Python dependencies | |
| run: | | |
| pip install astyle | |
| - name: Install lv_font_conv globally | |
| run: | | |
| npm install -g lv_font_conv | |
| - name: Make font directory | |
| working-directory: ./scripts/built_in_font | |
| run: | | |
| mkdir -p ../../src/font | |
| - name: Generate fonts | |
| working-directory: ./scripts/built_in_font | |
| run: | | |
| python3 generate_all.py | |
| - name: Upload generated fonts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: lvgl-fonts | |
| path: | | |
| src/font/*.c | |
| retention-days: 7 |