diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf414f792995..4542398b0c0b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,12 @@ on: description: 'Create new release' required: true type: boolean + pull_request: # validate the release build on PRs; the release job is skipped so nothing is published + paths: + # The build jobs clone llama.cpp source from upstream and the get-tag-name + # action is consumed via a pinned @lemonade ref, so only changes to this + # workflow itself can affect the outcome of a PR run. Scope PR runs to it. + - '.github/workflows/release.yml' concurrency: group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} @@ -125,14 +131,9 @@ jobs: strategy: fail-fast: false matrix: - include: - - sm: sm_75 - - sm: sm_80 - - sm: sm_86 - - sm: sm_89 - - sm: sm_90 - - sm: sm_100 - - sm: sm_120 + # On PRs only build one representative arch (packaging logic is identical + # across all sm_*); build the full matrix on schedule/dispatch. + sm: ${{ github.event_name == 'pull_request' && fromJSON('["sm_89"]') || fromJSON('["sm_75", "sm_80", "sm_86", "sm_89", "sm_90", "sm_100", "sm_120"]') }} steps: - name: Clone @@ -443,14 +444,9 @@ jobs: strategy: fail-fast: false matrix: - include: - - sm: sm_75 - - sm: sm_80 - - sm: sm_86 - - sm: sm_89 - - sm: sm_90 - - sm: sm_100 - - sm: sm_120 + # On PRs only build one representative arch (packaging logic is identical + # across all sm_*); build the full matrix on schedule/dispatch. + sm: ${{ github.event_name == 'pull_request' && fromJSON('["sm_89"]') || fromJSON('["sm_75", "sm_80", "sm_86", "sm_89", "sm_90", "sm_100", "sm_120"]') }} steps: - name: Clone