@@ -10,8 +10,8 @@ permissions:
1010 contents : write
1111
1212jobs :
13- build :
14- name : Build ${{ matrix.target }}
13+ build-local :
14+ name : Build local ${{ matrix.target }}
1515 runs-on : ${{ matrix.os }}
1616 continue-on-error : ${{ matrix.allow_failure }}
1717 strategy :
6262 - name : Real backend smoke before packaging
6363 if : matrix.run_real_smoke
6464 shell : bash
65- run : python scripts/real_backend_smoke.py --binary bitloops-embeddings
65+ run : python scripts/real_backend_smoke.py --binary bitloops-local- embeddings
6666
6767 - name : Switch Linux packaging environment to CPU-only torch
6868 if : runner.os == 'Linux'
@@ -131,11 +131,6 @@ jobs:
131131 --archive-dir build/artifacts \
132132 --github-output "${GITHUB_OUTPUT}"
133133
134- - name : Report packaged archive size
135- shell : bash
136- run : |
137- ls -lh "${{ steps.package.outputs.archive_path }}"
138-
139134 - name : Verify macOS packaged signature
140135 if : runner.os == 'macOS'
141136 shell : bash
@@ -178,12 +173,85 @@ jobs:
178173 - name : Upload packaged artefact
179174 uses : actions/upload-artifact@v6
180175 with :
181- name : ${{ matrix.target }}
176+ name : local-${{ matrix.target }}
177+ path : ${{ steps.package.outputs.archive_path }}
178+
179+ build-platform :
180+ name : Build platform ${{ matrix.target }}
181+ runs-on : ${{ matrix.os }}
182+ continue-on-error : ${{ matrix.allow_failure }}
183+ strategy :
184+ fail-fast : false
185+ matrix :
186+ include :
187+ - os : ubuntu-24.04
188+ target : x86_64-unknown-linux-gnu
189+ allow_failure : false
190+ - os : ubuntu-24.04-arm
191+ target : aarch64-unknown-linux-gnu
192+ allow_failure : true
193+ - os : macos-15-intel
194+ target : x86_64-apple-darwin
195+ allow_failure : false
196+ - os : macos-14
197+ target : aarch64-apple-darwin
198+ allow_failure : false
199+ - os : windows-2022
200+ target : x86_64-pc-windows-msvc
201+ allow_failure : false
202+
203+ steps :
204+ - name : Check out repository
205+ uses : actions/checkout@v6
206+
207+ - name : Set up Python
208+ uses : actions/setup-python@v6
209+ with :
210+ python-version : " 3.11"
211+
212+ - name : Set up Rust
213+ uses : dtolnay/rust-toolchain@stable
214+
215+ - name : Add Rust target
216+ shell : bash
217+ run : rustup target add "${{ matrix.target }}"
218+
219+ - name : Build platform runtime
220+ shell : bash
221+ run : cargo build --release -p bitloops-platform-embeddings --target "${{ matrix.target }}"
222+
223+ - name : Package platform runtime
224+ id : package
225+ shell : bash
226+ run : |
227+ if [[ "${{ runner.os }}" == "Windows" ]]; then
228+ BINARY_PATH="target/${{ matrix.target }}/release/bitloops-platform-embeddings.exe"
229+ else
230+ BINARY_PATH="target/${{ matrix.target }}/release/bitloops-platform-embeddings"
231+ fi
232+
233+ python scripts/package_platform_release.py \
234+ --target "${{ matrix.target }}" \
235+ --binary-path "${BINARY_PATH}" \
236+ --archive-dir build/artifacts \
237+ --github-output "${GITHUB_OUTPUT}"
238+
239+ - name : Smoke test packaged help output
240+ shell : bash
241+ run : |
242+ "${{ steps.package.outputs.bundle_executable }}" --help
243+
244+ - name : Upload packaged artefact
245+ uses : actions/upload-artifact@v6
246+ with :
247+ name : platform-${{ matrix.target }}
182248 path : ${{ steps.package.outputs.archive_path }}
183249
184250 publish :
185251 if : startsWith(github.ref, 'refs/tags/v')
186- needs : build
252+ needs :
253+ - build-local
254+ - build-platform
187255 runs-on : ubuntu-24.04
188256 env :
189257 SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
@@ -196,7 +264,6 @@ jobs:
196264 merge-multiple : true
197265
198266 - name : Filter release assets to GitHub size limit
199- id : release_assets
200267 shell : bash
201268 run : |
202269 mkdir -p release-upload
0 commit comments