Skip to content

Commit

Permalink
Automatically build fonts on Github Actions (#10)
Browse files Browse the repository at this point in the history
* Create .github/workflows/python-app.yml (#1)

* Update python-app.yml (#2)

* Update python-app.yml

* Update python-app.yml

* Update python-app.yml

* Update python-app.yml

* Upload build font from Github Actions
  • Loading branch information
lanyizi committed Aug 20, 2023
1 parent c53c1b3 commit 0305392
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
build:

runs-on: macos-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build font
run: |
# python
pip install -r requirements.txt
# # otfcc
# # Install Xcode by mas-cli
# mas install 497799835
# # Note: Xcode initially gets an error because the [Command line Tools:] list box is blank.
# # The following solutions will fix this problem.
# # Refer to [エラー:xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance](https://qiita.com/eytyet/items/59c5bad1c167d5addc68)
# Install otfcc
brew tap caryll/tap
brew install otfcc-mac64
# Making a homograph dictionary
echo "Making a homograph dictionary"
pushd res/phonics/duo_yin_zi/scripts/
python make_pattern_table.py
popd
# Make an unicode table of target Chinese characters
echo "Make an unicode table of target Chinese characters"
pushd res/phonics/unicode_mapping_table/
python make_unicode_pinyin_map_table.py
popd
time python src/main.py --style han_serif
- name: Upload built font
uses: actions/upload-artifact@v3.1.2
with:
path: outputs

0 comments on commit 0305392

Please sign in to comment.