forked from openPMD/openPMD-api
-
Notifications
You must be signed in to change notification settings - Fork 0
135 lines (118 loc) · 5.01 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: wheels
on: [push, pull_request]
jobs:
build_wheels:
name: Build ${{ matrix.arch }} wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
arch: "x86_64"
# 32bit Linux builds blocked by:
# GNU 7.3.1 & MPark.Variant 1.4.0 on i686:
# https://github.com/pypa/manylinux/issues/543
# variant.hpp:2241:9: internal compiler error:
# unexpected expression ‘I’ of kind template_parm_index
# typename T = lib::type_pack_element_t<I, Ts...>,
#- os: ubuntu-20.04
# arch: "i686"
# builds faster on Travis-CI:
#- os: ubuntu-20.04
# arch: "aarch64"
# builds faster on Travis-CI:
#- os: ubuntu-20.04
# arch: "ppc64le"
# builds faster on Travis-CI:
# blocked by https://github.com/GTkorvo/dill/issues/15
#- os: ubuntu-20.04
# arch: "s390x"
- os: windows-2019
arch: "AMD64"
# x86 (32bit)
- os: macos-10.15
arch: "x86_64"
# not really needed separately, yet arm64 also creates a wheel for
# CPython 3.8:
# https://cibuildwheel.readthedocs.io/en/stable/faq/#apple-silicon
# https://github.com/pypa/cibuildwheel/pull/704
- os: macos-10.15
arch: "arm64"
- os: macos-10.15
arch: "universal2"
steps:
- uses: actions/checkout@v2
with:
path: 'src'
ref: '0.14.3'
- uses: actions/checkout@v2
with:
path: 'src/.github/'
- uses: actions/setup-python@v1
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install cibuildwheel==2.0.1
# - name: Download Patch 1/1
# uses: suisei-cn/actions-download-file@v1
# id: setupversion
# with:
# url: "https://gist.githubusercontent.com/ax3l/4db2f1744e0e28e6c013ee4e752b3cb7/raw/324bdb60894d51608a48890573654e10e1b1c3a0/setupversion.patch"
# target: src/.patch/
# - name: Apply Patch
# run: |
# python -m pip install "patch==1.*"
# cd src
# python -m patch .patch/setupversion.patch
- name: Build wheel
env:
# (1) CMake/Pybind11 scripts not clever enough to build 32bit Windows with 64bit compiler
# (2) GNU 7.3.1 & MPark.Variant 1.4.0 on i686:
# https://github.com/pypa/manylinux/issues/543
# variant.hpp:2241:9: internal compiler error:
# unexpected expression ‘I’ of kind template_parm_index
# typename T = lib::type_pack_element_t<I, Ts...>,
# (3) Disable PyPy (manylinux image: yum repo issues)
# https://github.com/pypa/manylinux/issues/899
# (4) musllinux: requires alternative to "yum" in library_builders.sh
# (5) CPython 3.10: requires 0.14.4+ (https://github.com/openPMD/openPMD-api/pull/1139)
CIBW_SKIP: "*-win32 *-manylinux_i686 pp*-manylinux* *-musllinux_* cp310-*"
CIBW_ARCHS: "${{ matrix.arch }}"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.6"
# Install dependencies
CIBW_BEFORE_BUILD_LINUX: bash -x .github/library_builders.sh
CIBW_BEFORE_BUILD_MACOS: bash -x .github/library_builders.sh
CIBW_BEFORE_BUILD_WINDOWS: 'cmd /E:ON /V:ON /C .github\library_builders.bat'
# for the openPMD-api build, CMake shall search for
# static dependencies of HDF5 and ADIOS1 (see setup.py)
CIBW_ENVIRONMENT: HDF5_USE_STATIC_LIBRARIES='ON' ADIOS_USE_STATIC_LIBS='ON'
CIBW_ENVIRONMENT_WINDOWS: HDF5_USE_STATIC_LIBRARIES='ON' CMAKE_PREFIX_PATH='C:/Program Files (x86)/ADIOS2;C:/Program Files (x86)/blosc;C:/Program Files/HDF_Group/HDF5/1.12.0;C:/Program Files (x86)/ZFP;C:/Program Files (x86)/zlib/'
# C++11 & 14 support in macOS 10.9+
# C++17 support in macOS 10.13+/10.14+
# https://cibuildwheel.readthedocs.io/en/stable/cpp_standards/#macos-and-deployment-target-versions
MACOSX_DEPLOYMENT_TARGET: 10.9
# Show a bit more output (pip -v)
CIBW_BUILD_VERBOSITY: 1
run: |
cd src
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade cmake
python setup.py sdist --dist-dir ../wheelhouse
python -m cibuildwheel --output-dir ../wheelhouse
- name: Publish on pypi.org
if: github.event_name == 'push' && github.repository == 'openPMD/openPMD-api' && github.ref == 'refs/heads/wheels'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypa_gh_action_upload }}
run: |
python -m pip install -U twine
python -m twine upload --skip-existing wheelhouse/*
- uses: actions/upload-artifact@v1
name: Publish as GitHub artifact
with:
name: wheels
path: ./wheelhouse