Dev 0.17.0 #260
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: Ubuntu | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-ubuntu: | |
strategy: | |
matrix: | |
include: | |
- name: "Ubuntu 20.04 + gcc-10" | |
os: ubuntu-20.04 | |
compiler: gcc | |
version: "10" | |
- name: "Ubuntu 22.04 + gcc-11" | |
os: ubuntu-22.04 | |
compiler: gcc | |
version: "11" | |
- name: "Ubuntu 20.04 + clang-10" | |
os: ubuntu-20.04 | |
compiler: clang | |
version: "10" | |
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 | |
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV | |
echo "CXX=clang++-${{ matrix.version }}" >> $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 .. && gdb -ex run -ex 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=avx512bw ./build/kiwi-cli-* -m ./ModelGenerator -e -o test.out kowiki1000.txt | |
KIWI_ARCH_TYPE=avx512bw ./build/kiwi-cli-* -m ./ModelGenerator -e -o test.out --sbg kowiki1000.txt | |
KIWI_ARCH_TYPE=avx512bw ./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 |