Skip to content

Commit 1996e35

Browse files
committed
Update CI
1 parent c654a93 commit 1996e35

3 files changed

Lines changed: 36 additions & 30 deletions

File tree

.github/workflows/main.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: test
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}-latest
8+
name: ${{ matrix.os }} ruby ${{ matrix.ruby }}
9+
strategy:
10+
matrix:
11+
os: [ubuntu, macos]
12+
ruby: [3.2, 3.3]
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Set up Ruby
17+
uses: ruby/setup-ruby@v1
18+
with:
19+
ruby-version: ${{ matrix.ruby }}
20+
bundler-cache: true
21+
- if: matrix.os == 'ubuntu'
22+
name: Install hdf5 - Ubuntu
23+
run: sudo apt-get install libhdf5-dev
24+
- if: matrix.os == 'macos'
25+
name: Install hdf5 - MacOS
26+
run: brew install hdf5@1.10
27+
- if: matrix.os == 'ubuntu'
28+
name: Run test - Ubuntu
29+
run: bundle exec rake test
30+
- if: matrix.os == 'macos'
31+
name: Run test - MacOS
32+
run: bundle exec rake test
33+
env:
34+
HDF5_LIB_PATH: /opt/homebrew/Cellar/hdf5@1.10/1.10.11/lib

lib/hdf5.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ class Error < StandardError; end
99
class << self
1010
attr_accessor :lib_path
1111

12-
def search_hdf5lib(name = nil)
13-
return File.expand_path(name, ENV['HDF5_LIB_PATH']) if ENV['HDF5_LIB_PATH']
14-
12+
def search_hdf5lib
1513
name = "libhdf5.#{FFI::Platform::LIBSUFFIX}"
14+
return File.expand_path(name, ENV['HDF5_LIB_PATH']) if ENV['HDF5_LIB_PATH']
1615

1716
begin
1817
require 'pkg-config'

0 commit comments

Comments
 (0)