forked from datastax/python-driver
-
Notifications
You must be signed in to change notification settings - Fork 42
62 lines (52 loc) · 1.85 KB
/
build-experimental.yml
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
name: experimental
on: [push, pull_request]
env:
CIBW_BEFORE_BUILD_LINUX: "rm -rf ~/.pyxbld && yum install -y libev libev-devel openssl openssl-devel"
CIBW_ENVIRONMENT: "CASS_DRIVER_BUILD_CONCURRENCY=2 CFLAGS='-g0 -O3'"
CIBW_BUILD: "cp38* cp39* cp310* cp311*"
CIBW_SKIP: "*musllinux*"
jobs:
build_wheels:
if: contains(github.event.pull_request.labels.*.name, 'test-build-experimental') || github.event_name == 'push' && endsWith(github.event.ref, 'scylla')
# The host should always be linux
runs-on: ubuntu-latest
name: Build experimental ${{ matrix.archs }} wheels
strategy:
fail-fast: false
matrix:
archs: [ aarch64, ppc64le ]
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
with:
platforms: all
if: runner.os == 'Linux'
- uses: actions/setup-python@v4
name: Install Python
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.12.1
- name: Build wheels
run: |
python -m cibuildwheel --archs ${{ matrix.archs }} --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
upload_pypi:
needs: [build_wheels]
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
if: github.event_name == 'push' && endsWith(github.event.ref, 'scylla')
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}