mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
ci: support release branches and match client branch (#3990)
- Update workflows to trigger on release-X.Y.x-maint branches - When PR targets release branch, fetch matching branch from llama-stack-client-python - Falls back to main if matching client branch doesn't exist - Updated workflows: - integration-tests.yml - integration-auth-tests.yml - integration-sql-store-tests.yml - integration-vector-io-tests.yml - unit-tests.yml - backward-compat.yml - pre-commit.yml
This commit is contained in:
parent
c2ae42b343
commit
90234d6973
9 changed files with 57 additions and 15 deletions
|
|
@ -94,7 +94,7 @@ runs:
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: logs-${{ github.run_id }}-${{ github.run_attempt || '' }}-${{ strategy.job-index }}
|
name: logs-${{ github.run_id }}-${{ github.run_attempt || '1' }}-${{ strategy.job-index || github.job }}-${{ github.action }}
|
||||||
path: |
|
path: |
|
||||||
*.log
|
*.log
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,26 @@ runs:
|
||||||
run: |
|
run: |
|
||||||
# Install llama-stack-client-python based on the client-version input
|
# Install llama-stack-client-python based on the client-version input
|
||||||
if [ "${{ inputs.client-version }}" = "latest" ]; then
|
if [ "${{ inputs.client-version }}" = "latest" ]; then
|
||||||
|
# Check if PR is targeting a release branch
|
||||||
|
TARGET_BRANCH="${{ github.base_ref }}"
|
||||||
|
|
||||||
|
if [[ "$TARGET_BRANCH" =~ ^release-[0-9]+\.[0-9]+\.x-maint$ ]]; then
|
||||||
|
echo "PR targets release branch: $TARGET_BRANCH"
|
||||||
|
echo "Checking if matching branch exists in llama-stack-client-python..."
|
||||||
|
|
||||||
|
# Check if the branch exists in the client repo
|
||||||
|
if git ls-remote --exit-code --heads https://github.com/llamastack/llama-stack-client-python.git "$TARGET_BRANCH" > /dev/null 2>&1; then
|
||||||
|
echo "Installing llama-stack-client-python from matching branch: $TARGET_BRANCH"
|
||||||
|
export LLAMA_STACK_CLIENT_DIR=git+https://github.com/llamastack/llama-stack-client-python.git@$TARGET_BRANCH
|
||||||
|
else
|
||||||
|
echo "::error::Branch $TARGET_BRANCH not found in llama-stack-client-python repository"
|
||||||
|
echo "::error::Please create the matching release branch in llama-stack-client-python before testing"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
echo "Installing latest llama-stack-client-python from main branch"
|
echo "Installing latest llama-stack-client-python from main branch"
|
||||||
export LLAMA_STACK_CLIENT_DIR=git+https://github.com/llamastack/llama-stack-client-python.git@main
|
export LLAMA_STACK_CLIENT_DIR=git+https://github.com/llamastack/llama-stack-client-python.git@main
|
||||||
|
fi
|
||||||
elif [ "${{ inputs.client-version }}" = "published" ]; then
|
elif [ "${{ inputs.client-version }}" = "published" ]; then
|
||||||
echo "Installing published llama-stack-client-python from PyPI"
|
echo "Installing published llama-stack-client-python from PyPI"
|
||||||
unset LLAMA_STACK_CLIENT_DIR
|
unset LLAMA_STACK_CLIENT_DIR
|
||||||
|
|
|
||||||
4
.github/workflows/backward-compat.yml
vendored
4
.github/workflows/backward-compat.yml
vendored
|
|
@ -4,7 +4,9 @@ run-name: Check backward compatibility for run.yaml configs
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches:
|
||||||
|
- main
|
||||||
|
- 'release-[0-9]+.[0-9]+.x-maint'
|
||||||
paths:
|
paths:
|
||||||
- 'src/llama_stack/core/datatypes.py'
|
- 'src/llama_stack/core/datatypes.py'
|
||||||
- 'src/llama_stack/providers/datatypes.py'
|
- 'src/llama_stack/providers/datatypes.py'
|
||||||
|
|
|
||||||
8
.github/workflows/integration-auth-tests.yml
vendored
8
.github/workflows/integration-auth-tests.yml
vendored
|
|
@ -4,9 +4,13 @@ run-name: Run the integration test suite with Kubernetes authentication
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches:
|
||||||
|
- main
|
||||||
|
- 'release-[0-9]+.[0-9]+.x-maint'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches:
|
||||||
|
- main
|
||||||
|
- 'release-[0-9]+.[0-9]+.x-maint'
|
||||||
paths:
|
paths:
|
||||||
- 'distributions/**'
|
- 'distributions/**'
|
||||||
- 'src/llama_stack/**'
|
- 'src/llama_stack/**'
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,13 @@ run-name: Run the integration test suite with SqlStore
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches:
|
||||||
|
- main
|
||||||
|
- 'release-[0-9]+.[0-9]+.x-maint'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches:
|
||||||
|
- main
|
||||||
|
- 'release-[0-9]+.[0-9]+.x-maint'
|
||||||
paths:
|
paths:
|
||||||
- 'src/llama_stack/providers/utils/sqlstore/**'
|
- 'src/llama_stack/providers/utils/sqlstore/**'
|
||||||
- 'tests/integration/sqlstore/**'
|
- 'tests/integration/sqlstore/**'
|
||||||
|
|
|
||||||
8
.github/workflows/integration-tests.yml
vendored
8
.github/workflows/integration-tests.yml
vendored
|
|
@ -4,9 +4,13 @@ run-name: Run the integration test suites from tests/integration in replay mode
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches:
|
||||||
|
- main
|
||||||
|
- 'release-[0-9]+.[0-9]+.x-maint'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches:
|
||||||
|
- main
|
||||||
|
- 'release-[0-9]+.[0-9]+.x-maint'
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
paths:
|
paths:
|
||||||
- 'src/llama_stack/**'
|
- 'src/llama_stack/**'
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,13 @@ run-name: Run the integration test suite with various VectorIO providers
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches:
|
||||||
|
- main
|
||||||
|
- 'release-[0-9]+.[0-9]+.x-maint'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches:
|
||||||
|
- main
|
||||||
|
- 'release-[0-9]+.[0-9]+.x-maint'
|
||||||
paths:
|
paths:
|
||||||
- 'src/llama_stack/**'
|
- 'src/llama_stack/**'
|
||||||
- '!src/llama_stack/ui/**'
|
- '!src/llama_stack/ui/**'
|
||||||
|
|
|
||||||
4
.github/workflows/pre-commit.yml
vendored
4
.github/workflows/pre-commit.yml
vendored
|
|
@ -5,7 +5,9 @@ run-name: Run pre-commit checks
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches:
|
||||||
|
- main
|
||||||
|
- 'release-[0-9]+.[0-9]+.x-maint'
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}
|
||||||
|
|
|
||||||
8
.github/workflows/unit-tests.yml
vendored
8
.github/workflows/unit-tests.yml
vendored
|
|
@ -4,9 +4,13 @@ run-name: Run the unit test suite
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches:
|
||||||
|
- main
|
||||||
|
- 'release-[0-9]+.[0-9]+.x-maint'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches:
|
||||||
|
- main
|
||||||
|
- 'release-[0-9]+.[0-9]+.x-maint'
|
||||||
paths:
|
paths:
|
||||||
- 'src/llama_stack/**'
|
- 'src/llama_stack/**'
|
||||||
- '!src/llama_stack/ui/**'
|
- '!src/llama_stack/ui/**'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue