Skip to content

Commit 92f8600

Browse files
committed
Add cross-platform CI and use released ffi-clang
Expand test matrix to ubuntu, macOS, Windows MinGW and Windows MSVC. Switch Gemfile from local ffi-clang path to released gem >= 0.15.0.
1 parent adcea6c commit 92f8600

File tree

2 files changed

+28
-9
lines changed

2 files changed

+28
-9
lines changed

.github/workflows/test.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,43 @@ on:
99

1010
jobs:
1111
test:
12+
name: ${{matrix.ruby}} on ${{matrix.os}}
13+
runs-on: ${{matrix.os}}
14+
1215
strategy:
1316
fail-fast: false
1417
matrix:
15-
ruby: ['3.2', '3.3', '3.4', '4.0']
16-
runs-on: ubuntu-latest
18+
include:
19+
# Ubuntu - full Ruby matrix
20+
- { os: ubuntu-latest, ruby: "3.2" }
21+
- { os: ubuntu-latest, ruby: "3.3" }
22+
- { os: ubuntu-latest, ruby: "3.4" }
23+
- { os: ubuntu-latest, ruby: "4.0" }
24+
# macOS
25+
- { os: macos-latest, ruby: "4.0" }
26+
# Windows MinGW
27+
- { os: windows-latest, ruby: "4.0" }
28+
# Windows MSVC
29+
- { os: windows-latest, ruby: "mswin" }
30+
1731
steps:
1832
- uses: actions/checkout@v6
1933

20-
- name: Install LLVM and libclang
21-
run: |
22-
sudo apt-get install -y llvm libclang-dev
23-
echo "LIBCLANG=$(llvm-config --libdir)/libclang.so" >> $GITHUB_ENV
24-
2534
- name: Set up Ruby
2635
uses: ruby/setup-ruby@v1
2736
with:
28-
ruby-version: ${{ matrix.ruby }}
37+
ruby-version: ${{matrix.ruby}}
2938
bundler-cache: true
39+
mingw: clang llvm
40+
41+
- name: Install LLVM and Clang (Ubuntu)
42+
if: runner.os == 'Linux'
43+
run: sudo apt-get update && sudo apt-get install -y llvm libclang-dev
44+
45+
- name: Install LLVM and Clang (macOS)
46+
if: runner.os == 'macOS'
47+
run: brew install llvm
3048

3149
- name: Run tests
50+
timeout-minutes: 10
3251
run: bundle exec rake test

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ source 'https://rubygems.org'
22

33
gemspec
44

5-
gem 'ffi-clang', path: '../ffi-clang'
5+
gem 'ffi-clang', '>= 0.15.0'
66
gem 'simplecov', require: false

0 commit comments

Comments
 (0)