-
Notifications
You must be signed in to change notification settings - Fork 19
135 lines (109 loc) · 3.62 KB
/
build_wheels.yaml
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: Build Wheels
on:
push:
branches: ["release/wheels"]
pull_request:
branches: ["release/wheels"]
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
jobs:
build_manylinux2014_x86_64:
name: Compile manylinux2014_x86_64
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Update submodules
run: |
git clone --recurse-submodules https://github.com/tunmx/inspireface-3rdparty.git 3rdparty
- name: Set up Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Execute Docker Compose
run: |
docker-compose up build-manylinux2014-x86
- name: Upload wheel artifacts
uses: actions/upload-artifact@v4
with:
name: manylinux2014-wheels
path: python/dist/*
retention-days: 1
build_macos_arm64:
name: Compile MacOS-arm64
runs-on: macos-14
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Update submodules
run: |
git clone --recurse-submodules https://github.com/tunmx/inspireface-3rdparty.git 3rdparty
- name: Install Dependencies
run: |
brew install cmake
- name: Build the SDK
run: |
bash command/build_wheel_macos_arm64.sh
ls python/dist
- name: Upload wheel artifacts
uses: actions/upload-artifact@v4
with:
name: macos-arm64-wheels-py${{ matrix.python-version }}
path: python/dist/*
retention-days: 1
build_macos_x86_64:
name: Compile MacOS-x86_64
runs-on: macos-13
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Update submodules
run: |
git clone --recurse-submodules https://github.com/tunmx/inspireface-3rdparty.git 3rdparty
- name: Install Dependencies
run: |
brew install cmake
- name: Build the SDK
run: |
bash command/build_wheel_macos_x86.sh
ls python/dist
- name: Upload wheel artifacts
uses: actions/upload-artifact@v4
with:
name: macos-x86_64-wheels-py${{ matrix.python-version }}
path: python/dist/*
retention-days: 1
upload_to_pypi:
name: Upload Wheels to PyPI
needs: [build_manylinux2014_x86_64, build_macos_arm64, build_macos_x86_64]
runs-on: ubuntu-latest
steps:
- name: Download all wheels
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Upload to PyPI
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
pip install twine
find dist -name "*.whl" -exec twine upload {} -u __token__ -p $PYPI_API_TOKEN \;