Support both Cython >3 and Cython < 3 #485
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push, pull_request] | |
name: Continuous Integration | |
jobs: | |
Tests: | |
name: base | |
continue-on-error: true | |
strategy: | |
matrix: | |
python: | |
- '3.7' | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
- 'pypy-3.7' | |
- 'pypy-3.8' | |
- 'pypy-3.9' | |
java: | |
- '8' | |
- '11' | |
- '17' | |
os: | |
- 'ubuntu-latest' | |
- 'windows-latest' | |
- 'macos-latest' | |
architecture: | |
- 'x64' | |
- 'x86' | |
cython: | |
- '<3' | |
- '>=3' | |
# exclude problematic combinations | |
exclude: | |
- os: ubuntu-latest | |
architecture: 'x86' | |
- os: macos-latest | |
architecture: 'x86' | |
- os: windows-latest | |
architecture: 'x86' | |
python: 'pypy-3.7' | |
- os: windows-latest | |
architecture: 'x86' | |
python: 'pypy-3.8' | |
- os: windows-latest | |
architecture: 'x86' | |
python: 'pypy-3.9' | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@master | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
architecture: ${{ matrix.architecture }} | |
- name: Setup java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'temurin' | |
architecture: ${{ matrix.architecture }} | |
- name: (macOS) Setup test dependencies | |
if: matrix.os == 'macos-latest' | |
run: brew install ant | |
- name: Build test classes via ant | |
run: ant all | |
- name: Force Cython version | |
run: sed -i 's/"Cython"/"Cython${{matrix.cython}}"/' pyproject.toml | |
- name: Install pyjnius with [dev, ci] extras | |
run: | | |
pip install --timeout=120 .[dev,ci] | |
- name: (Windows) Test pyjnius via pytest | |
if: matrix.os == 'windows-latest' | |
run: | | |
$env:PATH +=";$env:JAVA_HOME\jre\bin\server\;$env:JAVA_HOME\jre\bin\client\;$env:JAVA_HOME\bin\server\" | |
$env:CLASSPATH ="../build/test-classes;../build/classes" | |
cd tests | |
pytest -v | |
- name: (Linux, macOS) Test pyjnius via pytest | |
if: (matrix.os == 'ubuntu-latest') || (matrix.os == 'macos-latest') | |
run: | | |
cd tests | |
CLASSPATH=../build/test-classes:../build/classes python -m pytest -v | |
# - name: coveralls | |
# run: python -m coveralls | |
# env: | |
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} |