Pretokenized span 개선 #273
Workflow file for this run
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
name: macOS | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-macos: | |
strategy: | |
matrix: | |
include: | |
- name: "macOS 11 + Xcode 11.7" | |
os: macos-11 | |
compiler: xcode | |
version: "11.7" | |
- name: "macOS 11 + Xcode 12.2" | |
os: macos-11 | |
compiler: xcode | |
version: "12.4" | |
- name: "macOS 11 + gcc-10" | |
os: macos-11 | |
compiler: gcc | |
version: "10" | |
- name: "macOS 11 + gcc-11" | |
os: macos-11 | |
compiler: gcc | |
version: "11" | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.name }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
lfs: true | |
- name: Configure Compiler | |
run: | | |
if [ "${{ matrix.compiler }}" = "gcc" ]; then | |
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV | |
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV | |
else | |
ls -ls /Applications/ | |
sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app | |
echo "CC=clang" >> $GITHUB_ENV | |
echo "CXX=clang++" >> $GITHUB_ENV | |
fi | |
- name: Configure Build | |
run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DKIWI_JAVA_BINDING=1 .. | |
- name: Build | |
run: cd build && make -j2 | |
- name: Run Unit Test | |
run: ./build/test/kiwi-test | |
- name: Run Unit Test in Debug mode | |
if: failure() | |
run: | | |
mkdir build_debug && cd build_debug && cmake -DCMAKE_BUILD_TYPE=Debug .. && make -j2 | |
cd .. && lldb -o run -o bt ./build_debug/test/kiwi-test | |
- name: Run Java Unit Test | |
run: | | |
cd bindings/java | |
curl -OL https://repo1.maven.org/maven2/junit/junit/4.13.2/junit-4.13.2.jar | |
curl -OL https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar | |
javac -cp "*:../../build/bindings/java/*:." -encoding utf-8 kr/pe/bab2min/KiwiTest.java | |
java -cp "*:../../build/bindings/java/*:." org.junit.runner.JUnitCore kr.pe.bab2min.KiwiTest | |
- name: Run Evaluator | |
run: | | |
mkdir eval_results | |
./build/kiwi-evaluator -m ./ModelGenerator eval_data/*.txt -o eval_results/ | |
./build/kiwi-evaluator -m ./ModelGenerator eval_data/*.txt --sbg -o eval_results/ | |
- name: Run Benchmark | |
run: | | |
curl -OL https://latina.bab2min.pe.kr/_data/kowiki1000.txt | |
./build/kiwi-cli-* -m ./ModelGenerator -e -o test.out kowiki1000.txt | |
KIWI_ARCH_TYPE=none ./build/kiwi-cli-* -m ./ModelGenerator -e -o test.out kowiki1000.txt | |
KIWI_ARCH_TYPE=balanced ./build/kiwi-cli-* -m ./ModelGenerator -e -o test.out kowiki1000.txt | |
KIWI_ARCH_TYPE=sse2 ./build/kiwi-cli-* -m ./ModelGenerator -e -o test.out kowiki1000.txt | |
KIWI_ARCH_TYPE=sse4_1 ./build/kiwi-cli-* -m ./ModelGenerator -e -o test.out kowiki1000.txt | |
KIWI_ARCH_TYPE=avx2 ./build/kiwi-cli-* -m ./ModelGenerator -e -o test.out kowiki1000.txt | |
KIWI_ARCH_TYPE=avx2 ./build/kiwi-cli-* -m ./ModelGenerator -e -o test.out --sbg kowiki1000.txt | |
KIWI_ARCH_TYPE=avx2 ./build/kiwi-cli-* -m ./ModelGenerator -e -o test.out --typos 6 kowiki1000.txt | |
- name: Archive binaries | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Artifacts ${{ matrix.name }} | |
path: | | |
build/*kiwi* | |
build/test/*kiwi* | |
eval_results/*.txt | |
build/bindings/java/*.jar |