fix(windows static): compile smoke /MD (cl CLI defaults to /MT -> LNK… #21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: litert | |
| # Thin per-backend wrapper: derive version + release flag, then hand the matrix | |
| # to the shared _build-backend.yml pipeline. | |
| # | |
| # Triggers: | |
| # - push/PR touching engines/litert/ or shared CI -> validate only (no release) | |
| # - tag litert-v<version> -> release just LiteRT (its own VERSION) | |
| # - tag v<semver> -> repo release: rebuild every backend at its VERSION | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'engines/litert/**' | |
| - 'shared/**' | |
| - '.github/workflows/litert.yml' | |
| - '.github/workflows/_build-backend.yml' | |
| tags: | |
| - 'litert-v*' | |
| - 'v[0-9]*' | |
| pull_request: | |
| paths: | |
| - 'engines/litert/**' | |
| - 'shared/**' | |
| - '.github/workflows/litert.yml' | |
| - '.github/workflows/_build-backend.yml' | |
| concurrency: | |
| group: litert-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.meta.outputs.version }} | |
| release: ${{ steps.meta.outputs.release }} | |
| matrix: ${{ steps.meta.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: derive version, release flag, matrix | |
| id: meta | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| VERSION="$(tr -d '[:space:]' < engines/litert/VERSION)" | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| REF="${GITHUB_REF}" | |
| if [[ "$REF" == refs/tags/litert-v* || "$REF" == refs/tags/v[0-9]* ]]; then | |
| echo "release=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "release=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| # Per-backend tag must match the backend VERSION (catches "forgot to bump"). | |
| if [[ "$REF" == refs/tags/litert-v* ]]; then | |
| TAGV="${REF#refs/tags/litert-v}" | |
| if [[ "$TAGV" != "$VERSION" ]]; then | |
| echo "::error::tag litert-v$TAGV does not match engines/litert/VERSION ($VERSION)" | |
| exit 1 | |
| fi | |
| fi | |
| # Repo release tag (v<semver>) must match the root VERSION. | |
| if [[ "$REF" == refs/tags/v[0-9]* ]]; then | |
| REPOV="$(tr -d '[:space:]' < VERSION)" | |
| TAGV="${REF#refs/tags/v}" | |
| if [[ "$TAGV" != "$REPOV" ]]; then | |
| echo "::error::repo tag v$TAGV does not match ./VERSION ($REPOV)" | |
| exit 1 | |
| fi | |
| fi | |
| echo "matrix=$(jq -c . engines/litert/ci-matrix.json)" >> "$GITHUB_OUTPUT" | |
| build: | |
| name: LiteRT | |
| needs: setup | |
| uses: ./.github/workflows/_build-backend.yml | |
| with: | |
| backend: litert | |
| backend_dir: engines/litert | |
| libname: tensorflowlite_c | |
| version: ${{ needs.setup.outputs.version }} | |
| release: ${{ needs.setup.outputs.release == 'true' }} | |
| matrix: ${{ needs.setup.outputs.matrix }} | |
| secrets: inherit |