-
Notifications
You must be signed in to change notification settings - Fork 211
83 lines (74 loc) · 2.68 KB
/
Copy pathtesting_wheels.yml
File metadata and controls
83 lines (74 loc) · 2.68 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
74
75
76
77
78
79
80
81
82
name: Build all wheels for testing
on:
push:
# Build wheels when pushing to master.
branches:
- master
# Build wheels for any PRs.
pull_request:
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-10.15
name: mac
cibw:
build: "cp36* cp37* cp38*"
- os: macos-10.15
name: mac-arm
cibw:
arch: universal2
build: "cp39*"
- os: ubuntu-20.04
name: manylinux2014
cibw:
arch: x86_64
build: "cp36* cp37* cp38* cp39*"
manylinux_image: manylinux2014
- os: ubuntu-20.04
name: manylinux2014-gpu
cibw:
arch: x86_64
build: "cp36*"
manylinux_image: manylinux2014
- os: windows-2019
name: win_amd64
architecture: x64
cibw:
build: "cp36-win_amd64 cp37-win_amd64 cp38-win_amd64 cp39-win_amd64"
env:
QSIMCIRQ_PROJECT: "${{ matrix.name == 'manylinux2014-gpu' && 'qsimcirq-gpu' || 'qsimcirq'}}"
CIBW_BUILD: "${{ matrix.cibw.build || '*' }}"
CIBW_ARCHS: "${{ matrix.cibw.arch || 'auto' }}"
CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_image }}"
CIBW_BEFORE_ALL_LINUX: "bash build_tools/cuda_install.sh && echo $PATH"
CIBW_ENVIRONMENT_LINUX: PATH=/usr/local/cuda-11/bin:$PATH LD_LIBRARY_PATH=/usr/local/cuda-11/lib64:$LD_LIBRARY_PATH
CIBW_ENVIRONMENT_PASS_LINUX: PATH LD_LIBRARY_PATH
CIBW_BEFORE_BUILD_MACOS: "brew install libomp"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""
# due to package and module name conflict have to temporarily move it away to run tests
CIBW_BEFORE_TEST: "mv {package}/qsimcirq /tmp"
# prevent GPU tests (no GPU on GHA runners)
CIBW_TEST_COMMAND: "pytest {package}/qsimcirq_tests/qsimcirq_test.py -k \"not gpu\" && mv /tmp/qsimcirq {package}"
steps:
- uses: actions/checkout@v2
# Used to host cibuildwheel
- uses: actions/setup-python@v2
# Install NVCC on Ubuntu to include GPU in the wheel.
- name: cuda-toolkit
if: ${{ matrix.os == 'ubuntu-20.04' }}
uses: Jimver/cuda-toolkit@v0.2.5
with:
cuda: "11.5.1"
- name: Install cibuildwheel and twine
run: python -m pip install cibuildwheel==1.11.0
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
name: python-wheels
path: ./wheelhouse/*.whl