ci : move [no release] check to dedicated check_release job (#23734)
* ci : move [no release] check to dedicated check_release job Move the workflow-level \`if\` condition that skips builds when the commit message contains \`[no release]\` into a lightweight \`check_release\` job. All build jobs now depend on it via \`needs\` and check its output. This ensures the skip logic is evaluated at the job level rather than at the workflow level, which is the recommended approach for conditional jobs. Assisted-by: llama.cpp:local pi * cont : use `fast` runner
This commit is contained in:
@@ -1,11 +1,5 @@
|
|||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
# Skip this workflow on push to master if the commit message contains [no release]
|
|
||||||
if: |
|
|
||||||
github.event_name != 'push' ||
|
|
||||||
github.ref != 'refs/heads/master' ||
|
|
||||||
!contains(github.event.head_commit.message, '[no release]')
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch: # allows manual triggering
|
workflow_dispatch: # allows manual triggering
|
||||||
inputs:
|
inputs:
|
||||||
@@ -43,7 +37,30 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
check_release:
|
||||||
|
runs-on: [self-hosted, fast]
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
should_release: ${{ steps.check.outputs.should_release }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- id: check
|
||||||
|
run: |
|
||||||
|
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||||
|
echo "should_release=true" >> $GITHUB_OUTPUT
|
||||||
|
elif [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == "refs/heads/master" ]]; then
|
||||||
|
if echo "${{ github.event.head_commit.message }}" | grep -q '\[no release\]'; then
|
||||||
|
echo "should_release=false" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "should_release=true" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "should_release=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
macos-cpu:
|
macos-cpu:
|
||||||
|
needs: [check_release]
|
||||||
|
if: ${{ needs.check_release.outputs.should_release == 'true' }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
@@ -114,6 +131,8 @@ jobs:
|
|||||||
name: llama-bin-macos-${{ matrix.build }}.tar.gz
|
name: llama-bin-macos-${{ matrix.build }}.tar.gz
|
||||||
|
|
||||||
ubuntu-cpu:
|
ubuntu-cpu:
|
||||||
|
needs: [check_release]
|
||||||
|
if: ${{ needs.check_release.outputs.should_release == 'true' }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
@@ -190,6 +209,8 @@ jobs:
|
|||||||
name: llama-bin-ubuntu-${{ matrix.build }}.tar.gz
|
name: llama-bin-ubuntu-${{ matrix.build }}.tar.gz
|
||||||
|
|
||||||
ubuntu-vulkan:
|
ubuntu-vulkan:
|
||||||
|
needs: [check_release]
|
||||||
|
if: ${{ needs.check_release.outputs.should_release == 'true' }}
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -266,6 +287,8 @@ jobs:
|
|||||||
name: llama-bin-ubuntu-vulkan-${{ matrix.build }}.tar.gz
|
name: llama-bin-ubuntu-vulkan-${{ matrix.build }}.tar.gz
|
||||||
|
|
||||||
android-arm64:
|
android-arm64:
|
||||||
|
needs: [check_release]
|
||||||
|
if: ${{ needs.check_release.outputs.should_release == 'true' }}
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
@@ -343,6 +366,8 @@ jobs:
|
|||||||
name: llama-bin-android-arm64.tar.gz
|
name: llama-bin-android-arm64.tar.gz
|
||||||
|
|
||||||
ubuntu-24-openvino:
|
ubuntu-24-openvino:
|
||||||
|
needs: [check_release]
|
||||||
|
if: ${{ needs.check_release.outputs.should_release == 'true' }}
|
||||||
|
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
|
||||||
@@ -431,6 +456,8 @@ jobs:
|
|||||||
name: llama-bin-ubuntu-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.tar.gz
|
name: llama-bin-ubuntu-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.tar.gz
|
||||||
|
|
||||||
windows-cpu:
|
windows-cpu:
|
||||||
|
needs: [check_release]
|
||||||
|
if: ${{ needs.check_release.outputs.should_release == 'true' }}
|
||||||
|
|
||||||
runs-on: windows-2025
|
runs-on: windows-2025
|
||||||
|
|
||||||
@@ -491,6 +518,8 @@ jobs:
|
|||||||
name: llama-bin-win-cpu-${{ matrix.arch }}.zip
|
name: llama-bin-win-cpu-${{ matrix.arch }}.zip
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
|
needs: [check_release]
|
||||||
|
if: ${{ needs.check_release.outputs.should_release == 'true' }}
|
||||||
|
|
||||||
runs-on: windows-2025
|
runs-on: windows-2025
|
||||||
|
|
||||||
@@ -581,6 +610,8 @@ jobs:
|
|||||||
name: llama-bin-win-${{ matrix.backend }}-${{ matrix.arch }}.zip
|
name: llama-bin-win-${{ matrix.backend }}-${{ matrix.arch }}.zip
|
||||||
|
|
||||||
windows-cuda:
|
windows-cuda:
|
||||||
|
needs: [check_release]
|
||||||
|
if: ${{ needs.check_release.outputs.should_release == 'true' }}
|
||||||
|
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
|
|
||||||
@@ -869,6 +900,8 @@ jobs:
|
|||||||
# name: llama-bin-ubuntu-sycl-${{ matrix.build }}-x64.tar.gz
|
# name: llama-bin-ubuntu-sycl-${{ matrix.build }}-x64.tar.gz
|
||||||
|
|
||||||
ubuntu-22-rocm:
|
ubuntu-22-rocm:
|
||||||
|
needs: [check_release]
|
||||||
|
if: ${{ needs.check_release.outputs.should_release == 'true' }}
|
||||||
|
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
@@ -980,6 +1013,8 @@ jobs:
|
|||||||
name: llama-bin-ubuntu-rocm-${{ env.ROCM_VERSION_SHORT }}-${{ matrix.build }}.tar.gz
|
name: llama-bin-ubuntu-rocm-${{ env.ROCM_VERSION_SHORT }}-${{ matrix.build }}.tar.gz
|
||||||
|
|
||||||
windows-hip:
|
windows-hip:
|
||||||
|
needs: [check_release]
|
||||||
|
if: ${{ needs.check_release.outputs.should_release == 'true' }}
|
||||||
|
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
|
|
||||||
@@ -1094,6 +1129,8 @@ jobs:
|
|||||||
name: llama-bin-win-hip-${{ matrix.name }}-x64.zip
|
name: llama-bin-win-hip-${{ matrix.name }}-x64.zip
|
||||||
|
|
||||||
ios-xcode-build:
|
ios-xcode-build:
|
||||||
|
needs: [check_release]
|
||||||
|
if: ${{ needs.check_release.outputs.should_release == 'true' }}
|
||||||
runs-on: macos-15
|
runs-on: macos-15
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -1242,6 +1279,8 @@ jobs:
|
|||||||
# name: llama-bin-${{ matrix.chip_type }}-openEuler-${{ matrix.arch }}${{ matrix.use_acl_graph == 'on' && '-aclgraph' || '' }}.tar.gz
|
# name: llama-bin-${{ matrix.chip_type }}-openEuler-${{ matrix.arch }}${{ matrix.use_acl_graph == 'on' && '-aclgraph' || '' }}.tar.gz
|
||||||
|
|
||||||
ui-build:
|
ui-build:
|
||||||
|
needs: [check_release]
|
||||||
|
if: ${{ needs.check_release.outputs.should_release == 'true' }}
|
||||||
uses: ./.github/workflows/ui-build.yml
|
uses: ./.github/workflows/ui-build.yml
|
||||||
|
|
||||||
release:
|
release:
|
||||||
|
|||||||
Reference in New Issue
Block a user