1+ ---
12name : Build and upload to PyPI
2- # Build on every workflow_dispatch, branch push, tag push, and pull request change
33on :
4- workflow_dispatch :
5- pull_request :
4+ workflow_dispatch : null
5+ pull_request : null
66 push :
77 branches :
88 - workfolw_test
9- # Sequence of patterns matched against refs/tags
109 tags :
11- - ' v*' # Push events to matching v*, i.e. v1.0, v20.15.10
12-
10+ - v*
1311jobs :
1412 build_wheels_windows_64 :
1513 name : Build wheels on ${{ matrix.os }} 64-bit
1614 runs-on : ${{ matrix.os }}
1715 strategy :
1816 matrix :
19- os : [windows-latest]
20-
17+ os :
18+ - windows-latest
2119 steps :
2220 - uses : actions/checkout@v4.2.2
2321 - name : Build wheels
2422 uses : pypa/cibuildwheel@v3.0.1
2523 env :
2624 CIBW_BUILD : " *-win_amd64"
27- CIBW_SKIP : " cp36-* pp*"
28-
25+ CIBW_SKIP : cp36-* pp*
2926 - uses : actions/upload-artifact@v4.6.2
3027 with :
3128 name : ibmdb-wheels64-${{ matrix.os }}
3229 path : wheelhouse/*.whl
33-
3430 build_wheels_windows_32 :
3531 name : Build wheels on ${{ matrix.os }} 32-bit
3632 runs-on : ${{ matrix.os }}
3733 strategy :
3834 matrix :
39- os : [windows-latest]
40-
35+ os :
36+ - windows-latest
4137 steps :
4238 - uses : actions/checkout@v4.2.2
4339 - name : Build wheels
4440 uses : pypa/cibuildwheel@v3.0.1
4541 env :
4642 CIBW_BUILD : " *-win32"
47- CIBW_SKIP : " cp36-* pp*"
48-
43+ CIBW_SKIP : cp36-* pp*
4944 - uses : actions/upload-artifact@v4.6.2
5045 with :
5146 name : ibmdb-wheels32-${{ matrix.os }}
5247 path : wheelhouse/*.whl
53-
5448 build_wheels_linux :
5549 name : Build wheels on ${{ matrix.os }}
5650 runs-on : ${{ matrix.os }}
5751 strategy :
5852 matrix :
59- os : [ubuntu-latest]
60-
53+ os :
54+ - ubuntu-latest
6155 steps :
6256 - uses : actions/checkout@v4.2.2
63-
6457 - name : Build wheels
65- uses : pypa/cibuildwheel@v3.0.1
66- env :
67- CIBW_MANYLINUX_X86_64_IMAGE : manylinux2014
68-
69- # Repair wheel and exclude driver-specific libs
70- CIBW_REPAIR_WHEEL_COMMAND_LINUX : |
71- auditwheel repair
72- --exclude libdb2.so.1
73- --exclude libDB2xml4c.so.58
74- --exclude libm.so.6
75- --exclude libcrypt.so.1
76- --exclude libpam.so.0
77- --exclude librt.so.1
78- --exclude libpthread.so.0
79- --exclude libc.so.6
80- --exclude libdl.so.2
81- --wheel-dir {dest_dir}
82- {wheel}
83-
84- - uses : actions/upload-artifact@v4.6.2
85- with :
58+ uses : pypa/cibuildwheel@v3.0.1
59+ env :
60+ CIBW_MANYLINUX_X86_64_IMAGE : manylinux2014
61+ CIBW_REPAIR_WHEEL_COMMAND_LINUX : |
62+ auditwheel repair
63+ --exclude libdb2.so.1
64+ --exclude libDB2xml4c.so.58
65+ --exclude libm.so.6
66+ --exclude libcrypt.so.1
67+ --exclude libpam.so.0
68+ --exclude librt.so.1
69+ --exclude libpthread.so.0
70+ --exclude libc.so.6
71+ --exclude libdl.so.2
72+ --wheel-dir {dest_dir}
73+ {wheel}
74+ - uses : actions/upload-artifact@v4.6.2
75+ with : null
8676 name : ibmdb-wheels-${{ matrix.os }}
8777 path : wheelhouse/*.whl
88-
89-
9078 build_wheels_macos_arm64 :
9179 name : Build wheels on macOS ARM64
9280 runs-on : macos-14
9381 strategy :
9482 matrix :
95- architecture : [arm64]
96-
83+ architecture :
84+ - arm64
9785 steps :
9886 - uses : actions/checkout@v4.2.2
9987 - name : Build wheels
10088 uses : pypa/cibuildwheel@v3.0.1
10189 env :
102- CIBW_SKIP : " cp36-* cp37-* cp38-* pp*"
103- MACOSX_DEPLOYMENT_TARGET : 14.0
104-
90+ CIBW_SKIP : cp36-* cp37-* cp38-* pp*
91+ MACOSX_DEPLOYMENT_TARGET : 14
10592 - uses : actions/upload-artifact@v4.6.2
10693 with :
10794 name : ibmdb-wheelsarm64
10895 path : wheelhouse/*.whl
109-
11096 build_wheels_macos_x86 :
11197 name : Build wheels for macOS x86_64
11298 runs-on : macos-13
11399 strategy :
114100 matrix :
115- architecture : [x86_64]
116-
101+ architecture :
102+ - x86_64
117103 steps :
118104 - uses : actions/checkout@v4.2.2
119105 - name : Build wheels
120106 uses : pypa/cibuildwheel@v3.0.1
121107 env :
122- CIBW_SKIP : " cp36-* pp*"
108+ CIBW_SKIP : cp36-* pp*
123109 MACOSX_DEPLOYMENT_TARGET : 10.15
124-
125110 - uses : actions/upload-artifact@v4.6.2
126111 with :
127112 name : ibmdb-wheelsx86-${{ matrix.os }}
128113 path : wheelhouse/*.whl
129-
130114 build_sdist :
131115 name : Build source distribution
132116 runs-on : ubuntu-latest
@@ -136,12 +120,14 @@ jobs:
136120 run : python -m pip install --upgrade pip build
137121 - name : Build sdist
138122 run : python -m build --sdist --no-isolation
139- - name : Package version
123+ - name : Package version
140124 id : version
141- run : |
142- cd dist
143- pip install ibm_db*
144- echo "VERSION=$(python -c 'import ibm_db; print(ibm_db.__version__)')" >> $GITHUB_OUTPUT
125+ run : >
126+ cd dist
127+
128+ pip install ibm_db*
129+
130+ echo "VERSION=$(python -c 'import ibm_db; print(ibm_db.__version__)')" >> $GITHUB_OUTPUT
145131 - name : Build source distribution
146132 run : |
147133 PACKAGE="ibm_db-$VERSION"
@@ -153,32 +139,33 @@ jobs:
153139 rm -rf $PACKAGE
154140 env :
155141 VERSION : ${{ steps.version.outputs.VERSION}}
156-
157142 - name : Upload sdist
158143 uses : actions/upload-artifact@v4.6.2
159144 with :
160145 name : ibmdb-sdist
161146 path : dist/*.tar.gz
162-
163147 upload_pypi :
164- needs : [build_wheels_windows_64, build_wheels_windows_32, build_wheels_linux, build_wheels_macos_arm64, build_wheels_macos_x86, build_sdist]
148+ needs :
149+ - build_wheels_windows_64
150+ - build_wheels_windows_32
151+ - build_wheels_linux
152+ - build_wheels_macos_arm64
153+ - build_wheels_macos_x86
154+ - build_sdist
165155 runs-on : ${{ matrix.os }}
166156 strategy :
167157 matrix :
168- os : [ubuntu-latest]
158+ os :
159+ - ubuntu-latest
169160 permissions :
170- # IMPORTANT: this permission is mandatory for trusted publishing
171161 id-token : write
172-
173- # upload to PyPI on every tag starting with 'v'
174162 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
175163 steps :
176- - uses : actions/download-artifact@v4.3.0
177- with :
178- path : dist
179- pattern : ibmdb-*
180- merge-multiple : true
181-
182- - name : Publish distribution to PyPI
183- if : startsWith(github.ref, 'refs/tags')
184- uses : pypa/gh-action-pypi-publish@release/v1.12
164+ - uses : actions/download-artifact@v4.3.0
165+ with :
166+ path : dist
167+ pattern : ibmdb-*
168+ merge-multiple : true
169+ - name : Publish distribution to PyPI
170+ if : startsWith(github.ref, 'refs/tags')
171+ uses : pypa/gh-action-pypi-publish@release/v1.12
0 commit comments