-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
142 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ on: | |
branches: [ "master" ] | ||
jobs: | ||
build: | ||
name: Build binaries on ${{ matrix.os }} - ${{ matrix.arch }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
|
@@ -17,7 +18,7 @@ jobs: | |
- { name: windows, os: windows-latest, arch: x86} | ||
- { name: macos, os: macos-latest, arch: x86_64} | ||
- { name: macos, os: macos-latest, arch: arm64} | ||
- { name: linux, os: ubuntu-latest, arch: x86_64} | ||
- { name: linux, os: ubuntu-latest, arch: x86_64, dicbuild: true} | ||
- { name: linux, os: ubuntu-latest, arch: aarch64, crossbuild: crossbuild-essential-arm64} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -65,35 +66,35 @@ jobs: | |
- name: 7z (dic) | ||
run: 7z a mecab-ko-dic.zip mecab-ko-dic | ||
working-directory: ${{ github.workspace }}/out/opt/mecab/share | ||
if: matrix.name == 'linux' && matrix.arch == 'x86_64' | ||
if: matrix.dicbuild | ||
- name: tar (dic) | ||
run: tar -cvzf mecab-ko-dic.tar.gz mecab-ko-dic | ||
working-directory: ${{ github.workspace }}/out/opt/mecab/share | ||
if: matrix.name == 'linux' && matrix.arch == 'x86_64' | ||
if: matrix.dicbuild | ||
- name: Upload a Dictionary Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: out/opt/mecab/share/mecab-ko-dic.zip | ||
if: matrix.name == 'linux' && matrix.arch == 'x86_64' | ||
if: matrix.dicbuild | ||
- name: Release Dictionary | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') && matrix.name == 'linux' && matrix.arch == 'x86_64' | ||
if: startsWith(github.ref, 'refs/tags/') && matrix.dicbuild | ||
with: | ||
files: out/opt/mecab/share/mecab-ko-dic.zip | ||
- name: Upload a Dictionary Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: out/opt/mecab/share/mecab-ko-dic.tar.gz | ||
if: matrix.name != 'windows' && matrix.name == 'linux' && matrix.arch == 'x86_64' | ||
if: matrix.dicbuild | ||
- name: Release Dictionary | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') && matrix.name == 'linux' && matrix.arch == 'x86_64' | ||
if: startsWith(github.ref, 'refs/tags/') && matrix.dicbuild | ||
with: | ||
files: out/opt/mecab/share/mecab-ko-dic.tar.gz | ||
- name: Remove Dictionary | ||
run: rm -rf mecab-ko-dic mecab-ko-dic.zip mecab-ko-dic.tar.gz | ||
working-directory: ${{ github.workspace }}/out/opt/mecab/share | ||
if: matrix.name == 'linux' && matrix.arch == 'x86_64' | ||
if: matrix.dicbuild | ||
- name: 7z | ||
run: 7z a mecab-ko-${{ matrix.name }}-${{ matrix.arch }}.zip mecab | ||
working-directory: ${{ github.workspace }}/out | ||
|
@@ -122,4 +123,91 @@ jobs: | |
if: startsWith(github.ref, 'refs/tags/') && matrix.name != 'windows' | ||
with: | ||
files: out/opt/mecab-ko-${{ matrix.name }}-${{ matrix.arch }}.tar.gz | ||
|
||
build_sdist: | ||
name: Build sdist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
- name: Install Python Dependencies | ||
run: pip install meson ninja build | ||
|
||
- name: Build sdist | ||
run: python -m build --sdist . | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: python-artifact | ||
path: ./dist/*.tar.gz | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} - ${{ matrix.cibw_arch }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
include: | ||
- { name: windows, os: windows-2019, msvc_arch: x64, cibw_arch: AMD64} | ||
- { name: windows, os: windows-2019, msvc_arch: x86, cibw_arch: x86} | ||
- { name: macos, os: macos-11, cibw_arch: auto} | ||
- { name: linux, os: ubuntu-20.04, cibw_arch: auto} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: ${{ matrix.msvc_arch }} | ||
if: matrix.name == 'windows' | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_ARCHS: ${{ matrix.cibw_arch }} | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: python-artifact | ||
path: ./wheelhouse/*.whl | ||
build_dic_wheel: | ||
name: Build dic wheel | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
- name: Install Python Dependencies | ||
run: pip install meson ninja build | ||
- name: Configure | ||
run: meson setup builddir -Dbuild_dic=true -Dbuilding_pip_dic=true | ||
working-directory: ${{ github.workspace }} | ||
- name: Build | ||
run: meson compile -C builddir | ||
working-directory: ${{ github.workspace }} | ||
- name: Build Wheel | ||
run: python -m build . | ||
working-directory: ${{ github.workspace }}/builddir | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: python-artifact | ||
path: ./builddir/dist/*.whl | ||
|
||
upload_python_pkgs: | ||
name: Upload Python Packages | ||
needs: [build_sdist, build_wheels, build_dic_wheel] | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: python-artifact | ||
path: dist | ||
|
||
- uses: pypa/[email protected] | ||
with: | ||
user: ${{ secrets.pypi_user }} | ||
password: ${{ secrets.pypi_password }} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "mecab-ko-dic-msvc" | ||
version = "0.998" | ||
description = "Mecab-ko-dic-msvc build" | ||
readme = "../README.md" | ||
maintainers = [ | ||
{ name = "Wonsup Yoon", email = "[email protected]" }, | ||
] | ||
classifiers = [ | ||
"Topic :: Software Development :: Libraries", | ||
] | ||
|
||
[project.urls] | ||
"Documentation" = "https://github.com/Pusnow/mecab-ko-msvc/" | ||
"Source" = "https://github.com/Pusnow/mecab-ko-msvc/" | ||
"Issue Tracker" = "https://github.com/Pusnow/mecab-ko-msvcissues" | ||
|
||
[tool.hatch.build] | ||
artifacts = [ | ||
"mecab-ko-dic/*", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters