diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8e77271..6992bb2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,22 +23,17 @@ jobs: with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - - name: Fix Ruby library + - name: Fix RubyInline if: matrix.os == 'windows-latest' # https://github.com/IBM/aspera-cli # copy the file [Ruby main dir]\lib\libx64-ucrt-ruby310.dll.a to [Ruby main dir]\lib\libx64-ucrt-ruby310.a (remove the dll extension) shell: cmd run: | - cd /d ${{ steps.ruby-inst.outputs.ruby-prefix }}\lib start /b /wait ruby -e "exit(Gem::Version.new('${{ matrix.ruby }}') >= Gem::Version.new('3.1') ? 0 : 1)" if %errorlevel% == 0 ( - setlocal enableDelayedExpansion - for %%F in (libx64-ucrt-ruby*.dll.a) do ( - set "filename=%%F" - copy "!filename!" "!filename:.dll.a=.a!" - ) + gem install specific_install hoe minitest + gem specific_install https://github.com/fenrir-naru/rubyinline.git fix_windoze ) - dir cd >nul - name: Run the default task run: bundle exec rake diff --git a/spec/sdr/replica_spec.rb b/spec/sdr/replica_spec.rb index 853aad6..a359020 100644 --- a/spec/sdr/replica_spec.rb +++ b/spec/sdr/replica_spec.rb @@ -2,6 +2,8 @@ require 'gps_pvt/Replica' +begin; require 'inline'; rescue LoadError; end + class NativeGenerator inline(:C){|builder| builder.include('') @@ -47,7 +49,7 @@ class NativeGenerator } __C_CODE__ } -end if require 'inline' +end if defined?(Module::inline) RSpec::describe GPS_PVT::Replica::GPS_CA_Code do let(:gen_type){described_class} @@ -67,7 +69,7 @@ class NativeGenerator }.join(', ')}" if idx_diff expect(idx_diff).to be_nil, msg_fail } - end if defined?(:NativeGenerator) + end if defined?(NativeGenerator) it "has functionality to retreat replica" do prn_range.each{|prn| gen_f, gen_b = 2.times.collect{gen_type::new(prn)}