-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (71 loc) · 2.13 KB
/
buildv2.yml
File metadata and controls
84 lines (71 loc) · 2.13 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
83
84
name: Build and Release dlib Wheels v2
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build_wheels:
name: Build wheels
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Clone dlib
run: |
git clone --depth 1 https://github.com/davisking/dlib.git dlib_src
- name: Build wheels
uses: pypa/cibuildwheel@v2.21.0
with:
package-dir: dlib_src
env:
CIBW_BUILD: cp311-* cp312-*
CIBW_ARCHS_LINUX: x86_64 aarch64
CIBW_BEFORE_ALL_LINUX: >
yum install -y cmake3 boost-devel openblas-devel
lapack-devel git gcc gcc-c++ make
CIBW_ENVIRONMENT: "CXXFLAGS='-O2 -g0'"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: wheels
path: ./wheelhouse/*.whl
retention-days: 30
release:
runs-on: ubuntu-latest
needs: [build_wheels]
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/
- name: Prepare wheels
run: |
mkdir -p wheels
find artifacts -name "*.whl" -exec cp {} wheels/ \;
echo "Built wheels:"
ls -lh wheels/
- name: Create Release
uses: softprops/action-gh-release@v2
with:
name: Release ${{ github.ref_name }}
body: |
Prebuilt dlib wheels for Linux (x86_64 and aarch64) on Python 3.11 and 3.12
**Installation:**
pip install dlib-*.whl
Choose the wheel that matches your:
- Python version (cp311 or cp312)
- Architecture (x86_64 or aarch64)
files: wheels/*.whl
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}