Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
bab2min committed Sep 15, 2024
1 parent a05bbca commit 1825b13
Showing 1 changed file with 29 additions and 25 deletions.
54 changes: 29 additions & 25 deletions .github/workflows/centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ jobs:
build-centos7:
name: Centos7
runs-on: ubuntu-latest
container:
image: docker://quay.io/pypa/manylinux2014_x86_64

steps:
- uses: actions/checkout@v3
Expand All @@ -18,29 +16,35 @@ jobs:
with:
submodules: true
lfs: true
- name: Update CMake
run: |
/opt/python/cp310-cp310/bin/pip install cmake
yum install java-1.8.0-openjdk-devel.x86_64 -y
- name: Configure Build
run: mkdir build && cd build && /opt/python/cp310-cp310/bin/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 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/
- run: tar -zcvf arts.tgz build/*kiwi* build/test/*kiwi* eval_results/*.txt build/bindings/java/*.jar
- uses: bab2min/run-on-arch-action@multiple-step
id: runcmd
with:
image: quay.io/pypa/manylinux2014_x86_64
githubToken: ${{ github.token }}
multipleRun: |
- name: Update CMake
run: |
/opt/python/cp310-cp310/bin/pip install cmake
yum install java-1.8.0-openjdk-devel.x86_64 -y
- name: Configure Build
run: mkdir build && cd build && /opt/python/cp310-cp310/bin/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 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/
- run: tar -zcvf arts.tgz build/*kiwi* build/test/*kiwi* eval_results/*.txt build/bindings/java/*.jar
- name: Archive binaries
uses: actions/upload-artifact@v3
env:
Expand Down

0 comments on commit 1825b13

Please sign in to comment.