Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows CI #286

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
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
14 changes: 9 additions & 5 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion iruby.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion test/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down