ci: use pre-built elc-linux-amd64 from El SDK v1.2.1 release
Deploy marketing to Cloud Run / deploy (push) Failing after 48s

Replaces the three-step apt install + GCS cache probe + gcc build sequence
with a single curl download of the pre-built binary. Eliminates build-time
C toolchain dependency and shaves ~2-3 minutes off every full build.
This commit is contained in:
Will Anderson
2026-05-03 02:02:29 -05:00
parent 8704f7cdfc
commit cac0b0d9dc
+6 -40
View File
@@ -95,49 +95,15 @@ jobs:
- name: Configure docker auth for Artifact Registry
run: gcloud auth configure-docker us-central1-docker.pkg.dev --quiet
- name: Install C build deps for elc
- name: Get elc (pre-built linux/amd64 from El SDK release)
if: steps.changetype.outputs.asset_only != 'true'
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends build-essential libcurl4-openssl-dev libssl-dev
- name: Restore elc binary from GCS cache
if: steps.changetype.outputs.asset_only != 'true'
id: elc-cache
run: |
set -euo pipefail
# Cache key = SHA256 of both source files that produce elc
ELC_SRC_HASH=$(cat "$EL_HOME/dist/platform/elc.c" "$EL_HOME/el-compiler/runtime/el_runtime.c" | sha256sum | cut -c1-16)
CACHE_OBJ="gs://neuron-ci-cache/elc/linux-amd64/${ELC_SRC_HASH}/elc"
echo "elc_cache_key=${ELC_SRC_HASH}" >> "$GITHUB_OUTPUT"
echo "elc_cache_obj=${CACHE_OBJ}" >> "$GITHUB_OUTPUT"
if gsutil -q stat "$CACHE_OBJ" 2>/dev/null; then
echo "Cache hit: ${CACHE_OBJ}"
gsutil cp "$CACHE_OBJ" "$EL_HOME/dist/platform/elc"
chmod +x "$EL_HOME/dist/platform/elc"
echo "cache_hit=true" >> "$GITHUB_OUTPUT"
else
echo "Cache miss for key ${ELC_SRC_HASH}"
echo "cache_hit=false" >> "$GITHUB_OUTPUT"
fi
- name: Build elc (cache miss only)
if: steps.changetype.outputs.asset_only != 'true' && steps.elc-cache.outputs.cache_hit != 'true'
run: |
set -euo pipefail
# The committed dist/platform/elc is arm64 from Will's mac. We
# rebuild from dist/platform/elc.c (the canonical C source) so
# the binary matches the runner's linux/amd64.
cd "$EL_HOME"
cc -O2 -o dist/platform/elc \
dist/platform/elc.c \
el-compiler/runtime/el_runtime.c \
-I el-compiler/runtime \
-lcurl -lpthread -ldl -lm -lssl -lcrypto
file dist/platform/elc
ls -la dist/platform/elc
# Upload to GCS cache for future runs
gsutil cp dist/platform/elc "${{ steps.elc-cache.outputs.elc_cache_obj }}" || true
curl -fL -o "$EL_HOME/dist/platform/elc" \
https://git.neuralplatform.ai/neuron-technologies/el/releases/download/v1.2.1/elc-linux-amd64
chmod +x "$EL_HOME/dist/platform/elc"
file "$EL_HOME/dist/platform/elc"
ls -la "$EL_HOME/dist/platform/elc"
- name: Compute image tag
id: tag