forked from PennyLaneAI/pennylane-lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (67 loc) · 2.21 KB
/
wheel_linux_aarch64.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Wheel::Linux::ARM
on:
push:
branches:
- master
release:
types: [published]
env:
CIBW_BUILD: 'cp37-* cp38-* cp39-* cp310-*'
CIBW_SKIP: "*-musllinux*"
# Python build settings
CIBW_BEFORE_BUILD: |
pip install pybind11 ninja cmake && yum install -y gcc gcc-c++
# Testing of built wheels
CIBW_TEST_REQUIRES: numpy~=1.21 scipy pytest pytest-cov pytest-mock flaky
CIBW_BEFORE_TEST: pip install git+https://github.com/PennyLaneAI/pennylane.git@master
CIBW_TEST_COMMAND: |
pl-device-test --device=lightning.qubit --skip-ops -x --tb=short --no-flaky-report
# Use Centos 7 wheel-builder for ARM
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
jobs:
linux-wheels-aarch64:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
arch: [aarch64]
name: ubuntu-latest::aarch64
runs-on: ${{ matrix.os }}
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
name: Set up QEMU
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.3.0
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS_LINUX: ${{matrix.arch}}
- uses: actions/upload-artifact@v2
if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master' }}
with:
name: ${{ runner.os }}-wheels-${{ matrix.arch }}.zip
path: ./wheelhouse/*.whl
upload-pypi:
needs: linux-wheels-aarch64
runs-on: ubuntu-latest
if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master'}}
steps:
- uses: actions/download-artifact@v2
with:
name: Linux-wheels-aarch64.zip
path: dist
- name: Upload wheels to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/