-
Notifications
You must be signed in to change notification settings - Fork 138
103 lines (83 loc) · 2.88 KB
/
python_dbapi_wheels.yml
File metadata and controls
103 lines (83 loc) · 2.88 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: "Build Python DB API Driver Wheels"
on:
push:
paths:
- 'modules/platforms/python/dbapi/**'
- '.github/workflows/python_dbapi_wheels.yml'
workflow_dispatch:
jobs:
build_source_dist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
sparse-checkout: |
modules/platforms/
- uses: actions/setup-python@v6
with:
python-version: 3.11
- name: Install setuptools
run: python -m pip install --upgrade setuptools packaging>=24.2
- name: Copy C++ sources
run: cp -r modules/platforms/cpp modules/platforms/python/dbapi/
- name: Build source distribution
working-directory: modules/platforms/python/dbapi
run: python setup.py sdist --formats=gztar --dist-dir ./dist
- uses: actions/upload-artifact@v4
with:
name: source-distributions
path: modules/platforms/python/dbapi/dist/*
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-latest
arch: arm64
macos_deployment_target: "14.0"
- os: macos-15-intel
arch: x86_64
macos_deployment_target: "15.0"
- os: ubuntu-latest
arch: auto64
cibw_build: "cp31{0,1,2,3,4}-manylinux*"
- os: windows-latest
arch: AMD64
steps:
- uses: actions/checkout@v6
with:
sparse-checkout: |
modules/platforms/
- uses: actions/setup-python@v6
with:
python-version: 3.11
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==3.3.0
- name: Install OpenSSL (Windows)
if: runner.os == 'Windows'
shell: powershell
run: |
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
vcpkg install openssl:x64-windows-static-md
- name: Build wheels ${{ matrix.os }}
run: python -m cibuildwheel --output-dir modules/platforms/python/dbapi/wheels modules/platforms/python/dbapi
env:
CIBW_BUILD: ${{ matrix.cibw_build || 'cp31{0,1,2,3,4}-*' }}
CIBW_ARCHS: ${{ matrix.arch }}
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos_deployment_target || '' }}
CIBW_BUILD_VERBOSITY: 1
CIBW_BEFORE_ALL_LINUX: "yum install -y openssl-devel"
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: modules/platforms/python/dbapi/wheels/*.whl
merge:
runs-on: ubuntu-latest
needs: [build_source_dist, build_wheels]
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: python-dbapi-all-artifacts