-
Notifications
You must be signed in to change notification settings - Fork 37
51 lines (48 loc) · 1.76 KB
/
libffi.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
name: libffi
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [ head, 3.1, "3.0", 2.7, 2.6, 2.5 ]
libffi: [3.2.1]
libffi-prefix: [/tmp/local, '']
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Set up libffi ${{ matrix.libffi }}
run: |
wget https://ftp.osuosl.org/pub/blfs/conglomeration/libffi/libffi-${{ matrix.libffi }}.tar.gz
tar xzf libffi-${{ matrix.libffi }}.tar.gz
- name: Compile libffi ${{ matrix.libffi }}
run: |
cd libffi-${{ matrix.libffi }}
./configure --prefix=${{ matrix.libffi-prefix }}
make -j$(nproc)
make install
if: ${{ matrix.libffi-prefix != '' }}
- name: Install dependencies
run: bundle install
- name: Compile with libffi
run: rake compile -- --with-libffi-dir=${{ matrix.libffi-prefix }}
if: ${{ matrix.libffi-prefix != '' }}
- name: Compile with libffi source
run: rake compile -- --with-libffi-source-dir=$(pwd)/libffi-${{ matrix.libffi }}
if: ${{ matrix.libffi-prefix == '' }}
- name: Run test
run: rake test
- name: Install gem
run: |
rake build
gem install pkg/fiddle-*.gem -- --with-libffi-dir=${{ matrix.libffi-prefix }}
if: ${{ matrix.ruby != 'head' && matrix.libffi-prefix != '' }}
- name: Install gem with libffi source
run: |
rake build
gem install pkg/fiddle-*.gem -- --with-libffi-source-dir=$(pwd)/libffi-${{ matrix.libffi }}
if: ${{ matrix.ruby != 'head' && matrix.libffi-prefix == '' }}