Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
- { os: windows-latest , ruby: "3.1" }
- { os: windows-latest , ruby: "3.2" }

env:
BUNDLE_WITHOUT: sig

steps:
- uses: actions/checkout@v6.0.2

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
env:
BIGDECIMAL_USE_DECDIG_UINT16_T: ${{ matrix.decdig_bits == 16 }}
BIGDECIMAL_USE_VP_TEST_METHODS: true
BUNDLE_WITHOUT: sig

steps:
- uses: actions/checkout@v6.0.2
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/jruby_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
host:
name: ${{ matrix.ruby }}
runs-on: ubuntu-latest

env:
BUNDLE_WITHOUT: sig

strategy:
fail-fast: false
matrix:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/push_gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
name: rubygems.org
url: https://rubygems.org/gems/bigdecimal

env:
BUNDLE_WITHOUT: sig

permissions:
contents: write
id-token: write
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/sig.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: sig

on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
- reopened

jobs:
sig:
runs-on: "ubuntu-latest"
env:
BUNDLE_WITH: sig
steps:
- uses: actions/checkout@v6.0.2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ruby
- name: Run RBS test
run: bundle exec rake rbs:test
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ gem "minitest", "< 5.0.0"
gem "irb"
gem "test-unit"
gem "test-unit-ruby-core"

group :sig do
gem "rbs"
gem "rdoc"
end
19 changes: 19 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,22 @@ namespace :dev do
end
end
end

namespace :rbs do
Rake::TestTask.new(test: :compile) do |t|
t.libs << 'test_sig'
t.ruby_opts << '-rtest_helper'
t.test_files = FileList['test_sig/test_big_*.rb']
t.warning = true
end

desc 'Update RBS comments'
task :annotate do
require "tmpdir"

Dir.mktmpdir do |tmpdir|
sh("rdoc --ri --output #{tmpdir}/doc --root=. lib")
sh("rbs annotate --no-system --no-gems --no-site --no-home -d #{tmpdir}/doc sig")
end
end
end
2 changes: 2 additions & 0 deletions bigdecimal.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Gem::Specification.new do |s|
sample/linear.rb
sample/nlsolve.rb
sample/pi.rb
sig/big_decimal.rbs
sig/big_math.rbs
]
if Gem::Platform === s.platform and s.platform =~ 'java' or RUBY_ENGINE == 'jruby'
s.platform = 'java'
Expand Down
Loading