Skip to content

Commit

Permalink
Generate fonts in parallel
Browse files Browse the repository at this point in the history
Need to checkout to call the fetch_dump.sh script
  • Loading branch information
Transfusion committed Mar 27, 2021
1 parent 0fc4311 commit bcc57e5
Showing 1 changed file with 123 additions and 18 deletions.
141 changes: 123 additions & 18 deletions .github/workflows/generate-fonts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,23 @@ on:
- "testing-*"

jobs:
build:
fetch_dump_and_svg_font:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt install wget
- run: sh fetch_dump.sh
- run: sh fetch_svg_font.sh
- run: gzip -d *.txt.gz
- uses: actions/upload-artifact@master
with:
name: raw-data
path: |
./glyphwiki_*.txt
./glyphwiki_dump/
build-mincho-sc:
needs: ["fetch_dump_and_svg_font"]
runs-on: ubuntu-latest
continue-on-error: true
env:
Expand All @@ -19,7 +35,10 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive
- run: sudo apt install wget
- uses: actions/download-artifact@v2
with:
name: raw-data
# - run: sudo apt install wget
- name: Set up Python 3.9.x
uses: actions/setup-python@v2
with:
Expand Down Expand Up @@ -48,40 +67,95 @@ jobs:
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'

- run: sh fetch_dump.sh
- run: sh fetch_svg_font.sh
# - run: sh fetch_dump.sh
# - run: sh fetch_svg_font.sh

# - run: gzip -d *.txt.gz

- run: gzip -d *.txt.gz
# - run: sh clean.sh || exit 0
- name: Mincho SC
run: |
CONFIG=./config_mincho_single.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts g
shopt -s extglob
zip HanaMinLiteSC.zip {Hana*.!(*@(otf|zip)),GlyphWiki*}
rm {Hana*.!(*@(otf|zip)),GlyphWiki*}
# - run: sh clean.sh || exit 0
- name: Mincho TC CJK
- name: Mincho CJK SC
run: |
CONFIG=./config_mincho.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts t
CONFIG=./config_mincho.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts g
shopt -s extglob
zip HanaMinLiteCJKTC.zip {Hana*.!(*@(otf|zip)),GlyphWiki*}
zip HanaMinLiteCJKSC.zip {Hana*.!(*@(otf|zip)),GlyphWiki*}
rm {Hana*.!(*@(otf|zip)),GlyphWiki*}
# - run: sh clean.sh || exit 0
- name: Gothic JP
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
*.otf
*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-mincho-tc:
needs: ["fetch_dump_and_svg_font"]
runs-on: ubuntu-latest
continue-on-error: true
env:
TEST_RUN: true

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/download-artifact@v2
with:
name: raw-data
# - run: sudo apt install wget
- name: Set up Python 3.9.x
uses: actions/setup-python@v2
with:
python-version: 3.9.x
- uses: shogo82148/actions-setup-perl@v1
with:
perl-version: "5.32"
- name: Install Poetry
uses: snok/[email protected]

- name: Cache Poetry virtualenv
uses: actions/cache@v1
id: cache
with:
path: ~/.virtualenvs
key: poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-${{ hashFiles('**/poetry.lock') }}
- name: Set Poetry config
run: |
poetry config virtualenvs.in-project false
poetry config virtualenvs.path ~/.virtualenvs
- name: Install Dependencies
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'

# - run: sh fetch_dump.sh
# - run: sh fetch_svg_font.sh

# - run: gzip -d *.txt.gz

- name: Mincho TC
run: |
CONFIG=./config_gothic_single.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_gothic.txt ./perl-scripts j
CONFIG=./config_mincho_single.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts t
shopt -s extglob
zip HanaGothLiteJP.zip {Hana*.!(*@(otf|zip)),GlyphWiki*}
zip HanaMinLiteTC.zip {Hana*.!(*@(otf|zip)),GlyphWiki*}
rm {Hana*.!(*@(otf|zip)),GlyphWiki*}
# - run: sh clean.sh || exit 0
- name: Gothic KR CJK
- name: Mincho CJK TC
run: |
CONFIG=./config_gothic.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts t
CONFIG=./config_mincho.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts t
shopt -s extglob
zip HanaGothLiteCJKKR.zip {Hana*.!(*@(otf|zip)),GlyphWiki*}
zip HanaMinLiteCJKTC.zip {Hana*.!(*@(otf|zip)),GlyphWiki*}
rm {Hana*.!(*@(otf|zip)),GlyphWiki*}
- name: Release
Expand All @@ -93,3 +167,34 @@ jobs:
*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# - name: Mincho TC CJK
# run: |
# CONFIG=./config_mincho.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts t
# shopt -s extglob
# zip HanaMinLiteCJKTC.zip {Hana*.!(*@(otf|zip)),GlyphWiki*}
# rm {Hana*.!(*@(otf|zip)),GlyphWiki*}

# - name: Gothic JP
# run: |
# CONFIG=./config_gothic_single.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_gothic.txt ./perl-scripts j
# shopt -s extglob
# zip HanaGothLiteJP.zip {Hana*.!(*@(otf|zip)),GlyphWiki*}
# rm {Hana*.!(*@(otf|zip)),GlyphWiki*}

# - name: Gothic KR CJK
# run: |
# CONFIG=./config_gothic.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts t
# shopt -s extglob
# zip HanaGothLiteCJKKR.zip {Hana*.!(*@(otf|zip)),GlyphWiki*}
# rm {Hana*.!(*@(otf|zip)),GlyphWiki*}

# - name: Release
# uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
# with:
# files: |
# *.otf
# *.zip
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit bcc57e5

Please sign in to comment.