Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically build fonts on Github Actions #10

Merged
merged 3 commits into from
Aug 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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