1- # CI -- Build wheels on Linux/Windows/macOS ARM, publish to PyPI on tag.
1+ # CI -- Build wheels on Linux/Windows/macOS (Intel x86_64 + ARM aarch64) , publish to PyPI on tag.
22#
33# Rust source is injected at build time from three GitHub Actions secrets
44# (RUST_SRC_B64_1 + RUST_SRC_B64_2 + RUST_SRC_B64_3) to keep the proprietary
@@ -166,6 +166,52 @@ jobs:
166166 name : wheels-macos-aarch64-py${{ matrix.python-version }}
167167 path : dist
168168
169+ # ------------------------------------------------------------------
170+ # macOS Intel (x86_64) wheels
171+ # ------------------------------------------------------------------
172+ macos-intel :
173+ name : macos-x86_64-py${{ matrix.python-version }}
174+ runs-on : macos-13
175+ strategy :
176+ fail-fast : false
177+ matrix :
178+ python-version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
179+ steps :
180+ - uses : actions/checkout@v4
181+
182+ - name : Inject Rust source
183+ env :
184+ PART1 : ${{ secrets.RUST_SRC_B64_1 }}
185+ PART2 : ${{ secrets.RUST_SRC_B64_2 }}
186+ PART3 : ${{ secrets.RUST_SRC_B64_3 }}
187+ run : |
188+ if [ -z "$PART1" ]; then
189+ echo "::warning::RUST_SRC_B64_1 secret not set -- skipping wheel build"
190+ echo "SKIP_BUILD=1" >> "$GITHUB_ENV"
191+ else
192+ echo "${PART1}${PART2}${PART3}" | base64 -d | tar -xzf - -C .
193+ echo "SKIP_BUILD=0" >> "$GITHUB_ENV"
194+ fi
195+
196+ - uses : actions/setup-python@v5
197+ if : env.SKIP_BUILD == '0'
198+ with :
199+ python-version : ${{ matrix.python-version }}
200+
201+ - name : Build macOS Intel wheel
202+ if : env.SKIP_BUILD == '0'
203+ uses : PyO3/maturin-action@v1
204+ with :
205+ target : x86_64
206+ args : ${{ env.MATURIN_ARGS }} -i python
207+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
208+
209+ - uses : actions/upload-artifact@v4
210+ if : env.SKIP_BUILD == '0'
211+ with :
212+ name : wheels-macos-x86_64-py${{ matrix.python-version }}
213+ path : dist
214+
169215 # ------------------------------------------------------------------
170216 # Publish to PyPI via OIDC Trusted Publisher (no token required)
171217 # Runs only on version tags pushed to the main repo (not forks).
@@ -179,7 +225,7 @@ jobs:
179225 startsWith(github.ref, 'refs/tags/v') &&
180226 github.repository == 'GuillaumeLessard/qector-decoder' &&
181227 github.event_name != 'pull_request'
182- needs : [linux-x86_64, windows-x64, macos-arm]
228+ needs : [linux-x86_64, windows-x64, macos-arm, macos-intel ]
183229 environment : pypi
184230 permissions :
185231 id-token : write
0 commit comments