-
Notifications
You must be signed in to change notification settings - Fork 46
129 lines (107 loc) · 3.05 KB
/
ci.yml
File metadata and controls
129 lines (107 loc) · 3.05 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: CI
on:
- push
- pull_request
jobs:
host:
name: >-
${{ matrix.os }} ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-14
- macos-15
- macos-15-intel
- ubuntu-latest
- windows-latest
ruby:
- '2.5'
- '2.6'
- '2.7'
- '3.0'
- '3.1'
- '3.2'
- '3.3'
- '3.4'
- debug
- jruby
- truffleruby
include:
- { os: windows-latest , ruby: ucrt }
- { os: windows-latest , ruby: mswin }
exclude:
- { os: macos-14 , ruby: '2.5' }
- { os: macos-15 , ruby: '2.5' }
- { os: windows-latest , ruby: debug }
- { os: windows-latest , ruby: truffleruby }
steps:
- uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- run: bundle install
- run: rake compile
# If Fiddle in Ruby's master has the same version of this Fiddle,
# "gem install pkg/*.gem" fails.
- run: rake version:bump
if: >-
matrix.ruby == 'debug' ||
matrix.ruby == 'mingw' ||
matrix.ruby == 'mswin'
# This is for ensuring using Fiddle in this repository.
- run: ruby -Ilib test/run.rb
- run: rake install
- name: Run test against installed gem
# We can't use Fiddle gem with older RubyInstaller because
# RubyInstaller requires Fiddle before rubygems is loaded:
# https://github.com/oneclick/rubyinstaller2/blob/master/lib/ruby_installer/build/dll_directory.rb#L1
if: >-
matrix.os != 'windows-latest' ||
(matrix.os == 'windows-latest' && matrix.ruby >= '3.0')
run: |
ruby -run -e mkdir -- -p tmp/
ruby -run -e cp -- -pr test/ tmp/
cd tmp
ruby test/run.rb
host-ibm:
if: github.repository == 'ruby/fiddle'
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04-ppc64le
- ubuntu-24.04-s390x
steps:
- uses: actions/checkout@v6
- name: Set up Ruby
run: |
sudo apt-get update
sudo apt-get install ruby-full bundler libffi-dev
- run: sudo bundle install --jobs $(nproc)
- run: rake compile
- run: ruby -Ilib test/run.rb
- run: sudo rake install
- name: Run test against installed gem
run: |
ruby -run -e mkdir -- -p tmp/
ruby -run -e cp -- -pr test/ tmp/
cd tmp
ruby test/run.rb
docker:
name: >-
${{ matrix.service }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
service:
- fedora-latest
steps:
- uses: actions/checkout@v6
- run: docker compose build ${{ matrix.service }}
- run: docker compose run --rm ${{ matrix.service }}