Skip to content

Commit 7f722e3

Browse files
committed
Merge branch 'main' into videoqna-bug
2 parents a6f49c7 + 2204fe8 commit 7f722e3

27 files changed

Lines changed: 1135 additions & 770 deletions
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Copyright (C) 2025 Intel Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: Build Comps Base Image
5+
permissions: read-all
6+
on:
7+
workflow_call:
8+
inputs:
9+
node:
10+
required: true
11+
type: string
12+
build:
13+
default: true
14+
required: false
15+
type: boolean
16+
tag:
17+
default: "latest"
18+
required: false
19+
type: string
20+
opea_branch:
21+
default: "main"
22+
required: false
23+
type: string
24+
inject_commit:
25+
default: false
26+
required: false
27+
type: boolean
28+
29+
jobs:
30+
pre-build-image-check:
31+
runs-on: ubuntu-latest
32+
outputs:
33+
should_skip: ${{ steps.check-skip.outputs.should_skip }}
34+
steps:
35+
- name: Check if job should be skipped
36+
id: check-skip
37+
run: |
38+
should_skip=false
39+
if [[ "${{ inputs.node }}" == "gaudi3" || "${{ inputs.node }}" == "rocm" || "${{ inputs.node }}" == "arc" ]]; then
40+
should_skip=true
41+
fi
42+
echo "should_skip=$should_skip"
43+
echo "should_skip=$should_skip" >> $GITHUB_OUTPUT
44+
45+
build-images:
46+
needs: [ pre-build-image-check ]
47+
if: ${{ needs.pre-build-image-check.outputs.should_skip == 'false' && fromJSON(inputs.build) }}
48+
runs-on: "docker-build-${{ inputs.node }}"
49+
steps:
50+
- name: Clean Up Working Directory
51+
run: sudo rm -rf ${{github.workspace}}/*
52+
53+
- name: Clone Required Repo
54+
run: |
55+
git clone --depth 1 --branch ${{ inputs.opea_branch }} https://github.com/opea-project/GenAIComps.git
56+
cd GenAIComps && git rev-parse HEAD && cd ../ && ls -l
57+
58+
- name: Build Image
59+
uses: opea-project/validation/actions/image-build@main
60+
with:
61+
work_dir: ${{ github.workspace }}/GenAIComps
62+
docker_compose_path: ${{ github.workspace }}/GenAIComps/.github/workflows/docker/compose/base-compose.yaml
63+
registry: ${OPEA_IMAGE_REPO}opea
64+
inject_commit: ${{ inputs.inject_commit }}
65+
tag: ${{ inputs.tag }}

.github/workflows/_example-workflow.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ on:
5050
type: boolean
5151

5252
jobs:
53+
####################################################################################################
54+
# Image Build
55+
####################################################################################################
5356
pre-build-image-check:
5457
runs-on: ubuntu-latest
5558
outputs:
@@ -64,9 +67,6 @@ jobs:
6467
echo "should_skip=false" >> $GITHUB_OUTPUT
6568
fi
6669
67-
####################################################################################################
68-
# Image Build
69-
####################################################################################################
7070
build-images:
7171
needs: [pre-build-image-check]
7272
if: ${{ needs.pre-build-image-check.outputs.should_skip == 'false' }}
@@ -133,7 +133,7 @@ jobs:
133133
run: |
134134
set -x
135135
run_compose="false"
136-
if [[ ${{ inputs.test_compose }} ]]; then
136+
if [[ "${{ inputs.test_compose }}" == "true" ]]; then
137137
if [[ "${{ needs.pre-build-image-check.outputs.should_skip }}" == "false" && "${{ needs.build-images.result}}" == "success" || "${{ needs.pre-build-image-check.outputs.should_skip }}" == "true" ]]; then
138138
run_compose="true"
139139
fi

.github/workflows/_run-docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
105105
compose-test:
106106
needs: [get-test-case]
107-
if: ${{ needs.get-test-case.outputs.test_cases != '' }}
107+
if: ${{ needs.get-test-case.outputs.test_cases != '[""]' }}
108108
strategy:
109109
matrix:
110110
test_case: ${{ fromJSON(needs.get-test-case.outputs.test_cases) }}
@@ -165,7 +165,7 @@ jobs:
165165
export model_cache="~/.cache/huggingface/hub"
166166
fi
167167
fi
168-
if [ -f ${test_case} ]; then timeout 30m bash ${test_case}; else echo "Test script {${test_case}} not found, skip test!"; fi
168+
if [ -f "${test_case}" ]; then timeout 30m bash "${test_case}"; else echo "Test script {${test_case}} not found, skip test!"; fi
169169
170170
- name: Clean up container after test
171171
shell: bash

.github/workflows/daily_check_issue_and_pr.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@ jobs:
1616
steps:
1717
- uses: actions/stale@v9
1818
with:
19-
days-before-issue-stale: 60
20-
days-before-pr-stale: 60
19+
days-before-issue-stale: 30
20+
days-before-pr-stale: 30
2121
days-before-issue-close: 7
2222
days-before-pr-close: 7
23-
stale-issue-message: "This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days."
24-
stale-pr-message: "This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days."
23+
stale-issue-message: "This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days."
24+
stale-pr-message: "This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days."
2525
close-issue-message: "This issue was closed because it has been stalled for 7 days with no activity."
2626
close-pr-message: "This PR was closed because it has been stalled for 7 days with no activity."
2727
repo-token: ${{ secrets.ACTION_TOKEN }}
28-
start-date: "2025-01-01T00:00:00Z"
29-
debug-only: true # will remove this line when ready to merge
28+
start-date: "2025-03-01T00:00:00Z"

.github/workflows/manual-example-workflow.yml

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ on:
2020
description: "Tag to apply to images"
2121
required: true
2222
type: string
23-
# deploy_gmc:
24-
# default: false
25-
# description: 'Whether to deploy gmc'
26-
# required: true
27-
# type: boolean
2823
build:
2924
default: true
3025
description: 'Build test required images for Examples'
@@ -40,24 +35,19 @@ on:
4035
description: 'Test examples with helm charts'
4136
required: false
4237
type: boolean
43-
# test_gmc:
44-
# default: false
45-
# description: 'Test examples with gmc'
46-
# required: false
47-
# type: boolean
4838
opea_branch:
4939
default: "main"
5040
description: 'OPEA branch for image build'
5141
required: false
5242
type: string
5343
inject_commit:
5444
default: false
55-
description: "inject commit to docker images true or false"
45+
description: "inject commit to docker images"
5646
required: false
5747
type: boolean
5848
use_model_cache:
5949
default: false
60-
description: "use model cache true or false"
50+
description: "use model cache"
6151
required: false
6252
type: boolean
6353

@@ -79,23 +69,20 @@ jobs:
7969
nodes_json=$(printf '%s\n' "${nodes[@]}" | sort -u | jq -R '.' | jq -sc '.')
8070
echo "nodes=$nodes_json" >> $GITHUB_OUTPUT
8171
82-
build-deploy-gmc:
72+
build-comps-base:
8373
needs: [get-test-matrix]
84-
if: false
85-
#${{ fromJSON(inputs.deploy_gmc) }}
8674
strategy:
8775
matrix:
8876
node: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }}
89-
fail-fast: false
90-
uses: ./.github/workflows/_gmc-workflow.yml
77+
uses: ./.github/workflows/_build_comps_base_image.yml
9178
with:
9279
node: ${{ matrix.node }}
80+
build: ${{ fromJSON(inputs.build) }}
9381
tag: ${{ inputs.tag }}
9482
opea_branch: ${{ inputs.opea_branch }}
95-
secrets: inherit
9683

9784
run-examples:
98-
needs: [get-test-matrix] #[get-test-matrix, build-deploy-gmc]
85+
needs: [get-test-matrix, build-comps-base]
9986
strategy:
10087
matrix:
10188
example: ${{ fromJson(needs.get-test-matrix.outputs.examples) }}
@@ -109,7 +96,6 @@ jobs:
10996
build: ${{ fromJSON(inputs.build) }}
11097
test_compose: ${{ fromJSON(inputs.test_compose) }}
11198
test_helmchart: ${{ fromJSON(inputs.test_helmchart) }}
112-
# test_gmc: ${{ fromJSON(inputs.test_gmc) }}
11399
opea_branch: ${{ inputs.opea_branch }}
114100
inject_commit: ${{ inputs.inject_commit }}
115101
use_model_cache: ${{ inputs.use_model_cache }}

.github/workflows/manual-image-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ on:
3232
type: string
3333
inject_commit:
3434
default: false
35-
description: "inject commit to docker images true or false"
35+
description: "inject commit to docker images"
3636
required: false
37-
type: string
37+
type: boolean
3838

3939
jobs:
4040
get-test-matrix:

.github/workflows/nightly-docker-build-publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ jobs:
3232
echo "TAG=$TAG" >> $GITHUB_OUTPUT
3333
echo "PUBLISH_TAGS=$PUBLISH_TAGS" >> $GITHUB_OUTPUT
3434
35+
build-comps-base:
36+
needs: [get-build-matrix]
37+
uses: ./.github/workflows/_build_comps_base_image.yml
38+
with:
39+
node: gaudi
40+
3541
build-and-test:
3642
needs: get-build-matrix
3743
if: ${{ needs.get-build-matrix.outputs.examples_json != '' }}

.github/workflows/weekly-update-images.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
# Copyright (C) 2024 Intel Corporation
22
# SPDX-License-Identifier: Apache-2.0
33

4-
name: Weekly update base images and 3rd party images
4+
name: Weekly update 3rd party images
55

66
on:
7-
schedule:
8-
- cron: "0 0 * * 0"
97
workflow_dispatch:
108

119
permissions:

0 commit comments

Comments
 (0)