Skip to content

Commit d955d52

Browse files
cfisclaude
andcommitted
Add CI test workflow and simplify Gemfile
Add GitHub Actions workflow to run tests across Ruby 3.2, 3.3, 3.4, 4.0. Simplify Gemfile to use published ffi-clang gem. Pin ffi-clang >= 0.14. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a7249db commit d955d52

3 files changed

Lines changed: 31 additions & 8 deletions

File tree

.github/workflows/test.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
ruby: ['3.2', '3.3', '3.4', '4.0']
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v6
19+
20+
- name: Install libclang
21+
run: sudo apt-get install -y libclang-dev
22+
23+
- name: Set up Ruby
24+
uses: ruby/setup-ruby@v1
25+
with:
26+
ruby-version: ${{ matrix.ruby }}
27+
bundler-cache: true
28+
29+
- name: Run tests
30+
run: bundle exec rake test

Gemfile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
source 'https://rubygems.org'
22

33
gemspec
4-
5-
if RUBY_PLATFORM =~ /linux/ && File.exist?('/mnt/c')
6-
gem "ffi-clang", path: "/mnt/c/Source/ffi-clang" # WSL
7-
else
8-
gem "ffi-clang", path: "c:/Source/ffi-clang" # Windows
9-
end
10-
#gem "ffi-clang", github: "ioquatix/ffi-clang"

ruby-bindgen.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
3636
spec.homepage = 'https://github.com/ruby-rice/ruby-bindgen'
3737

3838
spec.add_dependency 'ffi', '>= 1.16'
39-
spec.add_dependency 'ffi-clang', '>= 0.10'
39+
spec.add_dependency 'ffi-clang', '>= 0.14'
4040
spec.add_dependency 'ostruct', '>= 0.6.0'
4141

4242
spec.add_development_dependency 'logger'

0 commit comments

Comments
 (0)