Gauche Devlog

< Running gosh without installing | Source info propagation with macro expansion >

2022/06/17

Using Gauche in GitHub Actions

I created a GitHub action to install Gauche in the runner, so that you can use Gauche in subsequent steps: setup-gauche. Currently the action works on Linux and OSX.

To use the action, simply say uses: shirok/setup-gauche@v3 in your job steps (check the latest version number in the setup-gauche page). The following is an excerpt of .github/workflow/main.yml of Gauche-mecab:

jobs:
  build-and-test-linux:
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
    - uses: actions/checkout@v3
    - uses: shirok/setup-gauche@v3
    - name: Install dependencies
      run: |
        sudo apt install -y libmecab-dev mecab-ipadic-utf8
    - name: Build and check
      run: |
        ./configure
        make
        make -s check
        make -s check-dep

Gauche is installed in standard path (/usr on Linux, /usr/local on OSX) so that you can build Gauche extensions or run Gauche applications without any extra settings.

By default, it installs the latest release. You can choose a specific version of Gauche to install via gauche-version input parameter; specifically, saying 'snapshot' installs the latest snapshot (prerelease) build, if there's any newer than the latest release.

Tags: github, CI

Post a comment

Name: