summaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
blob: 5ed36dc19c5fc0bfc351f952d26226d7aaf21bdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: CI

on:
- push
- pull_request

jobs:
  host:
    name: ${{ matrix.os }} ${{ matrix.ruby }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os:
        - ubuntu-20.04
        - ubuntu-18.04
        - macos-11.0
        - macos-10.15
        - windows-latest
        ruby:
        - '3.0'
        - 2.7
        - 2.6
        - 2.5
        - 2.4
        - 2.3
        include:
        - { os: ubuntu-latest  , ruby: jruby-9.1 } # Ruby 2.3
        - { os: ubuntu-latest  , ruby: jruby-9.2 } # Ruby 2.5
        - { os: ubuntu-latest  , ruby: truffleruby }

    steps:
      - uses: actions/checkout@v2

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}

      - run: sudo apt install ragel
        if: ${{ startsWith(matrix.os, 'ubuntu') }}

      - run: brew install ragel
        if: ${{ startsWith(matrix.os, 'macos') }}

      - run: bundle install

      - run: rake compile

      - run: rake test

      - run: rake build

      - run: gem install pkg/*.gem