forked from python-zeroconf/python-zeroconf
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (61 loc) · 1.97 KB
/
ci.yml
File metadata and controls
73 lines (61 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: CI
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macOS-11]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: "master"
# Used to host cibuildwheel
- name: Set up Python
uses: actions/setup-python@v4
- name: Install python-semantic-release
run: pipx install python-semantic-release==7.34.6
- name: Get Release Tag
id: release_tag
shell: bash
run: |
echo "::set-output name=newest_release_tag::$(semantic-release print-version --current)"
- uses: actions/checkout@v3
with:
ref: "${{ steps.release_tag.outputs.newest_release_tag }}"
fetch-depth: 0
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
# to supply options, put them in 'env', like:
env:
CIBW_SKIP: cp36-* cp37-* pp36-* pp37-* *p38-*_aarch64 *p39-*_aarch64 *p310-*_aarch64 pp*_aarch64 *musllinux*_aarch64
CIBW_BEFORE_ALL_LINUX: apt-get install -y gcc || yum install -y gcc || apk add gcc
CIBW_ARCHS_LINUX: auto aarch64
CIBW_BUILD_VERBOSITY: 3
REQUIRE_CYTHON: 1
- name: Build pure wheel
if: runner.os == 'Linux'
run: |
pip install build
cp pyproject.toml pyproject.toml.bak
sed -i -E -e '/\[tool.poetry.build\]/,/^$/d' pyproject.toml
python -m build --wheel --outdir ./wheelhouse .
mv pyproject.toml.bak pyproject.toml
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl