Skip to content

Commit

Permalink
Actually Use GSL in CI Tests (jekyll#197)
Browse files Browse the repository at this point in the history
Merge pull request 197
  • Loading branch information
mkasberg authored May 26, 2022
1 parent 04cd0ad commit 1174d8a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
env:
# See https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby#matrix-of-gemfiles
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
LOAD_GSL: ${{ matrix.gsl }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -54,9 +55,6 @@ jobs:
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Install GSL Gem
if: ${{ matrix.gsl }}
run: gem install gsl
- name: Run Minitest based tests
run: script/test

Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@

source 'https://rubygems.org'
gemspec name: 'classifier-reborn'

# For testing with GSL support & bundle exec
gem 'gsl' if ENV['LOAD_GSL'] == 'true'
2 changes: 2 additions & 0 deletions test/extensions/matrix_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

class MatrixTest < Minitest::Test
def test_zero_division
skip "extensions/vector is only used by non-GSL implementation" if $GSL

matrix = Matrix[[1, 0], [0, 1]]
matrix.SV_decomp
end
Expand Down
2 changes: 2 additions & 0 deletions test/extensions/zero_vector_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

class ZeroVectorTest < Minitest::Test
def test_zero?
skip "extensions/zero_vector is only used by non-GSL implementation" if $GSL

vec0 = Vector[]
vec1 = Vector[0]
vec10 = Vector.elements [0] * 10
Expand Down

0 comments on commit 1174d8a

Please sign in to comment.