Skip to content

Commit

Permalink
Add tests on push for Apple Silicon (#679)
Browse files Browse the repository at this point in the history
  • Loading branch information
misl6 authored Oct 4, 2023
1 parent 909f93e commit a32cb83
Showing 1 changed file with 49 additions and 25 deletions.
74 changes: 49 additions & 25 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,55 @@ 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: 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: apple-silicon-m1
java: '8'
- os: windows-latest
architecture: x86
java: '20'

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -58,7 +82,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.architecture }}
architecture: ${{ (matrix.os == 'apple-silicon-m1' && matrix.architecture == 'aarch64') && 'arm64' || matrix.architecture }}

- name: Setup java
uses: actions/setup-java@v3
Expand All @@ -68,7 +92,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 +105,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 +121,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 a32cb83

Please sign in to comment.