-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
45 lines (44 loc) · 1.47 KB
/
Copy pathaction.yml
File metadata and controls
45 lines (44 loc) · 1.47 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
name: 'Build wheel using CIBuildWheel'
description: 'Reusable CIBuildWheel action for a hybrid Python project using HDF5 and needing numpy for tests'
inputs:
platform:
required: true
description: The, e.g., platform to target
arch:
required: true
description: The targeted architecture
python-version:
required: true
description: The Python version to use
runs:
using: "composite"
steps:
-
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Determine hdf5 installation command
id: hdf5
shell: bash
run: |
if [[ "${{ inputs.platform }}" == "manylinux" ]]; then
echo "::set-output name=command::yum install -y hdf5-devel"
fi
if [[ "${{ inputs.platform }}" == "musllinux" ]]; then
echo "::set-output name=command::apk update; apk add hdf5-dev"
fi
-
name: Build wheel
uses: pypa/cibuildwheel@v2.6.1
env:
CIBW_BUILD: ${{ inputs.python-version }}-${{ inputs.platform }}*
CIBW_ARCHS: ${{ inputs.arch }}
CIBW_BEFORE_ALL_LINUX: ${{ steps.hdf5.outputs.command }}
CIBW_BEFORE_TEST: python -m pip install numpy
CIBW_TEST_COMMAND: python -m unittest discover -s {project}/wrap/tests
-
uses: actions/upload-artifact@v2
with:
name: "${{ inputs.python-version }}-${{ inputs.platform }}_${{ inputs.arch }}"
path: ./wheelhouse/*.whl