@@ -42,24 +42,69 @@ jobs:
42
42
uses : actions/upload-artifact@v4
43
43
with :
44
44
name : dist-sdist
45
- path : ${{github.workspace}}/lang/python/dist/*.tar.gz
45
+ path : ' ${{github.workspace}}/lang/python/dist/*.tar.gz'
46
+
47
+ build_bdist :
48
+ name : Build BDist (${{matrix.os}})
49
+ runs-on : ${{matrix.os}}
50
+ defaults :
51
+ run :
52
+ working-directory : ' ${{github.workspace}}/lang/python'
53
+ strategy :
54
+ matrix :
55
+ # Update upload_release when these are changed!!
56
+ os : [ubuntu-22.04, windows-2022]
57
+ steps :
58
+ - name : Checkout Repository
59
+ uses : actions/checkout@v4
60
+ with :
61
+ submodules : recursive
62
+
63
+ - name : Configure CMake
64
+ working-directory : ' ${{github.workspace}}'
65
+ run : cmake -G "Unix Makefiles" -B build -DCMAKE_BUILD_TYPE=Release -DSOURCEPP_BUILD_PYTHON_WRAPPERS=ON -DSOURCEPP_VERSION="${{inputs.version}}"
66
+
67
+ - name : Build BDist
68
+ run : |
69
+ python -m pip install cibuildwheel==3.1.1
70
+ python -m cibuildwheel --output-dir dist
71
+
72
+ - name : Upload Artifact
73
+ uses : actions/upload-artifact@v4
74
+ with :
75
+ name : dist-bdist-${{matrix.os}}
76
+ path : ' ${{github.workspace}}/lang/python/dist/*.whl'
46
77
47
78
upload_release :
48
79
name : Upload a Release
49
80
if : inputs.release
50
- needs : [build_sdist]
81
+ needs :
82
+ - build_sdist
83
+ - build_bdist
51
84
runs-on : ubuntu-latest
52
85
environment :
53
86
name : pypi-release
54
87
url : https://pypi.org/p/sourcepp
55
88
permissions :
56
89
id-token : write
57
90
steps :
58
- - name : Download Artifacts
91
+ - name : Download SDist
59
92
uses : actions/download-artifact@v4
60
93
with :
61
94
name : dist-sdist
62
95
path : dist
63
96
97
+ - name : Download BDist (ubuntu-22.04)
98
+ uses : actions/download-artifact@v4
99
+ with :
100
+ name : dist-bdist-ubuntu-22.04
101
+ path : dist
102
+
103
+ - name : Download BDist (windows-2022)
104
+ uses : actions/download-artifact@v4
105
+ with :
106
+ name : dist-bdist-windows-2022
107
+ path : dist
108
+
64
109
- name : Publish to PyPI
65
110
uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments