diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 4801952..34f382a 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -1,8 +1,14 @@ -name: CI +name: CI on Ubuntu on: -- push -- pull_request + push: + branches: + - master + pull_request: + types: + - opened + - synchronize + - reopened jobs: test: @@ -43,8 +49,6 @@ jobs: sudo pip3 install wheel sudo pip3 install -r ci/requirements.txt - - run: gem install bundler - - run: bundle install --jobs 4 --retry 3 - name: Run tests diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..f83bf14 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,71 @@ +name: CI on Windows + +on: + push: + branches: + - master + pull_request: + types: + - opened + - synchronize + - reopened + +jobs: + test: + name: Test + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - windows-latest + ruby: + - "3.0" + - 2.7 + - 2.6 + - 2.5 + - 2.4 + - 2.3 + - mswin + - mingw + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + + - uses: actions/cache@v2 + with: + path: C:\vcpkg\downloads + key: ${{ runner.os }}-vcpkg-downloads-${{ matrix.os }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-vcpkg-downloads-${{ matrix.os }}- + ${{ runner.os }}-vcpkg-downloads- + + - name: Install requirements on vcpkg + run: | + vcpkg --triplet x64-windows install zeromq czmq libffi + dir C:/vcpkg/installed/x64-windows/bin + cp C:/vcpkg/installed/x64-windows/bin/libzmq-mt-4_3_3.dll C:/vcpkg/installed/x64-windows/bin/libzmq.dll + + - name: Add vcpkg bindir in PATH + run: echo "C:/vcpkg/installed/x64-windows/bin" >> $GITHUB_PATH + shell: bash + + - run: pip3 install -r ci/requirements.txt + + - run: bundle install --jobs 4 --retry 3 --without "pycall cztop" + + - name: Run test with ffi-rzmq + run: bundle exec rake test TESTOPTS=-v + env: + IRUBY_TEST_SESSION_ADAPTER_NAME: ffi-rzmq + + - run: rake build + + - run: gem install pkg/*.gem diff --git a/Gemfile b/Gemfile index b76e937..2be258d 100644 --- a/Gemfile +++ b/Gemfile @@ -12,6 +12,10 @@ group :plot do gem 'rubyvis' end -group :test do +group :pycall do + gem 'pycall' +end + +group :cztop do gem 'cztop' end diff --git a/iruby.gemspec b/iruby.gemspec index 9fee5a0..fb1e3d8 100644 --- a/iruby.gemspec +++ b/iruby.gemspec @@ -23,7 +23,6 @@ Gem::Specification.new do |s| s.add_dependency 'mimemagic', '~> 0.3' s.add_dependency 'multi_json', '~> 1.11' - s.add_development_dependency 'pycall', '>= 1.2.1' s.add_development_dependency 'rake' s.add_development_dependency 'test-unit' s.add_development_dependency 'test-unit-rr' diff --git a/test/helper.rb b/test/helper.rb index e62b854..5ee8bc0 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -72,7 +72,7 @@ def windows_only end def apple_only - omit('apple only test') unless windows? + omit('apple only test') unless apple? end def unix_only