Merge pull request #40 from shogo82148/bump-mecab-0.996.10 #144
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: test | |
on: | |
pull_request: {} | |
push: | |
branches: | |
- main | |
env: | |
MECAB_VERSION: "0.996.10" | |
IPADIC_VERSION: "2.7.0-20070801" | |
jobs: | |
linux: | |
strategy: | |
matrix: | |
go: | |
- "1" | |
- "1.21" | |
- "1.20" | |
fail-fast: false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/mecab | |
key: ${{ runner.os }}-${{ env.MECAB_VERSION }}-${{ env.IPADIC_VERSION }}-${{ hashFiles('.github/*-linux.sh') }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.MECAB_VERSION }}-${{ env.IPADIC_VERSION }}- | |
- name: install mecab | |
run: | | |
.github/install-mecab-linux.sh | |
- name: setup Go ${{ matrix.go }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: test | |
run: | | |
go version | |
go test -v -race ./... | |
macos: | |
strategy: | |
matrix: | |
go: | |
- "1" | |
- "1.21" | |
- "1.20" | |
fail-fast: false | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/mecab | |
key: ${{ runner.os }}-${{ env.MECAB_VERSION }}-${{ env.IPADIC_VERSION }}-${{ hashFiles('.github/*-darwin.sh') }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.MECAB_VERSION }}-${{ env.IPADIC_VERSION }}- | |
- name: install mecab | |
run: | | |
.github/install-mecab-darwin.sh | |
- name: setup Go ${{ matrix.go }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: test | |
run: | | |
go version | |
go test -v -race ./... | |
mingw: | |
strategy: | |
matrix: | |
go: | |
- "1" | |
- "1.21" | |
- "1.20" | |
fail-fast: false | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/mecab | |
key: ${{ runner.os }}-${{ env.MECAB_VERSION }}-${{ env.IPADIC_VERSION }}-${{ hashFiles('.github/*-mingw.sh') }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.MECAB_VERSION }}-${{ env.IPADIC_VERSION }}- | |
- name: setup Go ${{ matrix.go }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- uses: msys2/setup-msys2@v2 | |
with: | |
install: autoconf bison make automake1.16 automake-wrapper mingw-w64-x86_64-gcc mingw-w64-x86_64-libtool mingw-w64-x86_64-libiconv | |
- name: install mecab | |
run: | | |
.github/install-mecab-mingw.sh | |
shell: msys2 {0} | |
- name: test | |
run: | | |
go version | |
go test -v ./... |