summaryrefslogtreecommitdiff
path: root/.github/workflows/libyaml.yml
blob: ff2f237187ae5c5a422e8e65b28e7313455b7e35 (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
name: libyaml-0.1.7

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        ruby: [ ruby-head, "3.0", 2.7, 2.6, 2.5, 2.4 ]
        libyaml: [0.1.7 0.2.5]
    steps:
      - name: Install libraries
        run: sudo apt install haveged
      - uses: actions/checkout@v2
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
      - name: Set up libyaml ${{ matrix.libyaml }}
        run: |
          wget https://pyyaml.org/download/libyaml/yaml-${{ matrix.libyaml }}.tar.gz
          tar xzf yaml-${{ matrix.libyaml }}.tar.gz
          cd yaml-${{ matrix.libyaml }}
          ./configure --prefix=/tmp/local
          make
          make install
      - name: Install dependencies
        run: bundle install
      - name: Compile
        run: rake compile -- --with-libyaml-dir=/tmp/local
      - name: Run test
        run: rake
      - name: Install gem
        run: rake install
        if: ${{ matrix.ruby != 'ruby-head' }}