QVAC-21100: Switch to static C/C++ windows runtimes #779
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: On PR Trigger (TTS GGML) | |
| on: | |
| pull_request_target: | |
| types: [opened, synchronize, reopened, labeled] | |
| branches: [main, release-*, feature-*, tmp-*] | |
| paths: | |
| - "packages/tts-ggml/**" | |
| - ".github/workflows/*tts-ggml*.yml" | |
| - ".github/actions/cache-models/**" | |
| workflow_dispatch: | |
| inputs: | |
| repository: | |
| description: "Repo to build (owner/name). Defaults to this repo." | |
| required: false | |
| type: string | |
| ref: | |
| description: "Git ref (branch/tag/SHA). Defaults to current ref." | |
| required: false | |
| type: string | |
| run_verify: | |
| description: "Treat this run like a 'verified' run (prebuild + integration)." | |
| required: false | |
| type: boolean | |
| default: true | |
| workflow_call: | |
| inputs: | |
| repository: | |
| required: false | |
| type: string | |
| ref: | |
| required: false | |
| type: string | |
| run_verify: | |
| required: false | |
| type: boolean | |
| default: true | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| packages: read | |
| checks: read | |
| id-token: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| label-gate: | |
| name: Authorise (label-gate) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| outputs: | |
| authorised: ${{ steps.gate.outputs.authorised }} | |
| steps: | |
| - name: Checkout (label-gate action only) | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2 | |
| with: | |
| ref: ${{ github.event.repository.default_branch }} | |
| sparse-checkout: .github/actions/label-gate | |
| sparse-checkout-cone-mode: false | |
| - name: Run label-gate | |
| id: gate | |
| uses: ./.github/actions/label-gate | |
| with: | |
| github-token: ${{ secrets.PAT_TOKEN }} | |
| authorize: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| outputs: | |
| allowed: ${{ steps.auth.outputs.allowed }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2 | |
| - name: Authorize | |
| id: auth | |
| uses: ./.github/actions/authorize-pr | |
| with: | |
| github-token: ${{ github.token }} | |
| context: | |
| needs: authorize | |
| if: needs.authorize.outputs.allowed == 'true' | |
| name: Resolve Context | |
| runs-on: ubuntu-latest | |
| outputs: | |
| repository: ${{ steps.ctx.outputs.repository }} | |
| ref: ${{ steps.ctx.outputs.ref }} | |
| base_sha: ${{ steps.ctx.outputs.base_sha }} | |
| head_sha: ${{ steps.ctx.outputs.head_sha }} | |
| run_verify: ${{ steps.ctx.outputs.run_verify }} | |
| steps: | |
| - id: ctx | |
| shell: bash | |
| env: | |
| EVENT_NAME: ${{ github.event_name }} | |
| HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }} | |
| HEAD_REF: ${{ github.event.pull_request.head.ref }} | |
| HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| INPUT_REPO: ${{ inputs.repository }} | |
| INPUT_REF: ${{ inputs.ref }} | |
| INPUT_VERIFY: ${{ inputs.run_verify }} | |
| REPO: ${{ github.repository }} | |
| REF_NAME: ${{ github.ref_name }} | |
| SHA: ${{ github.sha }} | |
| run: | | |
| set -euo pipefail | |
| if [[ "$EVENT_NAME" == "workflow_dispatch" || "$EVENT_NAME" == "workflow_call" ]]; then | |
| repo="${INPUT_REPO:-$REPO}" | |
| ref="${INPUT_REF:-$REF_NAME}" | |
| run_verify="$INPUT_VERIFY" | |
| base_sha="$SHA" | |
| head_sha="$SHA" | |
| else | |
| repo="$HEAD_REPO" | |
| ref="$HEAD_REF" | |
| run_verify="true" | |
| base_sha="$BASE_SHA" | |
| head_sha="$HEAD_SHA" | |
| fi | |
| echo "repository=$repo" >> "$GITHUB_OUTPUT" | |
| echo "ref=$ref" >> "$GITHUB_OUTPUT" | |
| echo "base_sha=$base_sha" >> "$GITHUB_OUTPUT" | |
| echo "head_sha=$head_sha" >> "$GITHUB_OUTPUT" | |
| echo "run_verify=$run_verify" >> "$GITHUB_OUTPUT" | |
| echo "Resolved:" | |
| echo " repo=$repo" | |
| echo " ref=$ref" | |
| echo " base_sha=$base_sha" | |
| echo " head_sha=$head_sha" | |
| echo " run_verify=$run_verify" | |
| sanity-checks: | |
| if: needs.label-gate.outputs.authorised == 'true' && (needs.authorize.outputs.allowed == 'true') | |
| needs: | |
| - authorize | |
| - context | |
| - label-gate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Run Sanity checks | |
| uses: ./.github/actions/sanity-checks | |
| with: | |
| secret-token: ${{ secrets.GITHUB_TOKEN }} | |
| pat-token: ${{ secrets.PAT_TOKEN }} | |
| run-integration: ${{ needs.context.outputs.run_verify == 'true' }} | |
| workdir: ${{ github.workspace }}/packages/tts-ggml | |
| cpp-lint: | |
| needs: | |
| - context | |
| - label-gate | |
| if: needs.label-gate.outputs.authorised == 'true' && (needs.context.outputs.run_verify == 'true' || github.event_name == 'workflow_dispatch') | |
| uses: ./.github/workflows/cpp-lint.yaml | |
| secrets: inherit | |
| with: | |
| sha: ${{ needs.context.outputs.base_sha }} | |
| pr_head_sha: ${{ needs.context.outputs.head_sha }} | |
| workdir: packages/tts-ggml | |
| # tts-ggml has no C++ unit tests today (CMakeLists.txt's BUILD_TESTING | |
| # block is reserved for the future qvac::ttsggml::* suite). The | |
| # cpp-test-coverage-tts-ggml.yml workflow currently exposes a stub | |
| # "no tests yet" job; re-add the gating here once the real C++ tests | |
| # land. | |
| cpp-tests-coverage: | |
| permissions: | |
| contents: read | |
| packages: read | |
| checks: write | |
| pull-requests: write | |
| id-token: write | |
| actions: read | |
| needs: | |
| - context | |
| - label-gate | |
| if: needs.label-gate.outputs.authorised == 'true' && (needs.context.outputs.run_verify == 'true' || github.event_name == 'workflow_dispatch') | |
| uses: ./.github/workflows/cpp-test-coverage-tts-ggml.yml | |
| secrets: inherit | |
| with: | |
| repository: ${{ needs.context.outputs.repository }} | |
| ref: ${{ needs.context.outputs.ref }} | |
| prebuild: | |
| permissions: | |
| contents: write | |
| packages: write | |
| pull-requests: write | |
| id-token: write | |
| needs: | |
| - context | |
| - label-gate | |
| if: needs.label-gate.outputs.authorised == 'true' && (needs.context.outputs.run_verify == 'true' || github.event_name == 'workflow_dispatch') | |
| uses: ./.github/workflows/prebuilds-tts-ggml.yml | |
| secrets: inherit | |
| with: | |
| repository: ${{ needs.context.outputs.repository }} | |
| ref: ${{ needs.context.outputs.ref }} | |
| run-integration-tests: | |
| permissions: | |
| contents: read | |
| packages: read | |
| id-token: write | |
| needs: | |
| - context | |
| - prebuild | |
| - label-gate | |
| if: needs.label-gate.outputs.authorised == 'true' && (needs.context.outputs.run_verify == 'true' || github.event_name == 'workflow_dispatch') | |
| uses: ./.github/workflows/integration-test-tts-ggml.yml | |
| secrets: inherit | |
| with: | |
| repository: ${{ needs.context.outputs.repository }} | |
| ref: ${{ needs.context.outputs.ref }} | |
| run-mobile-integration-tests: | |
| permissions: | |
| contents: read | |
| packages: read | |
| pull-requests: write | |
| id-token: write | |
| needs: | |
| - context | |
| - prebuild | |
| - label-gate | |
| if: needs.label-gate.outputs.authorised == 'true' && (needs.context.outputs.run_verify == 'true' || github.event_name == 'workflow_dispatch') | |
| uses: ./.github/workflows/integration-mobile-test-tts-ggml.yml | |
| secrets: inherit | |
| with: | |
| repository: ${{ needs.context.outputs.repository }} | |
| ref: ${{ needs.context.outputs.ref }} | |
| merge-guard: | |
| needs: [authorize, sanity-checks, cpp-lint, cpp-tests-coverage, prebuild, run-integration-tests, run-mobile-integration-tests] | |
| if: always() && !cancelled() | |
| uses: ./.github/workflows/public-pr.yml | |
| with: | |
| sanity-checks-status: ${{ needs.sanity-checks.result == 'success' && (needs.cpp-lint.result == 'success' || needs.cpp-lint.result == 'skipped') && (needs.cpp-tests-coverage.result == 'success' || needs.cpp-tests-coverage.result == 'skipped') }} | |
| build-status: ${{ needs.prebuild.result == 'success' || needs.prebuild.result == 'skipped' }} | |
| integration-tests-status: ${{ (needs.run-integration-tests.result == 'success' || needs.run-integration-tests.result == 'skipped') && (needs.run-mobile-integration-tests.result == 'success' || needs.run-mobile-integration-tests.result == 'skipped') }} |