prepare for releasing v0.999.10 #349
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: Java Binding on Linux | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/test-linux-java.yml" | |
- "mecab/**" | |
push: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/test-linux-java.yml" | |
- "mecab/**" | |
jobs: | |
tets: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
distribution: | |
- temurin | |
- zulu | |
java: | |
- "8" | |
- "11" | |
- "17" | |
steps: | |
- run: sudo apt-get install gettext | |
- uses: actions/checkout@v4 | |
- name: restore cache | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/local | |
key: v1-mecab-${{ runner.os }}-${{ hashFiles('mecab/src/*.cpp', 'mecab/src/*.h') }} | |
- name: configure PATH | |
run: | | |
echo "$HOME/local/bin" >> "$GITHUB_PATH" | |
- name: install mecab | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: | | |
./autogen.sh | |
./configure --enable-utf8-only --prefix "$HOME/local" | |
make -j$(nproc) | |
make install | |
sudo ldconfig | |
working-directory: mecab | |
- name: install ipadic utf-8 | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: | | |
./autogen.sh --prefix "$HOME/local" | |
./configure --with-charset=utf8 | |
make | |
make install | |
working-directory: mecab-ipadic | |
- name: setup java ${{ matrix.java }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: ${{ matrix.distribution }} | |
java-version: ${{ matrix.java }} | |
- name: configure C/C++ | |
run: | | |
echo "LD_LIBRARY_PATH=$HOME/local/lib:$JAVA_HOME/lib:$PWD/mecab/java" >> "$GITHUB_ENV" | |
echo "LIBRARY_PATH=$HOME/local/lib:$JAVA_HOME/lib" >> "$GITHUB_ENV" | |
echo "CPATH=$HOME/local/include:$JAVA_HOME/include:$JAVA_HOME/include/linux" >> "$GITHUB_ENV" | |
- run: java -version | |
- name: build and test | |
run: | | |
./autogen.sh | |
./configure | |
make | |
# java -classpath .:MeCab.jar test # TODO: FIX ME | |
working-directory: mecab/java |