-
Notifications
You must be signed in to change notification settings - Fork 59
79 lines (68 loc) · 2.22 KB
/
build-manylinux.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
name: Build manylinux binary wheels
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Download libgphoto2
run: wget -nv
https://github.com/gphoto/libgphoto2/releases/download/v2.5.31/libgphoto2-2.5.31.tar.xz
-O libgphoto2.tar.xz
- name: Extract libgphoto2
run: |
mkdir $PWD/libgphoto2
tar xf libgphoto2.tar.xz \
--directory $PWD/libgphoto2 --strip-components=1
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: auto64
CIBW_BUILD: cp*-manylinux_x86_64
CIBW_ENVIRONMENT: GPHOTO2_ROOT=$PWD/libgphoto2/local_install
CIBW_BEFORE_ALL: >
yum install -y libusbx-devel libexif-devel libjpeg-turbo-devel \
gd-devel libcurl-devel libxml2-devel libtool-ltdl-devel &&
pushd $PWD/libgphoto2 &&
./configure --prefix=$PWD/local_install --disable-internal-docs \
--enable-vusb &&
make &&
make install &&
popd
- name: Store results
uses: actions/upload-artifact@v3
with:
name: manylinux-wheels
path: wheelhouse/*.whl
test:
needs: build
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest]
include:
- python-version: '3.6'
os: ubuntu-20.04
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Fetch wheel files
uses: actions/download-artifact@v3
with:
name: manylinux-wheels
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Install locales
run: |
sudo apt-get install locales
sudo locale-gen de
- name: Install wheel
run: pip3 install --disable-pip-version-check --no-index
--find-links=. gphoto2
- name: Test installation
run: python3 -m unittest discover tests -v