Skip to content

Commit da71e0c

Browse files
committed
Build on MacOS ARM64
1 parent b9650b7 commit da71e0c

File tree

1 file changed

+156
-154
lines changed

1 file changed

+156
-154
lines changed

.github/workflows/ci.yml

Lines changed: 156 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -13,142 +13,142 @@ on:
1313
- "*"
1414

1515
jobs:
16-
lint:
17-
runs-on: ubuntu-latest
18-
steps:
19-
- uses: actions/checkout@v4
20-
with:
21-
submodules: recursive
22-
- name: Set up Python 3.8
23-
uses: actions/setup-python@v2.2.1
24-
with:
25-
python-version: "3.8"
26-
- name: Install tox
27-
run: pip install tox
28-
- name: Lint
29-
run: tox -e lint
30-
31-
package-checks:
32-
strategy:
33-
matrix:
34-
tox_env:
35-
- docs
36-
- twine_check
37-
runs-on: ubuntu-latest
38-
steps:
39-
- uses: actions/checkout@v4
40-
with:
41-
submodules: recursive
42-
- name: Set up Python 3.8
43-
uses: actions/setup-python@v2.2.1
44-
with:
45-
python-version: 3.8
46-
- name: Install tox and upgrade setuptools and pip
47-
run: pip install --upgrade tox setuptools pip
48-
- name: Run tox -e ${{ matrix.tox_env }}
49-
run: tox -e ${{ matrix.tox_env }}
50-
51-
test-static:
52-
runs-on: ${{ matrix.os }}
53-
strategy:
54-
matrix:
55-
python-version:
56-
- "3.8"
57-
- "3.9"
58-
- "3.10"
59-
- "3.11"
60-
- "3.12"
61-
- "pypy-3.9"
62-
- "pypy-3.10"
63-
os: ["ubuntu-latest"]
64-
include:
65-
- os: "macos-14" # For m1 macos
66-
python-version: "3.12"
67-
- os: "macos-13" # for x86 macos
68-
python-version: "3.8"
69-
- os: "windows-latest"
70-
python-version: "3.8"
71-
steps:
72-
- uses: actions/checkout@v4
73-
with:
74-
submodules: recursive
75-
- name: Set up Python ${{ matrix.python-version }}
76-
uses: actions/setup-python@v2.2.1
77-
with:
78-
python-version: ${{ matrix.python-version }}
79-
- name: Install tox and upgrade setuptools
80-
run: pip install --upgrade tox setuptools
81-
- name: Set MSVC developer prompt
82-
uses: ilammy/msvc-dev-cmd@v1.6.0
83-
if: runner.os == 'Windows'
84-
- name: Install build dependencies (MacOS)
85-
run: brew install make
86-
if: runner.os == 'macOS'
87-
- name: Run tests
88-
run: tox
89-
- name: Upload coverage report
90-
uses: codecov/codecov-action@v1
91-
92-
test-arch:
93-
if: startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main'
94-
runs-on: "ubuntu-latest"
95-
strategy:
96-
matrix:
97-
distro: [ "ubuntu_latest" ]
98-
arch: ["aarch64"]
99-
steps:
100-
- uses: actions/checkout@v4
101-
with:
102-
submodules: recursive
103-
- uses: uraimo/run-on-arch-action@v2.2.0
104-
name: Build & run test
105-
with:
106-
arch: ${{ matrix.arch }}
107-
distro: ${{ matrix.distro }}
108-
install: |
109-
apt-get update -q -y
110-
apt-get install -q -y python3 python3-pip tox cmake git googletest
111-
run: |
112-
tox
113-
114-
# Test if the python-zlib-ng conda package can be build. Which is linked
115-
# dynamically to the conda zlib-ng package.
116-
test-dynamic:
117-
runs-on: ${{ matrix.os }}
118-
defaults:
119-
run:
120-
# This is needed for miniconda, see:
121-
# https://github.com/marketplace/actions/setup-miniconda#important.
122-
shell: bash -l {0}
123-
strategy:
124-
matrix:
125-
os:
126-
- "ubuntu-latest"
127-
- "macos-13"
128-
- "macos-14"
129-
- "windows-latest"
130-
python_version: [ "python" ]
131-
include:
132-
- os: "ubuntu-latest"
133-
python_version: "pypy"
134-
steps:
135-
- uses: actions/checkout@v4
136-
with:
137-
submodules: recursive
138-
- name: Install miniconda.
139-
uses: conda-incubator/setup-miniconda@v3 # https://github.com/conda-incubator/setup-miniconda.
140-
with:
141-
channels: conda-forge,defaults
142-
- name: Install requirements (universal)
143-
run: conda install zlib-ng ${{ matrix.python_version}} tox
144-
- name: Set MSVC developer prompt
145-
uses: ilammy/msvc-dev-cmd@v1.6.0
146-
if: runner.os == 'Windows'
147-
- name: Run tests (dynamic link)
148-
run: tox
149-
env:
150-
PYTHON_ZLIB_NG_LINK_DYNAMIC: True
151-
16+
# lint:
17+
# runs-on: ubuntu-latest
18+
# steps:
19+
# - uses: actions/checkout@v4
20+
# with:
21+
# submodules: recursive
22+
# - name: Set up Python 3.8
23+
# uses: actions/setup-python@v2.2.1
24+
# with:
25+
# python-version: "3.8"
26+
# - name: Install tox
27+
# run: pip install tox
28+
# - name: Lint
29+
# run: tox -e lint
30+
#
31+
# package-checks:
32+
# strategy:
33+
# matrix:
34+
# tox_env:
35+
# - docs
36+
# - twine_check
37+
# runs-on: ubuntu-latest
38+
# steps:
39+
# - uses: actions/checkout@v4
40+
# with:
41+
# submodules: recursive
42+
# - name: Set up Python 3.8
43+
# uses: actions/setup-python@v2.2.1
44+
# with:
45+
# python-version: 3.8
46+
# - name: Install tox and upgrade setuptools and pip
47+
# run: pip install --upgrade tox setuptools pip
48+
# - name: Run tox -e ${{ matrix.tox_env }}
49+
# run: tox -e ${{ matrix.tox_env }}
50+
#
51+
# test-static:
52+
# runs-on: ${{ matrix.os }}
53+
# strategy:
54+
# matrix:
55+
# python-version:
56+
# - "3.8"
57+
# - "3.9"
58+
# - "3.10"
59+
# - "3.11"
60+
# - "3.12"
61+
# - "pypy-3.9"
62+
# - "pypy-3.10"
63+
# os: ["ubuntu-latest"]
64+
# include:
65+
# - os: "macos-14" # For m1 macos
66+
# python-version: "3.12"
67+
# - os: "macos-13" # for x86 macos
68+
# python-version: "3.8"
69+
# - os: "windows-latest"
70+
# python-version: "3.8"
71+
# steps:
72+
# - uses: actions/checkout@v4
73+
# with:
74+
# submodules: recursive
75+
# - name: Set up Python ${{ matrix.python-version }}
76+
# uses: actions/setup-python@v2.2.1
77+
# with:
78+
# python-version: ${{ matrix.python-version }}
79+
# - name: Install tox and upgrade setuptools
80+
# run: pip install --upgrade tox setuptools
81+
# - name: Set MSVC developer prompt
82+
# uses: ilammy/msvc-dev-cmd@v1.6.0
83+
# if: runner.os == 'Windows'
84+
# - name: Install build dependencies (MacOS)
85+
# run: brew install make
86+
# if: runner.os == 'macOS'
87+
# - name: Run tests
88+
# run: tox
89+
# - name: Upload coverage report
90+
# uses: codecov/codecov-action@v1
91+
#
92+
# test-arch:
93+
# if: startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main'
94+
# runs-on: "ubuntu-latest"
95+
# strategy:
96+
# matrix:
97+
# distro: [ "ubuntu_latest" ]
98+
# arch: ["aarch64"]
99+
# steps:
100+
# - uses: actions/checkout@v4
101+
# with:
102+
# submodules: recursive
103+
# - uses: uraimo/run-on-arch-action@v2.2.0
104+
# name: Build & run test
105+
# with:
106+
# arch: ${{ matrix.arch }}
107+
# distro: ${{ matrix.distro }}
108+
# install: |
109+
# apt-get update -q -y
110+
# apt-get install -q -y python3 python3-pip tox cmake git googletest
111+
# run: |
112+
# tox
113+
#
114+
# # Test if the python-zlib-ng conda package can be build. Which is linked
115+
# # dynamically to the conda zlib-ng package.
116+
# test-dynamic:
117+
# runs-on: ${{ matrix.os }}
118+
# defaults:
119+
# run:
120+
# # This is needed for miniconda, see:
121+
# # https://github.com/marketplace/actions/setup-miniconda#important.
122+
# shell: bash -l {0}
123+
# strategy:
124+
# matrix:
125+
# os:
126+
# - "ubuntu-latest"
127+
# - "macos-13"
128+
# - "macos-14"
129+
# - "windows-latest"
130+
# python_version: [ "python" ]
131+
# include:
132+
# - os: "ubuntu-latest"
133+
# python_version: "pypy"
134+
# steps:
135+
# - uses: actions/checkout@v4
136+
# with:
137+
# submodules: recursive
138+
# - name: Install miniconda.
139+
# uses: conda-incubator/setup-miniconda@v3 # https://github.com/conda-incubator/setup-miniconda.
140+
# with:
141+
# channels: conda-forge,defaults
142+
# - name: Install requirements (universal)
143+
# run: conda install zlib-ng ${{ matrix.python_version}} tox
144+
# - name: Set MSVC developer prompt
145+
# uses: ilammy/msvc-dev-cmd@v1.6.0
146+
# if: runner.os == 'Windows'
147+
# - name: Run tests (dynamic link)
148+
# run: tox
149+
# env:
150+
# PYTHON_ZLIB_NG_LINK_DYNAMIC: True
151+
#
152152
deploy:
153153
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
154154
runs-on: ${{ matrix.os }}
@@ -161,9 +161,10 @@ jobs:
161161
strategy:
162162
matrix:
163163
os:
164-
- ubuntu-latest
165-
- macos-13
166-
- windows-latest
164+
# - ubuntu-latest
165+
# - macos-13
166+
# - windows-latest
167+
- macos-14
167168
cibw_archs_linux: ["x86_64"]
168169
build_sdist: [true]
169170
include:
@@ -192,7 +193,8 @@ jobs:
192193
- name: Build wheels
193194
run: cibuildwheel --output-dir dist
194195
env:
195-
CIBW_SKIP: "*-win32 *-manylinux_i686" # Skip 32 bit
196+
# Skip 32 bit, macosx_arm64 causes issues on cpython 3.8
197+
CIBW_SKIP: "*-win32 *-manylinux_i686 cp38-macosx_arm64"
196198
CIBW_ARCHS_LINUX: ${{ matrix.cibw_archs_linux }}
197199
CIBW_TEST_REQUIRES: "pytest"
198200
# Simple tests that requires the project to be build correctly
@@ -228,17 +230,17 @@ jobs:
228230
with:
229231
name: "dist"
230232
path: "dist/"
231-
- name: Publish package to TestPyPI
232-
# pypa/gh-action-pypi-publish@master does not work on OSX
233-
# Alpha, Beta and dev releases contain a - in the tag.
234-
if: contains(github.ref, '-') && startsWith(github.ref, 'refs/tags')
235-
run: twine upload --skip-existing -r testpypi dist/*
236-
env:
237-
TWINE_USERNAME: __token__
238-
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
239-
- name: Publish package to PyPI
240-
if: "!contains(github.ref, '-') && startsWith(github.ref, 'refs/tags')"
241-
run: twine upload --skip-existing dist/*
242-
env:
243-
TWINE_USERNAME: __token__
244-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
233+
# - name: Publish package to TestPyPI
234+
# # pypa/gh-action-pypi-publish@master does not work on OSX
235+
# # Alpha, Beta and dev releases contain a - in the tag.
236+
# if: contains(github.ref, '-') && startsWith(github.ref, 'refs/tags')
237+
# run: twine upload --skip-existing -r testpypi dist/*
238+
# env:
239+
# TWINE_USERNAME: __token__
240+
# TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
241+
# - name: Publish package to PyPI
242+
# if: "!contains(github.ref, '-') && startsWith(github.ref, 'refs/tags')"
243+
# run: twine upload --skip-existing dist/*
244+
# env:
245+
# TWINE_USERNAME: __token__
246+
# TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)