-
Notifications
You must be signed in to change notification settings - Fork 207
55 lines (51 loc) · 1.77 KB
/
libyaml.yml
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: libyaml
on: [push, pull_request]
jobs:
ruby-versions:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby
min_version: 2.5
build:
needs: ruby-versions
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
libyaml: [0.1.7, 0.2.5]
libyaml-prefix: [/tmp/local, '']
steps:
- name: Install libraries
run: sudo apt install haveged
- uses: actions/checkout@v4
- 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
- name: Compile libyaml ${{ matrix.libyaml }}
run: |
cd yaml-${{ matrix.libyaml }}
./configure --prefix=${{ matrix.libyaml-prefix }}
make
make install
if: ${{ matrix.libyaml-prefix != '' }}
- name: Install dependencies
run: bundle install
- name: Compile with libyaml
run: rake compile -- --with-libyaml-dir=${{ matrix.libyaml-prefix }}
if: ${{ matrix.libyaml-prefix != '' }}
- name: Compile with libyaml source
run: rake compile -- --with-libyaml-source-dir=$(pwd)/yaml-${{ matrix.libyaml }}
if: ${{ matrix.libyaml-prefix == '' }}
- name: Run test
run: rake
- name: Install gem
run: |
rake build
gem install pkg/psych-*.gem -- --with-libyaml-dir=${{ matrix.libyaml-prefix }}
if: ${{ matrix.ruby != 'head' && matrix.ruby != '3.1' && matrix.libyaml-prefix != '' }}