Added macos arm64 Apple Silicon to CI (#296)

* Added macos arm64 Apple Silicon to CI

- Added missing python 3.10 metadata to setup.py

* Need all python versions in the matrix

* Fixing github action matrix syntax

* Changing MACOSX_DEPLOYMENT_TARGET for older python versions

- Technically no one would be running python 3.7 on M1 anyway

* Adding windows visualcpp build tools and updated cmake

* Increase max-parallel for all matrix builds

* yaml indent

* trying visualstudio2022-workload-vctools

* disabled everything but windows and added tunshell for debugging

* try older powershell

* trying again

* try python instead of powershell

* bash with wget

* Using old windows client on other side

* wrong way

* backwards

* :(

* urgh back to caveman debugging

- trying older windows runners

* try it again with extra build tools

* Reverting back to windows-2019 runner for windows builds

Fixing error:
CMake Error at CMakeLists.txt:2 (project):
  Generator
    Ninja
  does not support platform specification, but platform
    x64
  was specified.
This commit is contained in:
Madhava Jay
2022-08-27 01:13:09 +10:00
committed by GitHub
parent a6f4ece776
commit 7862d2a0c4
3 changed files with 31 additions and 3 deletions

View File

@@ -8,6 +8,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: ${{ matrix.container-image }} container: ${{ matrix.container-image }}
strategy: strategy:
max-parallel: 99
matrix: matrix:
python-version: ['cp37-cp37m', 'cp38-cp38', 'cp39-cp39', 'cp310-cp310'] python-version: ['cp37-cp37m', 'cp38-cp38', 'cp39-cp39', 'cp310-cp310']
container-image: ['quay.io/pypa/manylinux2010_x86_64', 'quay.io/pypa/manylinux2010_i686'] container-image: ['quay.io/pypa/manylinux2010_x86_64', 'quay.io/pypa/manylinux2010_i686']
@@ -42,6 +43,7 @@ jobs:
name: "manylinux2014( ${{ matrix.python-version }}, quay.io/pypa/manylinux2014_aarch64)" name: "manylinux2014( ${{ matrix.python-version }}, quay.io/pypa/manylinux2014_aarch64)"
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
max-parallel: 99
matrix: matrix:
python-version: ['cp37-cp37m', 'cp38-cp38', 'cp39-cp39', 'cp310-cp310'] python-version: ['cp37-cp37m', 'cp38-cp38', 'cp39-cp39', 'cp310-cp310']
fail-fast: false fail-fast: false

View File

@@ -7,13 +7,27 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
max-parallel: 4 max-parallel: 99
fail-fast: false fail-fast: false
matrix: matrix:
# Some asyncio commands require 3.7+ # Some asyncio commands require 3.7+
# It may be possible to use 3.6 and maybe 3.5; however, this will take some patching to get examples to work # It may be possible to use 3.6 and maybe 3.5; however, this will take some patching to get examples to work
python-version: [3.7, 3.8, 3.9, "3.10"] python-version: [3.7, 3.8, 3.9, "3.10"]
os: [ubuntu-latest, macOS-latest, windows-latest] os: [ubuntu-latest, macOS-latest, windows-2019]
arch: ["x86_64"]
include:
- python-version: "3.7"
os: macOS-latest
arch: arm64
- python-version: "3.8"
os: macOS-latest
arch: arm64
- python-version: "3.9"
os: macOS-latest
arch: arm64
- python-version: "3.10"
os: macOS-latest
arch: arm64
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@@ -35,7 +49,18 @@ jobs:
flake8 . --filename '*.py,*.pyx,*.pxd' --count --show-source --statistics --exclude benchmark,build,capnp/templates/module.pyx flake8 . --filename '*.py,*.pyx,*.pxd' --count --show-source --statistics --exclude benchmark,build,capnp/templates/module.pyx
flake8 . --count --show-source --statistics --exclude benchmark,build flake8 . --count --show-source --statistics --exclude benchmark,build
black . --check --diff --color black . --check --diff --color
- name: Packaging - name: Packaging x86_64
if: matrix.arch == 'x86_64'
run: |
python setup.py bdist_wheel
python setup.py sdist
- name: macOS - Packaging arm64
if: matrix.os == 'macOS-latest' && matrix.arch == 'arm64'
env:
CMAKE_OSX_ARCHITECTURES: arm64 # capnp cmake
MACOSX_DEPLOYMENT_TARGET: "11.0" # python wheel
ARCHFLAGS: "-arch arm64" # python wheel
_PYTHON_HOST_PLATFORM: "macosx-11.0-arm64" # python wheel
run: | run: |
python setup.py bdist_wheel python setup.py bdist_wheel
python setup.py sdist python setup.py sdist

View File

@@ -252,6 +252,7 @@ setup(
"Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: PyPy", "Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Communications", "Topic :: Communications",
], ],