Skip to content

Merge pull request #213 from ku-nlp/dev #296

Merge pull request #213 from ku-nlp/dev

Merge pull request #213 from ku-nlp/dev #296

Workflow file for this run

name: Build
on: [ push, pull_request ]
jobs:
build:
name: Build the project
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 8
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
pipx install poetry
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
env:
POETRY_PYTHON: ${{ steps.setup-python.outputs.python-path }}
run: |
poetry env use $POETRY_PYTHON
poetry install --no-interaction --without dev,test --no-cache
- name: Build KWJA
run: |
poetry build
- name: Install KWJA from wheel (non-Windows)
if: ${{ matrix.os != 'windows-latest' }}
run: |
pip3 install dist/*.whl
- name: Install KWJA from wheel (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
$whlFile = (Get-ChildItem -Path dist -Filter *.whl).FullName
pip3 install $whlFile
shell: pwsh
- name: Run KWJA (non-Windows)
if: ${{ matrix.os != 'windows-latest' }}
run: |
kwja --version
kwja --help
kwja --tasks typo,char,word --model-size tiny --text "自然言語処理"
kwja --tasks typo,char,seq2seq,word --model-size tiny --text "自然言語処理"
- name: Run KWJA (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
$env:PYTHONUTF8 = "1"
kwja --version
kwja --help
kwja --tasks typo,char,word --model-size tiny --text "自然言語処理"
kwja --tasks typo,char,seq2seq,word --model-size tiny --text "自然言語処理"