.github/workflows/ci.yml in pycall-1.3.1 vs .github/workflows/ci.yml in pycall-1.4.0
- old
+ new
@@ -1,67 +1,150 @@
name: CI
on:
-- push
+ push:
+ branches:
+ - master
+ - "check/ci/**"
+ - "check/unix/**"
+ pull_request:
+ types:
+ - opened
+ - synchronize
+ - reopened
jobs:
test:
- name: Test
+ name: ${{ matrix.venv }}${{ matrix.os }}/${{ matrix.ruby }}/${{ matrix.python }}-${{ matrix.python_architecture }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- - ubuntu-18.04
+ - ubuntu-20.04
- macos-latest
- ruby_version:
- - 2.7.x
- - 2.6.x
- - 2.5.x
- - 2.4.x
- python_version:
- - 3.8.x
- - 3.7.x
- - 3.6.x
- - 2.7.x
+ ruby:
+ - "3.0"
+ - 2.7
+ - 2.6
+ python:
+ - 3.x
+ - 2.x
python_architecture:
- x64
+ venv:
+ - ""
+ include:
+ - { os: ubuntu-20.04 , ruby: 2.5 , python: 3.x , python_architecture: x64 , venv: "" }
+ - { os: ubuntu-20.04 , ruby: 2.4 , python: 3.x , python_architecture: x64 , venv: "" }
+ - { os: ubuntu-20.04 , ruby: 2.5 , python: 2.x , python_architecture: x64 , venv: "" }
+ - { os: ubuntu-20.04 , ruby: 2.4 , python: 2.x , python_architecture: x64 , venv: "" }
+ - { os: ubuntu-20.04 , ruby: 2.7 , python: 3.8 , python_architecture: x64 , venv: "" }
+ - { os: ubuntu-20.04 , ruby: 2.7 , python: 3.7 , python_architecture: x64 , venv: "" }
+ - { os: ubuntu-20.04 , ruby: 2.7 , python: 3.6 , python_architecture: x64 , venv: "" }
+ - { os: ubuntu-18.04 , ruby: 2.7 , python: 3.8 , python_architecture: x64 , venv: "" }
+ - { os: ubuntu-20.04 , ruby: debug , python: 3.x , python_architecture: x64 , venv: "" }
+ - { os: ubuntu-20.04 , ruby: "3.0" , python: 3.x , python_architecture: x64 , venv: "venv:" }
+ - { os: ubuntu-18.04 , ruby: "3.0" , python: 3.x , python_architecture: x64 , venv: "venv:" }
+ - { os: ubuntu-18.04 , ruby: "3.0" , python: 3.8 , python_architecture: x64 , venv: "venv:" }
+ - { os: macos-latest , ruby: "3.0" , python: 3.x , python_architecture: x64 , venv: "venv:" }
+ - { os: macos-latest , ruby: "3.0" , python: 3.8 , python_architecture: x64 , venv: "venv:" }
+ #- { os: macos-latest , ruby: debug , python: 3.x , python_architecture: x64 , venv: "" }
steps:
- - name: Setup Ruby
- if: matrix.ruby_version != 'master-nightly'
- uses: actions/setup-ruby@v1
- with:
- ruby-version: ${{ matrix.ruby_version }}
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 1
- - name: Setup Python
- uses: actions/setup-python@v1
- with:
- python-version: ${{ matrix.python_version }}
- architecture: ${{ matrix.python_architecture }}
+ - uses: ruby/setup-ruby@v1
+ if: matrix.ruby_version != 'master-nightly'
+ with:
+ ruby-version: ${{ matrix.ruby }}
- - name: Checkout
- uses: actions/checkout@v1
- with:
- fetch-depth: 1
+ - uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python }}
+ architecture: ${{ matrix.python_architecture }}
- - name: Prepare environment
- run: |
- gem install bundler
+ - run: pip install --user numpy
- - name: Install requirements
- run: |
- pip install --user numpy
- bundle install
+ - run: bundle install
- - name: Compile pycall.so
- run: |
- bundle exec rake compile
+ - run: rake compile
- - name: Python investigator
- run: |
- python lib/pycall/python/investigator.py
+ - run: python lib/pycall/python/investigator.py
- - name: Test
- run: |
- PYTHON=python bundle exec rake
+ - name: venv examination
+ run: |
+ python -m venv ~/test-venv
+ source ~/test-venv/bin/activate
+ ruby -Ilib -Iext/pycall -rpycall -ePyCall.builtins
+ env:
+ PYCALL_DEBUG_FIND_LIBPYTHON: 1
+ if: ${{ matrix.venv != '' }}
+
+ - run: rake
+ env:
+ PYTHON: python
+
+ conda:
+ name: conda:${{ matrix.os }}/${{ matrix. ruby }}/${{ matrix.python }}
+ runs-on: ${{ matrix.os }}
+
+ strategy:
+ fail-fast: false
+ matrix:
+ os:
+ - ubuntu-20.04
+ - macos-latest
+ ruby:
+ - "3.0"
+ python:
+ - 3.8
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 1
+
+ - uses: conda-incubator/setup-miniconda@v2
+ with:
+ activate-environment: test
+ python-version: ${{ matrix.python }}
+
+ - uses: ruby/setup-ruby@v1
+ if: matrix.ruby_version != 'master-nightly'
+ with:
+ ruby-version: ${{ matrix.ruby }}
+
+ - name: Add Ruby path
+ run: |
+ echo >> ~/.profile
+ echo >> ~/.profile
+ IFS=:
+ for p in $PATH; do
+ case $p in
+ */Ruby/*)
+ echo "export PATH=$p:\$PATH" >> ~/.profile
+ ;;
+ esac
+ done
+
+ - run: cat ~/.profile
+
+ - run: bash -xe ~/.profile
+
+ - run: conda install numpy
+ shell: bash -l {0}
+
+ - run: bundle install
+
+ - run: rake compile
+
+ - run: python lib/pycall/python/investigator.py
+ shell: bash -l {0}
+
+ - run: rake
+ env:
+ PYTHON: python
+ shell: bash -l {0}