Skip to content

Commit 5bd8910

Browse files
authored
Merge pull request #83 from usnavy13/dev
ci: remove obsolete runtime image publishing
2 parents 4dc8883 + 70fbae3 commit 5bd8910

12 files changed

Lines changed: 111 additions & 417 deletions

.github/workflows/ci.yml

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@ concurrency:
1414

1515
permissions:
1616
contents: read
17-
packages: read
1817

1918
env:
2019
PYTHON_VERSION: "3.11"
21-
REGISTRY_IMAGE: ghcr.io/usnavy13/librecodeinterpreter
22-
RUNTIME_R_IMAGE: ghcr.io/usnavy13/librecodeinterpreter/runtime-r
23-
BUILDCACHE_IMAGE: ghcr.io/usnavy13/librecodeinterpreter/buildcache
2420
LOCAL_API_IMAGE_AMD64: code-interpreter:ci-amd64
2521
LOCAL_API_IMAGE_ARM64: code-interpreter:ci-arm64
2622

@@ -173,29 +169,13 @@ jobs:
173169

174170
- uses: docker/setup-buildx-action@v3
175171

176-
- uses: docker/login-action@v3
177-
with:
178-
registry: ghcr.io
179-
username: ${{ github.actor }}
180-
password: ${{ secrets.GITHUB_TOKEN }}
181-
182-
- id: runtime
183-
name: Compute runtime base
184-
run: |
185-
runtime_hash="$(scripts/ci/compute_runtime_hash.sh)"
186-
runtime_base="$(scripts/ci/resolve_runtime_base.sh "${RUNTIME_R_IMAGE}" "${runtime_hash}")"
187-
echo "runtime_hash=${runtime_hash}" >> "${GITHUB_OUTPUT}"
188-
echo "runtime_base=${runtime_base}" >> "${GITHUB_OUTPUT}"
189-
190172
- name: Build amd64 app candidate
191173
run: |
192174
docker buildx build \
193175
--load \
194176
--target app \
195177
--tag "${LOCAL_API_IMAGE_AMD64}" \
196-
--build-arg "RUNTIME_R_BASE=${{ steps.runtime.outputs.runtime_base }}" \
197178
--cache-from "type=gha,scope=app-amd64" \
198-
--cache-from "type=registry,ref=${BUILDCACHE_IMAGE}:runtime-r-amd64" \
199179
--cache-to "type=gha,scope=app-amd64,mode=max" \
200180
.
201181
@@ -216,34 +196,19 @@ jobs:
216196

217197
- uses: docker/setup-buildx-action@v3
218198

219-
- uses: docker/login-action@v3
220-
with:
221-
registry: ghcr.io
222-
username: ${{ github.actor }}
223-
password: ${{ secrets.GITHUB_TOKEN }}
224-
225199
- name: Install test dependencies
226200
run: |
227201
python -m pip install --upgrade pip
228202
pip install -r requirements.txt
229203
pip install pytest pytest-asyncio pytest-cov pytest-mock
230204
231-
- id: runtime
232-
name: Compute runtime base
233-
run: |
234-
runtime_hash="$(scripts/ci/compute_runtime_hash.sh)"
235-
runtime_base="$(scripts/ci/resolve_runtime_base.sh "${RUNTIME_R_IMAGE}" "${runtime_hash}")"
236-
echo "runtime_base=${runtime_base}" >> "${GITHUB_OUTPUT}"
237-
238205
- name: Build local amd64 test image
239206
run: |
240207
docker buildx build \
241208
--load \
242209
--target app \
243210
--tag "${LOCAL_API_IMAGE_AMD64}" \
244-
--build-arg "RUNTIME_R_BASE=${{ steps.runtime.outputs.runtime_base }}" \
245211
--cache-from "type=gha,scope=app-amd64" \
246-
--cache-from "type=registry,ref=${BUILDCACHE_IMAGE}:runtime-r-amd64" \
247212
--cache-to "type=gha,scope=app-amd64,mode=max" \
248213
.
249214
@@ -304,34 +269,19 @@ jobs:
304269

305270
- uses: docker/setup-buildx-action@v3
306271

307-
- uses: docker/login-action@v3
308-
with:
309-
registry: ghcr.io
310-
username: ${{ github.actor }}
311-
password: ${{ secrets.GITHUB_TOKEN }}
312-
313272
- name: Install test dependencies
314273
run: |
315274
python -m pip install --upgrade pip
316275
pip install -r requirements.txt
317276
pip install pytest pytest-asyncio pytest-cov pytest-mock
318277
319-
- id: runtime
320-
name: Compute runtime base
321-
run: |
322-
runtime_hash="$(scripts/ci/compute_runtime_hash.sh)"
323-
runtime_base="$(scripts/ci/resolve_runtime_base.sh "${RUNTIME_R_IMAGE}" "${runtime_hash}")"
324-
echo "runtime_base=${runtime_base}" >> "${GITHUB_OUTPUT}"
325-
326278
- name: Build local amd64 replay image
327279
run: |
328280
docker buildx build \
329281
--load \
330282
--target app \
331283
--tag "${LOCAL_API_IMAGE_AMD64}" \
332-
--build-arg "RUNTIME_R_BASE=${{ steps.runtime.outputs.runtime_base }}" \
333284
--cache-from "type=gha,scope=app-amd64" \
334-
--cache-from "type=registry,ref=${BUILDCACHE_IMAGE}:runtime-r-amd64" \
335285
--cache-to "type=gha,scope=app-amd64,mode=max" \
336286
.
337287
@@ -393,34 +343,19 @@ jobs:
393343

394344
- uses: docker/setup-buildx-action@v3
395345

396-
- uses: docker/login-action@v3
397-
with:
398-
registry: ghcr.io
399-
username: ${{ github.actor }}
400-
password: ${{ secrets.GITHUB_TOKEN }}
401-
402346
- name: Install test dependencies
403347
run: |
404348
python -m pip install --upgrade pip
405349
pip install -r requirements.txt
406350
pip install pytest pytest-asyncio pytest-cov pytest-mock
407351
408-
- id: runtime
409-
name: Compute runtime base
410-
run: |
411-
runtime_hash="$(scripts/ci/compute_runtime_hash.sh)"
412-
runtime_base="$(scripts/ci/resolve_runtime_base.sh "${RUNTIME_R_IMAGE}" "${runtime_hash}")"
413-
echo "runtime_base=${runtime_base}" >> "${GITHUB_OUTPUT}"
414-
415352
- name: Build local arm64 test image
416353
run: |
417354
docker buildx build \
418355
--load \
419356
--target app \
420357
--tag "${LOCAL_API_IMAGE_ARM64}" \
421-
--build-arg "RUNTIME_R_BASE=${{ steps.runtime.outputs.runtime_base }}" \
422358
--cache-from "type=gha,scope=app-arm64" \
423-
--cache-from "type=registry,ref=${BUILDCACHE_IMAGE}:runtime-r-arm64" \
424359
--cache-to "type=gha,scope=app-arm64,mode=max" \
425360
.
426361

.github/workflows/nightly.yml

Lines changed: 6 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -11,105 +11,14 @@ concurrency:
1111

1212
permissions:
1313
contents: read
14-
packages: write
1514

1615
env:
1716
PYTHON_VERSION: "3.11"
18-
REGISTRY_IMAGE: ghcr.io/usnavy13/librecodeinterpreter
19-
RUNTIME_CORE_IMAGE: ghcr.io/usnavy13/librecodeinterpreter/runtime-core
20-
RUNTIME_R_IMAGE: ghcr.io/usnavy13/librecodeinterpreter/runtime-r
21-
BUILDCACHE_IMAGE: ghcr.io/usnavy13/librecodeinterpreter/buildcache
2217
LOCAL_API_IMAGE_AMD64: code-interpreter:nightly-amd64
2318
LOCAL_API_IMAGE_ARM64: code-interpreter:nightly-arm64
2419

2520
jobs:
26-
prepare:
27-
runs-on: ubuntu-latest
28-
outputs:
29-
runtime_hash: ${{ steps.runtime.outputs.runtime_hash }}
30-
steps:
31-
- uses: actions/checkout@v4
32-
33-
- id: runtime
34-
run: echo "runtime_hash=$(scripts/ci/compute_runtime_hash.sh)" >> "${GITHUB_OUTPUT}"
35-
36-
refresh-runtime:
37-
needs: [prepare]
38-
strategy:
39-
fail-fast: false
40-
matrix:
41-
include:
42-
- arch: amd64
43-
platform: linux/amd64
44-
runner: ubuntu-24.04
45-
- arch: arm64
46-
platform: linux/arm64
47-
runner: ubuntu-24.04-arm
48-
runs-on: ${{ matrix.runner }}
49-
steps:
50-
- uses: actions/checkout@v4
51-
52-
- uses: docker/setup-buildx-action@v3
53-
54-
- uses: docker/login-action@v3
55-
with:
56-
registry: ghcr.io
57-
username: ${{ github.actor }}
58-
password: ${{ secrets.GITHUB_TOKEN }}
59-
60-
- name: Build and publish runtime-core
61-
uses: docker/build-push-action@v6
62-
with:
63-
context: .
64-
target: runtime-core
65-
push: true
66-
platforms: ${{ matrix.platform }}
67-
provenance: false
68-
tags: ${{ env.RUNTIME_CORE_IMAGE }}:${{ needs.prepare.outputs.runtime_hash }}-${{ matrix.arch }}
69-
cache-from: |
70-
type=registry,ref=${{ env.BUILDCACHE_IMAGE }}:runtime-core-${{ matrix.arch }}
71-
cache-to: type=registry,ref=${{ env.BUILDCACHE_IMAGE }}:runtime-core-${{ matrix.arch }},mode=max
72-
73-
- name: Build and publish runtime-r
74-
uses: docker/build-push-action@v6
75-
with:
76-
context: .
77-
target: runtime-r
78-
push: true
79-
platforms: ${{ matrix.platform }}
80-
provenance: false
81-
tags: ${{ env.RUNTIME_R_IMAGE }}:${{ needs.prepare.outputs.runtime_hash }}-${{ matrix.arch }}
82-
cache-from: |
83-
type=registry,ref=${{ env.BUILDCACHE_IMAGE }}:runtime-core-${{ matrix.arch }}
84-
type=registry,ref=${{ env.BUILDCACHE_IMAGE }}:runtime-r-${{ matrix.arch }}
85-
cache-to: type=registry,ref=${{ env.BUILDCACHE_IMAGE }}:runtime-r-${{ matrix.arch }},mode=max
86-
87-
publish-runtime-manifests:
88-
needs: [prepare, refresh-runtime]
89-
runs-on: ubuntu-latest
90-
steps:
91-
- uses: docker/setup-buildx-action@v3
92-
93-
- uses: docker/login-action@v3
94-
with:
95-
registry: ghcr.io
96-
username: ${{ github.actor }}
97-
password: ${{ secrets.GITHUB_TOKEN }}
98-
99-
- name: Publish nightly runtime manifests
100-
run: |
101-
docker buildx imagetools create \
102-
-t "${RUNTIME_CORE_IMAGE}:${{ needs.prepare.outputs.runtime_hash }}" \
103-
"${RUNTIME_CORE_IMAGE}:${{ needs.prepare.outputs.runtime_hash }}-amd64" \
104-
"${RUNTIME_CORE_IMAGE}:${{ needs.prepare.outputs.runtime_hash }}-arm64"
105-
106-
docker buildx imagetools create \
107-
-t "${RUNTIME_R_IMAGE}:${{ needs.prepare.outputs.runtime_hash }}" \
108-
"${RUNTIME_R_IMAGE}:${{ needs.prepare.outputs.runtime_hash }}-amd64" \
109-
"${RUNTIME_R_IMAGE}:${{ needs.prepare.outputs.runtime_hash }}-arm64"
110-
11121
full-live-amd64:
112-
needs: [prepare, publish-runtime-manifests]
11322
runs-on: ubuntu-24.04
11423
timeout-minutes: 75
11524
steps:
@@ -122,12 +31,6 @@ jobs:
12231

12332
- uses: docker/setup-buildx-action@v3
12433

125-
- uses: docker/login-action@v3
126-
with:
127-
registry: ghcr.io
128-
username: ${{ github.actor }}
129-
password: ${{ secrets.GITHUB_TOKEN }}
130-
13134
- name: Install test dependencies
13235
run: |
13336
python -m pip install --upgrade pip
@@ -140,9 +43,8 @@ jobs:
14043
--load \
14144
--target app \
14245
--tag "${LOCAL_API_IMAGE_AMD64}" \
143-
--build-arg "RUNTIME_R_BASE=${RUNTIME_R_IMAGE}:${{ needs.prepare.outputs.runtime_hash }}" \
144-
--cache-from "type=registry,ref=${BUILDCACHE_IMAGE}:app-amd64" \
145-
--cache-to "type=registry,ref=${BUILDCACHE_IMAGE}:app-amd64,mode=max" \
46+
--cache-from "type=gha,scope=nightly-app-amd64" \
47+
--cache-to "type=gha,scope=nightly-app-amd64,mode=max" \
14648
.
14749
14850
- name: Start nightly stack
@@ -186,7 +88,6 @@ jobs:
18688
run: docker compose down -v
18789

18890
slow-live-amd64:
189-
needs: [prepare, publish-runtime-manifests]
19091
runs-on: ubuntu-24.04
19192
timeout-minutes: 75
19293
steps:
@@ -199,12 +100,6 @@ jobs:
199100

200101
- uses: docker/setup-buildx-action@v3
201102

202-
- uses: docker/login-action@v3
203-
with:
204-
registry: ghcr.io
205-
username: ${{ github.actor }}
206-
password: ${{ secrets.GITHUB_TOKEN }}
207-
208103
- name: Install test dependencies
209104
run: |
210105
python -m pip install --upgrade pip
@@ -217,9 +112,8 @@ jobs:
217112
--load \
218113
--target app \
219114
--tag "${LOCAL_API_IMAGE_AMD64}" \
220-
--build-arg "RUNTIME_R_BASE=${RUNTIME_R_IMAGE}:${{ needs.prepare.outputs.runtime_hash }}" \
221-
--cache-from "type=registry,ref=${BUILDCACHE_IMAGE}:app-amd64" \
222-
--cache-to "type=registry,ref=${BUILDCACHE_IMAGE}:app-amd64,mode=max" \
115+
--cache-from "type=gha,scope=nightly-app-amd64" \
116+
--cache-to "type=gha,scope=nightly-app-amd64,mode=max" \
223117
.
224118
225119
- name: Start nightly stack
@@ -263,7 +157,6 @@ jobs:
263157
run: docker compose down -v
264158

265159
arm64-smoke:
266-
needs: [prepare, publish-runtime-manifests]
267160
runs-on: ubuntu-24.04-arm
268161
timeout-minutes: 40
269162
steps:
@@ -276,12 +169,6 @@ jobs:
276169

277170
- uses: docker/setup-buildx-action@v3
278171

279-
- uses: docker/login-action@v3
280-
with:
281-
registry: ghcr.io
282-
username: ${{ github.actor }}
283-
password: ${{ secrets.GITHUB_TOKEN }}
284-
285172
- name: Install test dependencies
286173
run: |
287174
python -m pip install --upgrade pip
@@ -294,9 +181,8 @@ jobs:
294181
--load \
295182
--target app \
296183
--tag "${LOCAL_API_IMAGE_ARM64}" \
297-
--build-arg "RUNTIME_R_BASE=${RUNTIME_R_IMAGE}:${{ needs.prepare.outputs.runtime_hash }}" \
298-
--cache-from "type=registry,ref=${BUILDCACHE_IMAGE}:app-arm64" \
299-
--cache-to "type=registry,ref=${BUILDCACHE_IMAGE}:app-arm64,mode=max" \
184+
--cache-from "type=gha,scope=nightly-app-arm64" \
185+
--cache-to "type=gha,scope=nightly-app-arm64,mode=max" \
300186
.
301187
302188
- name: Start nightly arm64 stack

0 commit comments

Comments
 (0)