Skip to content

Commit

Permalink
Add tests on push for Apple Silicon
Browse files Browse the repository at this point in the history
  • Loading branch information
misl6 committed Oct 4, 2023
1 parent 909f93e commit 1836153
Showing 1 changed file with 37 additions and 25 deletions.
62 changes: 37 additions & 25 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,43 @@ jobs:
- 'ubuntu-latest'
- 'windows-latest'
- 'macos-latest'
architecture:
- 'x64'
- 'x86'
- 'apple-silicon-m1'
cython:
- '<3'
- '>=3'

# exclude problematic combinations
architecture:
- 'x64'
- 'x86'
- 'aarch64'
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'
- os: windows-latest
architecture: 'x86'
java: '20'
- os: windows-latest
architecture: aarch64
- os: ubuntu-latest
architecture: aarch64
- os: ubuntu-latest
architecture: x86
- os: macos-latest
architecture: aarch64
- os: macos-latest
architecture: x86
- os: apple-silicon-m1
architecture: x86
- os: apple-silicon-m1
architecture: x64
- os: apple-silicon-m1
python: '3.7'
- os: apple-silicon-m1
python: '3.8'
- os: apple-silicon-m1
python: '3.9'
- os: apple-silicon-m1
python: 'pypy-3.7'
- os: apple-silicon-m1
python: 'pypy-3.8'
- os: apple-silicon-m1
python: 'pypy-3.9'
- os: apple-silicon-m1
java: '8'

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -58,7 +70,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.architecture }}
architecture: ${{ matrix.architecture }}

- name: Setup java
uses: actions/setup-java@v3
Expand All @@ -68,7 +80,7 @@ jobs:
architecture: ${{ matrix.architecture }}

- name: (macOS) Setup test dependencies
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-latest' || matrix.os == 'apple-silicon-m1'
run: brew install ant

- name: Build test classes via ant
Expand All @@ -81,7 +93,7 @@ jobs:

- name: (Linux, macOS) Force Cython version
# macOS sed requires .bak filename extensions
if: (matrix.os == 'ubuntu-latest') || (matrix.os == 'macos-latest')
if: (matrix.os == 'ubuntu-latest') || (matrix.os == 'macos-latest') || (matrix.os == 'apple-silicon-m1')
run: sed -i.bak 's/"Cython"/"Cython${{matrix.cython}}"/' pyproject.toml

- name: Install pyjnius with [dev, ci] extras
Expand All @@ -97,7 +109,7 @@ jobs:
pytest -v
- name: (Linux, macOS) Test pyjnius via pytest
if: (matrix.os == 'ubuntu-latest') || (matrix.os == 'macos-latest')
if: (matrix.os == 'ubuntu-latest') || (matrix.os == 'macos-latest') || (matrix.os == 'apple-silicon-m1')
run: |
cd tests
CLASSPATH=../build/test-classes:../build/classes python -m pytest -v
Expand Down

0 comments on commit 1836153

Please sign in to comment.