prepare for releasing v0.999.10 #344
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: Ruby Bindings on macOS | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/test-darwin-ruby.yml" | |
- "mecab/**" | |
push: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/test-darwin-ruby.yml" | |
- "mecab/**" | |
jobs: | |
test: | |
name: Test | |
runs-on: macOS-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: | |
- "3.3" | |
- "3.2" | |
- "3.1" | |
- "3.0" | |
- "2.7" | |
- "2.6" | |
- "2.5" | |
- "2.4" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup | |
run: .github/setup-darwin.sh | |
- 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 -j2 | |
make install | |
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 ruby ${{ matrix.ruby }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- name: configure C/C++ | |
run: | | |
echo "LD_LIBRARY_PATH=$HOME/local/lib" >> "$GITHUB_ENV" | |
echo "LIBRARY_PATH=$HOME/local/lib" >> "$GITHUB_ENV" | |
echo "CPATH=$HOME/local/include" >> "$GITHUB_ENV" | |
- run: ruby -v | |
- name: build and test | |
run: | | |
ruby extconf.rb | |
make | |
make install | |
ruby test.rb | |
working-directory: mecab/ruby |