@@ -93,37 +93,49 @@ jobs:
9393fail-fast :false
9494matrix :
9595os :[ ubuntu-latest, windows-latest, macOS-latest ]
96- python-version :[ "3.9", "3.10", "3.11", "3.12", "3.13", "3.13t" ]
96+ target :[ "3.9", "3.10", "3.11", "3.12", "3.13", "3.13t" ]
97+ include :
98+ -os :" ubuntu-latest"
99+ target :" sdist"
100+ python-version :" 3.13"
97101exclude :
98102 -os :" windows-latest"
99- python-version :" 3.13t"
103+ target :" 3.13t"
100104
101105runs-on :${{ matrix.os }}
102106steps :
103107 -uses :actions/checkout@v4
104108 -uses :Quansight-Labs/setup-python@v5
105109with :
106- python-version :${{ matrix.python-version }}
110+ python-version :${{ matrix.python-version|| matrix.target }}
107111 -name :Upgrade pip
108112run :python -m pip install --upgrade pip
109113 -name :Show compatible tags
110114run :python -m pip debug --verbose
111- -name :Install our module from TestPyPi
112- run :python -m pip -vvvv install --pre -U -i https://test.pypi.org/simple/ SudachiPy
113- -name :Install dependencies
115+ -name :Install dependencies (test)
114116run :python -m pip install sudachidict_core
115- -name :Install dependencies
117+ -name :Install dependencies (test pretokenizer)
116118# tokenizers for py3.13t is not provided yet
117- if :${{ matrix.python-version != '3.13t' }}
119+ if :${{ matrix.target != '3.13t' }}
118120run :python -m pip install tokenizers
121+ -name :Install dependencies (build sdist)
122+ if :${{ matrix.target == 'sdist' }}
123+ run :python -m pip install -U setuptools setuptools-rust
124+ -name :Install our module from TestPyPi
125+ if :${{ matrix.target != 'sdist' }}
126+ run :python -m pip -vvvv install --pre -U -i https://test.pypi.org/simple/ SudachiPy
127+ -name :Install our module from sdist
128+ if :${{ matrix.target == 'sdist' }}
129+ run :|
130+ python -m pip -vvvv install --pre -U -i https://test.pypi.org/simple/ --no-build-isolation --no-binary SudachiPy SudachiPy
119131
120132 -name :Run test
121- if :${{ matrix.python-version != '3.13t' }}
133+ if :${{ matrix.target != '3.13t' }}
122134working-directory :./python
123135run :python -m unittest
124136 -name :Run test (skip pretokenizer test)
125137# tokenizers for py3.13t is not provided yet
126- if :${{ matrix.python-version == '3.13t' }}
138+ if :${{ matrix.target == '3.13t' }}
127139working-directory :./python
128140run :ls tests/test_*.py | grep -v pretokenizer | xargs -I{} python -m unittest {}
129141 -name :Check that binary works (C mode)