ci: fallback El SDK download if not pre-installed in runner image

This commit is contained in:
2026-05-05 13:05:02 -05:00
parent 3509dda67c
commit d2c5370f55
+19 -1
View File
@@ -35,7 +35,25 @@ jobs:
fetch-depth: 2
- name: Set up El SDK
run: echo "EL_HOME=/opt/el" >> "$GITHUB_ENV"
env:
CHECKOUT_TOKEN: ${{ secrets.CHECKOUT_TOKEN }}
run: |
set -euo pipefail
if [ -x "/opt/el/dist/platform/elc" ]; then
echo "EL_HOME=/opt/el" >> "$GITHUB_ENV"
echo "Using pre-installed El SDK"
else
EL_HOME="${{ github.workspace }}/../foundation-el"
mkdir -p "$EL_HOME/dist/platform" "$EL_HOME/el-compiler/runtime"
BASE_URL="https://git.neuralplatform.ai/neuron-technologies/el/releases/download/v1.2.1"
curl -fL -H "Authorization: token ${CHECKOUT_TOKEN}" -o "$EL_HOME/dist/platform/elc" "$BASE_URL/elc-linux-amd64"
curl -fL -H "Authorization: token ${CHECKOUT_TOKEN}" -o "$EL_HOME/el-compiler/runtime/el_runtime.c" "$BASE_URL/el_runtime.c"
curl -fL -H "Authorization: token ${CHECKOUT_TOKEN}" -o "$EL_HOME/el-compiler/runtime/el_runtime.h" "$BASE_URL/el_runtime.h"
curl -fL -H "Authorization: token ${CHECKOUT_TOKEN}" -o "$EL_HOME/el-compiler/runtime/el_runtime.js" "$BASE_URL/el_runtime.js"
chmod +x "$EL_HOME/dist/platform/elc"
echo "EL_HOME=$EL_HOME" >> "$GITHUB_ENV"
echo "Downloaded El SDK from release"
fi
- name: Authenticate to GCP
uses: google-github-actions/auth@v2