forked from Qiskit/qiskit-aer
-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (86 loc) · 2.64 KB
/
build.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
84
85
86
name: Build
on:
push:
branches: [master, 'stable/*']
pull_request:
branches: [master, 'stable/*']
jobs:
standalone:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["macOS-latest", "ubuntu-latest", "windows-latest"]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install deps
run: pip install "conan>=1.31.2"
- name: Install openblas
run: |
set -e
sudo apt-get update
sudo apt-get install -y libopenblas-dev
shell: bash
if: runner.os == 'Linux'
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
if: runner.os == 'Windows'
- name: Compile Standalone Windows
run: |
set -e
mkdir out; cd out; cmake .. -DBUILD_TESTS=1
cmake --build . --config Release
shell: bash
if: runner.os == 'Windows'
- name: Compile Standalone
run: |
set -e
mkdir out; cd out; cmake .. -DBUILD_TESTS=1
make
shell: bash
if: runner.os != 'Windows'
- name: Run Unit Tests
run: |
cd out/bin
for test in test*
do echo $test
if ! ./$test
then
ERR=1
fi
done
if [ ! -z "$ERR" ]
then
exit 1
fi
shell: bash
wheel:
runs-on: ${{ matrix.os }}
needs: ["standalone"]
strategy:
matrix:
os: ["macOS-latest", "ubuntu-latest"]
steps:
- uses: actions/checkout@v2
- name: Set up Python Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install deps
run: python -m pip install -U cibuildwheel==1.7.1
- name: Build Wheels
env:
CIBW_BEFORE_ALL_LINUX: "yum install -y https://archives.fedoraproject.org/pub/archive/epel/6/x86_64/epel-release-6-8.noarch.rpm && yum install -y openblas-devel"
CIBW_BEFORE_BUILD: "pip install -U virtualenv pybind11"
CIBW_SKIP: "cp27-* cp34-* cp35-* pp*"
CIBW_MANYLINUX_X86_64_IMAGE: "quay.io/pypa/manylinux2010_x86_64:2020-12-03-912b0de"
CIBW_MANYLINUX_I686_IMAGE: "quay.io/pypa/manylinux2010_i686:2020-12-03-912b0de"
CIBW_TEST_COMMAND: "python3 {project}/tools/verify_wheels.py"
CIBW_TEST_REQUIRES: "git+https://github.com/Qiskit/qiskit-terra.git"
run: cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl