Skip to content

Fix moran fixed entries for 睃 and 晙 (#239) #1221

Fix moran fixed entries for 睃 and 晙 (#239)

Fix moran fixed entries for 睃 and 晙 (#239) #1221

Workflow file for this run

on: [push]
jobs:
build:
if: ${{ github.repository == 'rimeinn/rime-moran' }}
runs-on: ubuntu-24.04
strategy:
matrix:
variant: [trad, simp]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup uv
uses: astral-sh/setup-uv@v7
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y opencc p7zip-full
- name: Build
run: |
if [ ${{ matrix.variant }} == trad ]; then
make dist
else
./make_simp_dist.sh
fi
- name: Upload
uses: actions/upload-artifact@v7
with:
name: "${{ matrix.variant == 'trad' && 'Trad' || 'Simp' }}-FullPack"
path: dist/**
- uses: actions/upload-artifact@v7
with:
name: "${{ matrix.variant == 'trad' && 'Trad' || 'Simp' }}-DictsOnly"
path: |
dist/moran.base.dict.yaml
dist/moran.tencent.dict.yaml
dist/moran.moe.dict.yaml
dist/moran.computer.dict.yaml
dist/moran.words.dict.yaml
- name: Deploy to branch
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: dist
publish_branch: ${{ matrix.variant }}
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
mdict:
if: ${{ github.repository == 'rimeinn/rime-moran' }}
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup uv
uses: astral-sh/setup-uv@v7
- name: Build mdict
run: uv run make mdict
- name: Upload mdict
uses: actions/upload-artifact@v7
with:
name: "Mdict"
path: |
moran.mdx
moran.mdd
demo:
if: ${{ github.repository == 'rimeinn/rime-moran' }}
runs-on: ubuntu-24.04
needs: [build]
strategy:
matrix:
variant: [trad, simp]
steps:
- name: Download dist
uses: actions/download-artifact@v8
with:
name: "${{ matrix.variant == 'trad' && 'Trad' || 'Simp' }}-FullPack"
- name: Build demo ${{ matrix.variant }}
run: |
sudo apt-get update -y
sudo apt-get install -y librime-data librime-bin
rm -f *.gram
cat >moran.extended.dict.yaml <<EOF
---
name: moran.extended
version: "mini"
sort: by_weight
use_preset_vocabulary: false
import_tables: [moran.chars, moran.base, moran.words]
...
EOF
rime_deployer --build . /usr/share/rime-data ./build
rm -rf ./*.yaml
- name: Upload demo ${{ matrix.variant }}
uses: actions/upload-artifact@v7
with:
name: "${{ matrix.variant == 'trad' && 'Trad' || 'Simp' }}-Demo"
path: |
build/
lua/
opencc/
test:
if: ${{ github.repository == 'rimeinn/rime-moran' }}
needs: [build]
runs-on: ubuntu-24.04
strategy:
matrix:
schema: [moran, moran_aux, moran.hint, moran.charset, moran.ijrq, simp_moran]
lua_version: [5.5, 5.4, 5.3, 5.2, jit]
librime: [master, 1.13.1]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup uv
uses: astral-sh/setup-uv@v7
- name: Download Rime config
uses: actions/download-artifact@v8
with:
name: ${{ matrix.schema == 'simp_moran' && 'Simp-FullPack' || 'Trad-FullPack' }}
path: ./dist
- name: Setup Mira and dependencies
run: |
wget "https://github.com/rimeinn/mira/releases/download/latest/mira-rime${{ matrix.librime }}-lua${{ matrix.lua_version }}"
chmod +x "mira-rime${{ matrix.librime }}-lua${{ matrix.lua_version }}"
sudo apt install -y opencc
- name: Setup shared data
run: |
sudo apt install -y opencc
cp -a /usr/share/opencc/* dist/opencc/
- name: Test ${{ matrix.schema }}
run: |
"./mira-rime${{ matrix.librime }}-lua${{ matrix.lua_version }}" -C cache tests/${{ matrix.schema }}.test.yaml
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
dict-qa:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- name: 檢查簡體碼表是否有繁體字
run: uv run tools/check_simp_table.py
- name: 檢查詞庫裏是否混入了多空格
run: |
perl -ne '
$c=1 if /^\.\.\./;
die "Bad line: $ARGV: $_" if $c && /^[^#].* /;
$c=0 if eof
' *.dict.yaml