Skip to content

Commit 4e466b0

Browse files
committed
perf: add strategy includes
1 parent a805760 commit 4e466b0

File tree

1 file changed

+150
-99
lines changed

1 file changed

+150
-99
lines changed

.github/workflows/pi_build.yml

Lines changed: 150 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -40,112 +40,163 @@ jobs:
4040
bash cicd-deployment-scripts/pi/diff.sh \
4141
-p "${{ github.event.pull_request.number }}"
4242
43-
pi-build:
44-
name: 'Parent Images: Docker Build'
43+
pi-matrix-test:
44+
name: 'Parent Images: Matrix Test'
4545
runs-on: ubuntu-latest
4646
needs: [pi-diff]
4747
environment: dev
4848
env:
4949
PYTHON_VERSION: ${{ vars.PYTHON_VERSION }}
50-
DEV_CONTAINER_REGISTRY: ${{ vars.DEV_CONTAINER_REGISTRY }}
51-
DEV_LOGIN_USERNAME: ${{ secrets.DEV_LOGIN_USERNAME }}
52-
DEV_LOGIN_PASSWORD: ${{ secrets.DEV_LOGIN_PASSWORD }}
53-
IMAGE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.pull_request.head.ref }}
5450
strategy:
5551
matrix:
5652
parent_image_type: ${{ fromJson(needs.pi-diff.outputs.updated_parent_types) }}
53+
include:
54+
- parent_image_type: common
55+
app_repo: refinery-gateway
56+
- parent_image_type: common
57+
app_repo: refinery-neural-search
58+
- parent_image_type: common
59+
app_repo: refinery-tokenizer
60+
- parent_image_type: common
61+
app_repo: refinery-updater
62+
- parent_image_type: common
63+
app_repo: refinery-weak-supervisor
64+
- parent_image_type: common
65+
app_repo: refinery-model-provider
66+
- parent_image_type: common
67+
app_repo: cognition-gateway
68+
69+
- parent_image_type: exec-env
70+
app_repo: refinery-ac-exec-env
71+
- parent_image_type: exec-env
72+
app_repo: refinery-lf-exec-env
73+
- parent_image_type: exec-env
74+
app_repo: cognition-exec-env
75+
76+
- parent_image_type: torch-cpu
77+
app_repo: refinery-embedder
78+
- parent_image_type: torch-cpu
79+
app_repo: refinery-ml-exec-env
80+
81+
- parent_image_type: torch-cuda
82+
app_repo: refinery-embedder
83+
84+
- parent_image_type: next
85+
app_repo: admin-dashboard
86+
- parent_image_type: next
87+
app_repo: cognition-ui
88+
- parent_image_type: next
89+
app_repo: refinery-ui
5790
steps:
58-
- name: Checkout repository
59-
uses: actions/checkout@v4
60-
with:
61-
token: ${{ secrets.GH_TOKEN }}
62-
repository: '${{ github.repository_owner }}/refinery-${{ matrix.parent_image_type }}-parent-image'
63-
fetch-depth: 0
64-
submodules: 'true'
65-
66-
- name: Set up Python
67-
uses: actions/setup-python@v5
68-
with:
69-
python-version: ${{ env.PYTHON_VERSION }}
70-
71-
- name: Install Dependencies
72-
run: python -m pip install pip-tools
91+
- name: Print matrix values - ${{ matrix.parent_image_type }}
92+
run: echo ${{ matrix }}
93+
94+
# pi-build:
95+
# name: 'Parent Images: Docker Build'
96+
# runs-on: ubuntu-latest
97+
# needs: [pi-diff]
98+
# environment: dev
99+
# env:
100+
# PYTHON_VERSION: ${{ vars.PYTHON_VERSION }}
101+
# DEV_CONTAINER_REGISTRY: ${{ vars.DEV_CONTAINER_REGISTRY }}
102+
# DEV_LOGIN_USERNAME: ${{ secrets.DEV_LOGIN_USERNAME }}
103+
# DEV_LOGIN_PASSWORD: ${{ secrets.DEV_LOGIN_PASSWORD }}
104+
# IMAGE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.pull_request.head.ref }}
105+
# strategy:
106+
# matrix:
107+
# parent_image_type: ${{ fromJson(needs.pi-diff.outputs.updated_parent_types) }}
108+
# steps:
109+
# - name: Checkout repository
110+
# uses: actions/checkout@v4
111+
# with:
112+
# token: ${{ secrets.GH_TOKEN }}
113+
# repository: '${{ github.repository_owner }}/refinery-${{ matrix.parent_image_type }}-parent-image'
114+
# fetch-depth: 0
115+
# submodules: 'true'
116+
117+
# - name: Set up Python
118+
# uses: actions/setup-python@v5
119+
# with:
120+
# python-version: ${{ env.PYTHON_VERSION }}
121+
122+
# - name: Install Dependencies
123+
# run: python -m pip install pip-tools
73124

74-
- name: Compile Requirements
75-
run: |
76-
cd ${{ github.workspace }}/submodules/parent-images
77-
git checkout ${{ github.event.pull_request.head.ref }}
78-
pip-compile requirements/${{ matrix.parent_image_type }}-requirements.in
79-
80-
- name: Set up Docker Buildx
81-
uses: docker/setup-buildx-action@v3
82-
with:
83-
platforms: linux/amd64,linux/arm64
84-
85-
- name: Set up QEMU
86-
uses: docker/setup-qemu-action@v3
87-
with:
88-
platforms: arm64,arm
89-
90-
- name: Log into DEV registry
91-
uses: docker/login-action@v3
92-
with:
93-
registry: "${{ env.DEV_CONTAINER_REGISTRY }}"
94-
username: "${{ env.DEV_LOGIN_USERNAME }}"
95-
password: "${{ env.DEV_LOGIN_PASSWORD }}"
96-
97-
- name: Build & Push refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}
98-
uses: docker/build-push-action@v5
99-
with:
100-
context: .
101-
cache-from: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}-cache
102-
cache-to: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}-cache,mode=max,image-manifest=true
103-
platforms: linux/amd64
104-
file: Dockerfile
105-
tags: ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}
106-
push: true
107-
build-args: |
108-
platform=linux/amd64
109-
label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile
110-
111-
- name: Build & Push refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}-arm64
112-
uses: docker/build-push-action@v5
113-
with:
114-
context: .
115-
cache-from: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}-arm64-cache
116-
cache-to: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}-arm64-cache,mode=max,image-manifest=true
117-
platforms: linux/arm64
118-
file: Dockerfile
119-
tags: ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}-arm64
120-
push: true
121-
build-args: |
122-
platform=linux/arm64
123-
label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile
124-
125-
- name: Build & Push refinery-parent-images:sha-${{ matrix.parent_image_type }}
126-
uses: docker/build-push-action@v5
127-
with:
128-
context: .
129-
cache-from: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-cache
130-
cache-to: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-cache,mode=max,image-manifest=true
131-
platforms: linux/amd64
132-
file: Dockerfile
133-
tags: ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}
134-
push: true
135-
build-args: |
136-
platform=linux/amd64
137-
label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile
138-
139-
- name: Build & Push refinery-parent-images:sha-${{ matrix.parent_image_type }}-arm64
140-
uses: docker/build-push-action@v5
141-
with:
142-
context: .
143-
cache-from: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-arm64-cache
144-
cache-to: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-arm64-cache,mode=max,image-manifest=true
145-
platforms: linux/arm64
146-
file: Dockerfile
147-
tags: ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-arm64
148-
push: true
149-
build-args: |
150-
platform=linux/arm64
151-
label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile
125+
# - name: Compile Requirements
126+
# run: |
127+
# cd ${{ github.workspace }}/submodules/parent-images
128+
# git checkout ${{ github.event.pull_request.head.ref }}
129+
# pip-compile requirements/${{ matrix.parent_image_type }}-requirements.in
130+
131+
# - name: Set up Docker Buildx
132+
# uses: docker/setup-buildx-action@v3
133+
# with:
134+
# platforms: linux/amd64,linux/arm64
135+
136+
# - name: Set up QEMU
137+
# uses: docker/setup-qemu-action@v3
138+
# with:
139+
# platforms: arm64,arm
140+
141+
# - name: Log into DEV registry
142+
# uses: docker/login-action@v3
143+
# with:
144+
# registry: "${{ env.DEV_CONTAINER_REGISTRY }}"
145+
# username: "${{ env.DEV_LOGIN_USERNAME }}"
146+
# password: "${{ env.DEV_LOGIN_PASSWORD }}"
147+
148+
# - name: Build & Push refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}
149+
# uses: docker/build-push-action@v5
150+
# with:
151+
# context: .
152+
# cache-from: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}-cache
153+
# cache-to: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}-cache,mode=max,image-manifest=true
154+
# platforms: linux/amd64
155+
# file: Dockerfile
156+
# tags: ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}
157+
# push: true
158+
# build-args: |
159+
# platform=linux/amd64
160+
# label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile
161+
162+
# - name: Build & Push refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}-arm64
163+
# uses: docker/build-push-action@v5
164+
# with:
165+
# context: .
166+
# cache-from: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}-arm64-cache
167+
# cache-to: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}-arm64-cache,mode=max,image-manifest=true
168+
# platforms: linux/arm64
169+
# file: Dockerfile
170+
# tags: ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.event.pull_request.head.ref }}-${{ matrix.parent_image_type }}-arm64
171+
# push: true
172+
# build-args: |
173+
# platform=linux/arm64
174+
# label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile
175+
176+
# - name: Build & Push refinery-parent-images:sha-${{ matrix.parent_image_type }}
177+
# uses: docker/build-push-action@v5
178+
# with:
179+
# context: .
180+
# cache-from: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-cache
181+
# cache-to: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-cache,mode=max,image-manifest=true
182+
# platforms: linux/amd64
183+
# file: Dockerfile
184+
# tags: ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}
185+
# push: true
186+
# build-args: |
187+
# platform=linux/amd64
188+
# label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile
189+
190+
# - name: Build & Push refinery-parent-images:sha-${{ matrix.parent_image_type }}-arm64
191+
# uses: docker/build-push-action@v5
192+
# with:
193+
# context: .
194+
# cache-from: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-arm64-cache
195+
# cache-to: type=registry,ref=${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-arm64-cache,mode=max,image-manifest=true
196+
# platforms: linux/arm64
197+
# file: Dockerfile
198+
# tags: ${{ env.DEV_CONTAINER_REGISTRY }}/refinery-parent-images:${{ github.sha }}-${{ matrix.parent_image_type }}-arm64
199+
# push: true
200+
# build-args: |
201+
# platform=linux/arm64
202+
# label=dockerfile-path=https://github.com/refinery-${{ matrix.parent_image_type }}-parent-image/blob/${{ github.sha }}/Dockerfile

0 commit comments

Comments
 (0)