Skip to content

Commit

Permalink
Sunset apple-silicon-m1 self-hosted runner, as now is supported by gi…
Browse files Browse the repository at this point in the history
…thub-hosted runners. Use macos-13 for runs on Intel macs
  • Loading branch information
misl6 committed May 25, 2024
1 parent 3b25c2c commit 2339eee
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 59 deletions.
17 changes: 0 additions & 17 deletions .ci/utils.sh

This file was deleted.

30 changes: 8 additions & 22 deletions .github/workflows/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
uses: actions/checkout@v3

- name: Setup Python (Ubuntu x86_64, macOS Intel, Windows x86_64)
if: matrix.os == 'macos-latest' || matrix.os == 'windows-latest' || matrix.os == 'ubuntu-latest'
uses: actions/setup-python@v4
with:
python-version: '3.x'
Expand Down Expand Up @@ -65,8 +64,6 @@ jobs:
env:
CIBW_ARCHS: '${{ matrix.cibw_archs }}'
run: |
source .ci/utils.sh
ensure_python_version 3.11
python -m pip install cibuildwheel~=2.16.2
python -m cibuildwheel --output-dir dist
Expand Down Expand Up @@ -112,23 +109,18 @@ jobs:
python: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy3.8', 'pypy3.9']
include:
# We may would like to introduce tests also on windows-latest on x86 (win32 wheels)?
# macos-latest (ATM macos-14) runs on Apple Silicon,
# macos-13 runs on Intel
- os: ubuntu-latest
architecture: 'x64'
- os: kivy-ubuntu-arm64
architecture: 'aarch64'
- os: windows-latest
architecture: 'x64'
- os: macos-latest
- os: macos-13
architecture: 'x64'
- os: apple-silicon-m1
architecture: 'aarch64'
python: '3.10'
- os: apple-silicon-m1
architecture: 'aarch64'
python: '3.11'
- os: apple-silicon-m1
- os: macos-latest
architecture: 'aarch64'
python: '3.12'
runs-on: ${{ matrix.os }}
steps:

Expand All @@ -140,9 +132,7 @@ jobs:
name: dist
path: dist

- name: Setup Python (Ubuntu x86_64, macOS Intel, Windows x86_64)
# Needs to be skipped on our self-hosted runners tagged as 'apple-silicon-m1'
if: matrix.os == 'macos-latest' || matrix.os == 'windows-latest' || matrix.os == 'ubuntu-latest' || matrix.os == 'apple-silicon-m1'
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
Expand All @@ -155,7 +145,7 @@ jobs:
architecture: ${{ matrix.architecture }}

- name: Setup ant on macOS
if: (matrix.os == 'macos-latest') || (matrix.os == 'apple-silicon-m1')
if: (matrix.os == 'macos-latest') || (matrix.os == 'macos-13')
run: |
brew install ant
Expand All @@ -168,7 +158,7 @@ jobs:
run: ant all

- name: Install pyjnius wheel + test prerequisites (Windows, macOS)
if: matrix.os == 'windows-latest' || matrix.os == 'macos-latest' || matrix.os == 'apple-silicon-m1'
if: matrix.os == 'windows-latest' || matrix.os == 'macos-latest' || matrix.os == 'macos-13'
# --find-links=dist --no-index is needed to avoid downloading the pyjnius wheel
# from the index. We need to test the wheel we just built.
run: |
Expand All @@ -180,16 +170,12 @@ jobs:
# --find-links=dist --no-index is needed to avoid downloading the pyjnius wheel
# from the index. We need to test the wheel we just built.
run: |
source .ci/utils.sh
ensure_python_version ${{ matrix.python }}
python -m pip install --find-links=dist --no-index pyjnius
python -m pip install pyjnius[dev,ci]
- name: Test wheel (Linux, macOS)
if: (matrix.os == 'ubuntu-latest') || (matrix.os == 'kivy-ubuntu-arm64') || (matrix.os == 'macos-latest') || (matrix.os == 'apple-silicon-m1')
if: (matrix.os == 'ubuntu-latest') || (matrix.os == 'kivy-ubuntu-arm64') || (matrix.os == 'macos-latest') || (matrix.os == 'macos-13')
run: |
source .ci/utils.sh
ensure_python_version ${{ matrix.python }}
cd tests
CLASSPATH=../build/test-classes:../build/classes python -m pytest -v
Expand Down
31 changes: 11 additions & 20 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ jobs:
- '11'
- '20'
os:
# macos-latest (ATM macos-14) runs on Apple Silicon,
# macos-13 runs on Intel
- 'ubuntu-latest'
- 'windows-latest'
- 'macos-latest'
- 'apple-silicon-m1'
- 'macos-13'
cython:
- '<3'
- '>=3'
Expand All @@ -37,30 +39,20 @@ jobs:
architecture: aarch64
- os: ubuntu-latest
architecture: x86
- os: macos-latest
- os: macos-13
architecture: aarch64
- os: macos-latest
- os: macos-13
architecture: x86
- os: apple-silicon-m1
architecture: x86
- os: apple-silicon-m1
- os: macos-latest
architecture: x64
- os: apple-silicon-m1
python: '3.8'
- os: apple-silicon-m1
python: '3.9'
- os: apple-silicon-m1
python: 'pypy-3.8'
- os: apple-silicon-m1
python: 'pypy-3.9'
- os: macos-latest
architecture: x86
- 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'
Expand All @@ -73,7 +65,6 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
architecture: ${{ (matrix.os == 'apple-silicon-m1' && matrix.architecture == 'aarch64') && 'arm64' || matrix.architecture }}

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

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

- name: Build test classes via ant
Expand All @@ -96,7 +87,7 @@ jobs:

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

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

0 comments on commit 2339eee

Please sign in to comment.