Move soul-demo build after JS compile to prevent Docker memory pressure on elc
Dev — Build & local smoke test / build-smoke (pull_request) Successful in 3m7s
Dev — Build & local smoke test / build-smoke (pull_request) Successful in 3m7s
This commit is contained in:
+22
-22
@@ -111,28 +111,6 @@ jobs:
|
|||||||
# in the build context for Dockerfile COPY to succeed.
|
# in the build context for Dockerfile COPY to succeed.
|
||||||
run: touch src/index.html src/about.html src/terms.html src/enterprise-terms.html
|
run: touch src/index.html src/about.html src/terms.html src/enterprise-terms.html
|
||||||
|
|
||||||
- name: Build soul-demo image tar
|
|
||||||
# Dockerfile.stage COPYs dist/soul-demo-image.tar so k3s can import
|
|
||||||
# soul-demo:local at runtime. We compile soul-demo from source on the
|
|
||||||
# host runner (ci-base has gcc), build a minimal OCI image, and save it.
|
|
||||||
# Runs before the main Docker build so the COPY succeeds.
|
|
||||||
if: steps.changetype.outputs.asset_only != 'true'
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
# Compile el_runtime.o and soul-demo on the host runner
|
|
||||||
cc -O2 -DHAVE_CURL -c runtime/el_runtime.c -I runtime/ -o /tmp/el_runtime.o
|
|
||||||
cc -O2 -rdynamic -DEL_SOUL_DEMO_BUILD \
|
|
||||||
-I runtime/ \
|
|
||||||
-o dist/soul-demo \
|
|
||||||
dist/soul-demo.c dist/vessel_stubs.c /tmp/el_runtime.o \
|
|
||||||
-lcurl -lpthread -ldl -lm -lssl -lcrypto
|
|
||||||
echo "soul-demo compiled: $(ls -lh dist/soul-demo)"
|
|
||||||
# Package as minimal OCI image for k3s import
|
|
||||||
docker build -f dist/Dockerfile.soul-demo -t soul-demo:local dist/
|
|
||||||
docker save soul-demo:local -o dist/soul-demo-image.tar
|
|
||||||
echo "soul-demo-image.tar: $(du -sh dist/soul-demo-image.tar | cut -f1)"
|
|
||||||
docker rmi soul-demo:local 2>/dev/null || true
|
|
||||||
|
|
||||||
# ── El SDK setup ──────────────────────────────────────────────────────
|
# ── El SDK setup ──────────────────────────────────────────────────────
|
||||||
|
|
||||||
- name: Extract El SDK from ci-base
|
- name: Extract El SDK from ci-base
|
||||||
@@ -184,6 +162,28 @@ jobs:
|
|||||||
|
|
||||||
# ── Docker build + push ───────────────────────────────────────────────
|
# ── Docker build + push ───────────────────────────────────────────────
|
||||||
|
|
||||||
|
- name: Build soul-demo image tar
|
||||||
|
# Dockerfile.stage COPYs dist/soul-demo-image.tar so k3s can import
|
||||||
|
# soul-demo:local at runtime. We compile soul-demo from source on the
|
||||||
|
# host runner (ci-base has gcc), build a minimal OCI image, and save it.
|
||||||
|
# Moved AFTER JS compilation to avoid Docker memory pressure killing elc.
|
||||||
|
if: steps.changetype.outputs.asset_only != 'true'
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
# Compile el_runtime.o and soul-demo on the host runner
|
||||||
|
cc -O2 -DHAVE_CURL -c runtime/el_runtime.c -I runtime/ -o /tmp/el_runtime.o
|
||||||
|
cc -O2 -rdynamic -DEL_SOUL_DEMO_BUILD \
|
||||||
|
-I runtime/ \
|
||||||
|
-o dist/soul-demo \
|
||||||
|
dist/soul-demo.c dist/vessel_stubs.c /tmp/el_runtime.o \
|
||||||
|
-lcurl -lpthread -ldl -lm -lssl -lcrypto
|
||||||
|
echo "soul-demo compiled: $(ls -lh dist/soul-demo)"
|
||||||
|
# Package as minimal OCI image for k3s import
|
||||||
|
docker build -f dist/Dockerfile.soul-demo -t soul-demo:local dist/
|
||||||
|
docker save soul-demo:local -o dist/soul-demo-image.tar
|
||||||
|
echo "soul-demo-image.tar: $(du -sh dist/soul-demo-image.tar | cut -f1)"
|
||||||
|
docker rmi soul-demo:local 2>/dev/null || true
|
||||||
|
|
||||||
- name: Build and tag image
|
- name: Build and tag image
|
||||||
if: steps.changetype.outputs.asset_only != 'true'
|
if: steps.changetype.outputs.asset_only != 'true'
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user