From 1836153b6c3fb044a722570d930e55004c4606dd Mon Sep 17 00:00:00 2001 From: Mirko Galimberti Date: Wed, 4 Oct 2023 20:24:16 +0200 Subject: [PATCH] Add tests on push for Apple Silicon --- .github/workflows/push.yml | 62 +++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 380ee6bb..35730165 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -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: @@ -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 @@ -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 @@ -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 @@ -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