@@ -104,29 +104,44 @@ jobs:
104104 retention-days : 7
105105
106106 macos :
107- name : Build macOS Universal Wheel
107+ name : Build macOS Wheels
108108 if : (github.event_name == 'workflow_call' && inputs.version != '') || github.event_name == 'workflow_dispatch'
109109 needs : [get-version, test]
110110 runs-on : macos-latest
111+ continue-on-error : true
112+ strategy :
113+ matrix :
114+ target : [x86_64-apple-darwin, aarch64-apple-darwin]
111115 steps :
112116 - uses : actions/checkout@v4
113117 with :
114118 fetch-depth : 0
119+
120+ - name : Install dependencies
121+ run : |
122+ # Install OpenSSL and necessary tools
123+ brew install openssl@3
124+
125+ # Use vendored OpenSSL to avoid cross-compilation issues
126+ echo "OPENSSL_STATIC=1" >> $GITHUB_ENV
127+ echo "OPENSSL_VENDORED=1" >> $GITHUB_ENV
128+ echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV
129+
115130 - uses : ./.github/actions/build_bindings_python
116131 with :
117- target : universal2-apple-darwin
132+ target : ${{ matrix.target }}
118133 version : ${{ needs.get-version.outputs.version }}
119134 - name : Upload macOS wheel
120135 uses : actions/upload-artifact@v4
121136 with :
122- name : python-macos-universal
137+ name : python-macos-${{ matrix.target }}
123138 path : src/bendpy/dist/*.whl
124139 retention-days : 7
125140
126141 publish :
127142 name : Publish to PyPI
128143 if : (github.event_name == 'workflow_call' && inputs.version != '') || github.event_name == 'workflow_dispatch'
129- needs : [get-version, test, linux, macos ]
144+ needs : [get-version, test, linux]
130145 runs-on : ubuntu-latest
131146 steps :
132147 - uses : actions/checkout@v4
@@ -135,20 +150,26 @@ jobs:
135150 pattern : python-*
136151 merge-multiple : true
137152 path : src/bendpy/dist
153+ continue-on-error : true
138154
139155 - name : Show packages to publish
140156 run : |
141157 echo "Publishing packages for version: ${{ needs.get-version.outputs.version }}"
142158 echo "Packages found:"
143- ls -la src/bendpy/dist/
159+ ls -la src/bendpy/dist/ || echo "No packages found"
144160 echo "Total packages: $(ls src/bendpy/dist/*.whl 2>/dev/null | wc -l)"
145161
146162 - name : Publish to PyPI
147163 timeout-minutes : 10
148164 run : |
149165 pip install twine
150166 echo "Publishing to PyPI..."
151- twine upload --skip-existing --verbose src/bendpy/dist/*.whl
167+ if [ -n "$(find src/bendpy/dist -name "*.whl" 2>/dev/null)" ]; then
168+ twine upload --skip-existing --verbose src/bendpy/dist/*.whl
169+ else
170+ echo "No wheel files found to publish"
171+ exit 1
172+ fi
152173 env :
153174 TWINE_USERNAME : __token__
154175 TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
0 commit comments