From cf7a1cef65f2feaefac736980c22199b2fe6a1e8 Mon Sep 17 00:00:00 2001 From: Kenta Murata Date: Thu, 7 Jan 2021 22:27:46 +0900 Subject: [PATCH 1/7] CI: Add Windows --- .github/workflows/ubuntu.yml | 12 +++++-- .github/workflows/windows.yml | 66 +++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 4801952..e8a539e 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: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..8274043 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,66 @@ +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: + - mswin + - mingw + - 2.7 + - 2.6 + - 2.5 + - 2.4 + - 2.3 + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + + - name: Install requirements on vcpkg + run: | + vcpkg install zeromq:x64-windows + vcpkg install czmq:x64-windows + vcpkg install libffi:x64-windows + + - run: pip3 install -r ci/requirements.txt + + - run: gem install bundler + + - run: bundle install --jobs 4 --retry 3 + + - name: Run tests + env: + PYTHON: python3 + ADAPTERS: cztop ffi-rzmq pyzmq + run: | + for adapter in $ADAPTERS; do + export IRUBY_TEST_SESSION_ADAPTER_NAME=$adapter + bundle exec rake test TESTOPTS=-v + done + shell: bash + + - run: rake build + + - run: gem install pkg/*.gem From 5f0f474d06d0165574290f945b8cb103f46fb96a Mon Sep 17 00:00:00 2001 From: Kenta Murata Date: Thu, 7 Jan 2021 23:04:03 +0900 Subject: [PATCH 2/7] Remove pycall from development dependencies --- .github/workflows/windows.yml | 2 +- Gemfile | 4 ++++ iruby.gemspec | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 8274043..70bd8b3 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -48,7 +48,7 @@ jobs: - run: gem install bundler - - run: bundle install --jobs 4 --retry 3 + - run: bundle install --jobs 4 --retry 3 --without pycall - name: Run tests env: diff --git a/Gemfile b/Gemfile index b76e937..b11e11b 100644 --- a/Gemfile +++ b/Gemfile @@ -12,6 +12,10 @@ group :plot do gem 'rubyvis' end +group :pycall do + gem 'pycall' +end + group :test 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' From 796fc6b4182fe172d5ec81c0847d9e4119b53664 Mon Sep 17 00:00:00 2001 From: Kenta Murata Date: Fri, 26 Feb 2021 10:45:33 +0900 Subject: [PATCH 3/7] CI: Don't install bundler --- .github/workflows/ubuntu.yml | 2 -- .github/workflows/windows.yml | 2 -- 2 files changed, 4 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index e8a539e..34f382a 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -49,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 index 70bd8b3..c8380c8 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -46,8 +46,6 @@ jobs: - run: pip3 install -r ci/requirements.txt - - run: gem install bundler - - run: bundle install --jobs 4 --retry 3 --without pycall - name: Run tests From d5583a115e9f4b4943453126a0bb3d7bfe8f9cdf Mon Sep 17 00:00:00 2001 From: Kenta Murata Date: Thu, 4 Mar 2021 16:33:29 +0900 Subject: [PATCH 4/7] CI: Use Ruby 3.0 on Windows --- .github/workflows/windows.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c8380c8..019eb12 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -21,13 +21,14 @@ jobs: os: - windows-latest ruby: - - mswin - - mingw + - "3.0" - 2.7 - 2.6 - 2.5 - 2.4 - 2.3 + - mswin + - mingw steps: - uses: actions/checkout@v2 From 215750dc9d5740f2f946f72826d70571bc74d01c Mon Sep 17 00:00:00 2001 From: Kenta Murata Date: Thu, 4 Mar 2021 16:39:01 +0900 Subject: [PATCH 5/7] CI: Drop cztop and pyzmq on Windows --- .github/workflows/windows.yml | 5 ++--- Gemfile | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 019eb12..c67e6c3 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -47,12 +47,11 @@ jobs: - run: pip3 install -r ci/requirements.txt - - run: bundle install --jobs 4 --retry 3 --without pycall + - run: bundle install --jobs 4 --retry 3 --without "pycall cztop" - name: Run tests env: - PYTHON: python3 - ADAPTERS: cztop ffi-rzmq pyzmq + ADAPTERS: ffi-rzmq run: | for adapter in $ADAPTERS; do export IRUBY_TEST_SESSION_ADAPTER_NAME=$adapter diff --git a/Gemfile b/Gemfile index b11e11b..2be258d 100644 --- a/Gemfile +++ b/Gemfile @@ -16,6 +16,6 @@ group :pycall do gem 'pycall' end -group :test do +group :cztop do gem 'cztop' end From b759093b207235d8516e3b56fb2fa1d6115c05fb Mon Sep 17 00:00:00 2001 From: Kenta Murata Date: Fri, 5 Mar 2021 12:55:10 +0900 Subject: [PATCH 6/7] Fix apple_only test helper --- test/helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 57ae97e3e23141e0df0be7c320134ab39e221ee3 Mon Sep 17 00:00:00 2001 From: Kenta Murata Date: Fri, 5 Mar 2021 13:25:57 +0900 Subject: [PATCH 7/7] debug --- .github/workflows/windows.yml | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c67e6c3..f83bf14 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -39,25 +39,32 @@ jobs: 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 install zeromq:x64-windows - vcpkg install czmq:x64-windows - vcpkg install libffi:x64-windows + 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 tests + - name: Run test with ffi-rzmq + run: bundle exec rake test TESTOPTS=-v env: - ADAPTERS: ffi-rzmq - run: | - for adapter in $ADAPTERS; do - export IRUBY_TEST_SESSION_ADAPTER_NAME=$adapter - bundle exec rake test TESTOPTS=-v - done - shell: bash + IRUBY_TEST_SESSION_ADAPTER_NAME: ffi-rzmq - run: rake build