Switch CI from build-stage.sh to elb — no OOM
elb compiles each .el source independently (per-file codegen), avoiding the exponential memory growth from concatenating all sources into main-combined.el and feeding it to elc in one shot. - dev.yaml: replace build-stage.sh with elb build + per-file JS elc - Dockerfile.stage: COPY dist/neuron-landing (elb binary) directly instead of compiling from pre-generated main.c. soul-demo stays as cc compilation (small file, no risk).
This commit is contained in:
@@ -12,7 +12,7 @@ on:
|
||||
- 'dist/**'
|
||||
- 'runtime/**'
|
||||
- 'Dockerfile.stage'
|
||||
- 'build-stage.sh'
|
||||
- 'manifest.el'
|
||||
- '.gitea/workflows/dev.yaml'
|
||||
- '.gitea/workflows/stage.yaml'
|
||||
- '.gitea/workflows/deploy.yaml'
|
||||
@@ -60,8 +60,38 @@ jobs:
|
||||
# idempotent if the files already exist from a prior run.
|
||||
run: touch src/index.html src/about.html src/terms.html src/enterprise-terms.html
|
||||
|
||||
- name: Build image (local only — no push)
|
||||
run: ./build-stage.sh "${{ steps.tag.outputs.tag }}"
|
||||
- name: Build El binary (elb)
|
||||
# elb compiles each .el source independently (no combined mega-file),
|
||||
# then links via cc. Output: dist/neuron-landing (linux/amd64 binary).
|
||||
# This avoids the exponential memory growth that hits elc on the
|
||||
# concatenated main-combined.el approach.
|
||||
run: |
|
||||
set -euo pipefail
|
||||
export EL_HOME=/opt/el
|
||||
/opt/el/dist/bin/elb build
|
||||
echo "Binary: $(ls -lh dist/neuron-landing)"
|
||||
|
||||
- name: Compile JS El sources
|
||||
run: |
|
||||
set -euo pipefail
|
||||
ELC=/opt/el/dist/platform/elc
|
||||
mkdir -p dist/js
|
||||
for f in src/js/*.el; do
|
||||
[ -f "$f" ] || continue
|
||||
name=$(basename "$f" .el)
|
||||
"$ELC" --target=js --bundle --minify --obfuscate "$f" > "dist/js/${name}.js"
|
||||
echo " compiled: $f → dist/js/${name}.js"
|
||||
done
|
||||
|
||||
- name: Build Docker image (local only — no push)
|
||||
run: |
|
||||
set -euo pipefail
|
||||
TAG="${{ steps.tag.outputs.tag }}"
|
||||
docker build \
|
||||
--cache-from us-central1-docker.pkg.dev/neuron-785695/neuron-marketing/marketing:latest \
|
||||
-f Dockerfile.stage \
|
||||
-t "marketing:${TAG}" \
|
||||
.
|
||||
|
||||
- name: Local smoke test
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user