@@ -11,105 +11,14 @@ concurrency:
1111
1212permissions :
1313 contents : read
14- packages : write
1514
1615env :
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
2520jobs :
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
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
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