-
Notifications
You must be signed in to change notification settings - Fork 33
142 lines (116 loc) · 3.17 KB
/
ci.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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
name: CI
on:
push:
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
ubuntu:
name: Ubuntu
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
ruby:
- "3.3"
- "3.2"
- "3.1"
- "3.0"
- "2.7"
- "2.6"
- "2.5"
- debug
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- run: rake build
- name: Install ffi (if Ruby 2.7)
if: |
matrix.ruby == '2.7'
run: |
cat <<GEMFILE > Gemfile.irb
source 'https://rubygems.org'
gem 'ffi'
GEMFILE
BUNDLE_GEMFILE=Gemfile.irb bundle install --jobs 4 --retry 3
- name: Install ffi 1.6.x (if Ruby 2.6)
if: |
matrix.ruby == '2.6'
run: |
cat <<GEMFILE > Gemfile.irb
source 'https://rubygems.org'
gem 'ffi', '~> 1.6.0'
GEMFILE
BUNDLE_GEMFILE=Gemfile.irb bundle install --jobs 4 --retry 3
- name: Install ffi 1.6.x and irb < 1.4.3 (if Ruby 2.5)
if: |
matrix.ruby == '2.5'
run: |
cat <<GEMFILE > Gemfile.irb
source 'https://rubygems.org'
gem 'ffi', '~> 1.6.0'
gem 'irb', '< 1.4.3'
GEMFILE
BUNDLE_GEMFILE=Gemfile.irb bundle install --jobs 4 --retry 3
- run: gem install pkg/*.gem
- run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
env:
IRUBY_SESSION_ADAPTER: ffi-rzmq
- name: Install requirements on ubuntu
run: |
sudo apt update
sudo apt install -y --no-install-recommends \
libczmq-dev \
python3 \
python3-pip \
python3-setuptools
sudo pip3 install wheel
sudo pip3 install -r ci/requirements.txt
- run: bundle install --jobs 4 --retry 3
- name: Run tests
env:
PYTHON: python3
ADAPTERS: cztop ffi-rzmq
run: |
for adapter in $ADAPTERS; do
export IRUBY_TEST_SESSION_ADAPTER_NAME=$adapter
bundle exec rake test TESTOPTS="-v"
done
windows:
name: Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
ruby-version: "ruby"
- run: rake build
- run: gem install pkg/*.gem
- run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
env:
IRUBY_SESSION_ADAPTER: ffi-rzmq
macos:
name: macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
ruby-version: "ruby"
- run: rake build
- run: gem install pkg/*.gem
- run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
env:
IRUBY_SESSION_ADAPTER: ffi-rzmq