diffusion-cpp: ggml overlay port for fused RoPE + conv2d optimization (PR #9) #420
Workflow file for this run
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 (Stable Diffusion) | |
| on: | |
| pull_request_target: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - labeled | |
| branches: | |
| - main | |
| - release-* | |
| - feature-* | |
| - tmp-* | |
| paths: | |
| - "packages/diffusion-cpp/**" | |
| - ".github/workflows/*diffusion*.yml" | |
| workflow_dispatch: | |
| workflow_call: | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| packages: read | |
| id-token: write | |
| env: | |
| PKG_DIR: packages/diffusion-cpp | |
| 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 }} | |
| sanity-checks: | |
| if: needs.label-gate.outputs.authorised == 'true' && (needs.authorize.outputs.allowed == 'true') | |
| needs: | |
| - authorize | |
| - 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.authorize.outputs.allowed == 'true' }} | |
| workdir: packages/diffusion-cpp | |
| cpp-tests: | |
| if: needs.label-gate.outputs.authorised == 'true' && (needs.authorize.outputs.allowed == 'true') | |
| needs: | |
| - authorize | |
| - sanity-checks | |
| - label-gate | |
| uses: ./.github/workflows/cpp-tests-diffusion.yml | |
| secrets: inherit | |
| with: | |
| workdir: packages/diffusion-cpp | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| cpp-lint: | |
| if: needs.label-gate.outputs.authorised == 'true' && (needs.authorize.outputs.allowed == 'true') | |
| uses: ./.github/workflows/cpp-lint.yaml | |
| needs: | |
| - authorize | |
| - label-gate | |
| secrets: inherit | |
| with: | |
| sha: ${{ github.event.pull_request.base.sha }} | |
| pr_head_sha: ${{ github.event.pull_request.head.sha }} | |
| workdir: packages/diffusion-cpp | |
| ts-checks: | |
| needs: authorize | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # 6.3.0 | |
| with: | |
| node-version: 20 | |
| - name: Install dependencies | |
| working-directory: packages/diffusion-cpp | |
| run: npm install | |
| - name: Type declaration check | |
| working-directory: packages/diffusion-cpp | |
| run: npm run test:dts | |
| - name: Run lint and unit tests | |
| id: run_lint_and_unit_tests | |
| uses: ./.github/actions/run-lint-and-unit-tests | |
| with: | |
| gpr-token: ${{ secrets.GITHUB_TOKEN }} | |
| pat-token: ${{ secrets.GITHUB_TOKEN }} | |
| registry-type: gpr | |
| workdir: packages/diffusion-cpp | |
| prebuild: | |
| needs: | |
| - authorize | |
| - sanity-checks | |
| - label-gate | |
| if: needs.label-gate.outputs.authorised == 'true' && (needs.authorize.outputs.allowed == 'true') | |
| permissions: | |
| contents: write | |
| packages: write | |
| pull-requests: write | |
| id-token: write | |
| uses: ./.github/workflows/prebuilds-diffusion-cpp.yml | |
| secrets: inherit | |
| with: | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| run-integration-tests: | |
| if: needs.label-gate.outputs.authorised == 'true' && (needs.authorize.outputs.allowed == 'true') | |
| needs: | |
| - authorize | |
| - prebuild | |
| - label-gate | |
| permissions: | |
| contents: read | |
| packages: read | |
| id-token: write | |
| uses: ./.github/workflows/integration-test-diffusion-cpp.yml | |
| secrets: inherit | |
| with: | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| run-mobile-integration-tests: | |
| permissions: | |
| contents: read | |
| packages: read | |
| pull-requests: write # Allow commenting on PRs | |
| id-token: write | |
| if: needs.label-gate.outputs.authorised == 'true' && (needs.authorize.outputs.allowed == 'true') | |
| needs: | |
| - authorize | |
| - prebuild | |
| - label-gate | |
| uses: ./.github/workflows/integration-mobile-test-diffusion-cpp.yml | |
| secrets: inherit | |
| with: | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| merge-guard: | |
| needs: [authorize, run-integration-tests, run-mobile-integration-tests, sanity-checks, prebuild, cpp-tests, cpp-lint, ts-checks] | |
| if: always() | |
| uses: ./.github/workflows/public-pr.yml | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| packages: read | |
| with: | |
| sanity-checks-status: ${{ needs.sanity-checks.result == 'success' }} | |
| build-status: ${{ needs.prebuild.result == 'success'}} |