ci: use pre-installed El SDK from ci-base image
This commit is contained in:
@@ -62,26 +62,9 @@ jobs:
|
||||
echo "=> Full build required"
|
||||
fi
|
||||
|
||||
# foundation/el contains the elc compiler that build-stage.sh shells out
|
||||
# to. We clone el directly with git rather than a second
|
||||
# actions/checkout call — act_runner v0.6 in host mode hits a
|
||||
# `permission denied` error on .git/objects/pack/*.idx when running
|
||||
# two checkout steps in the same job. EL_HOME is pinned outside the
|
||||
# workspace so the path build-stage.sh expects (../../foundation/el)
|
||||
# resolves correctly.
|
||||
- name: Clone el (foundation/el — provides the elc compiler)
|
||||
- name: Set up El SDK
|
||||
if: steps.changetype.outputs.asset_only != 'true'
|
||||
env:
|
||||
CHECKOUT_TOKEN: ${{ secrets.CHECKOUT_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
DEST="${{ github.workspace }}/../foundation-el"
|
||||
rm -rf "$DEST"
|
||||
git clone --depth 1 \
|
||||
"https://will:${CHECKOUT_TOKEN}@git.neuralplatform.ai/neuron-technologies/el.git" \
|
||||
"$DEST"
|
||||
ls -la "$DEST" | head -5
|
||||
echo "EL_HOME=$DEST" >> "$GITHUB_ENV"
|
||||
run: echo "EL_HOME=/opt/el" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Authenticate to GCP
|
||||
id: auth
|
||||
@@ -104,16 +87,6 @@ jobs:
|
||||
- name: Configure docker auth for Artifact Registry
|
||||
run: gcloud auth configure-docker us-central1-docker.pkg.dev --quiet
|
||||
|
||||
- name: Get elc (pre-built linux/amd64 from El SDK release)
|
||||
if: steps.changetype.outputs.asset_only != 'true'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
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
|
||||
run: |
|
||||
|
||||
@@ -34,20 +34,8 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Set up El SDK from release
|
||||
env:
|
||||
CHECKOUT_TOKEN: ${{ secrets.CHECKOUT_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
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"
|
||||
- name: Set up El SDK
|
||||
run: echo "EL_HOME=/opt/el" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Authenticate to GCP
|
||||
uses: google-github-actions/auth@v2
|
||||
|
||||
@@ -67,18 +67,9 @@ jobs:
|
||||
echo "=> Full build required"
|
||||
fi
|
||||
|
||||
- name: Clone el (provides elc compiler)
|
||||
- name: Set up El SDK
|
||||
if: steps.changetype.outputs.asset_only != 'true'
|
||||
env:
|
||||
CHECKOUT_TOKEN: ${{ secrets.CHECKOUT_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
DEST="${{ github.workspace }}/../foundation-el"
|
||||
rm -rf "$DEST"
|
||||
git clone --depth 1 \
|
||||
"https://will:${CHECKOUT_TOKEN}@git.neuralplatform.ai/neuron-technologies/el.git" \
|
||||
"$DEST"
|
||||
echo "EL_HOME=$DEST" >> "$GITHUB_ENV"
|
||||
run: echo "EL_HOME=/opt/el" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Authenticate to GCP
|
||||
uses: google-github-actions/auth@v2
|
||||
@@ -93,24 +84,6 @@ jobs:
|
||||
- name: Configure docker auth for Artifact Registry
|
||||
run: gcloud auth configure-docker us-central1-docker.pkg.dev --quiet
|
||||
|
||||
- name: Get elc (pre-built linux/amd64 from El repo)
|
||||
if: steps.changetype.outputs.asset_only != 'true'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# Copy the El C-compiler binary from the cloned El repo into the expected path.
|
||||
# The JS-capable elc for client-side compilation is committed in bin/elc-linux-amd64
|
||||
# and used automatically by build-stage.sh on linux/amd64.
|
||||
ELC_SRC="$EL_HOME/dist/platform/elc-linux-amd64"
|
||||
if [ -f "$ELC_SRC" ]; then
|
||||
cp "$ELC_SRC" "$EL_HOME/dist/platform/elc"
|
||||
chmod +x "$EL_HOME/dist/platform/elc"
|
||||
else
|
||||
# Fallback: download v1.2.1 C-compiler if the repo binary is absent
|
||||
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"
|
||||
fi
|
||||
|
||||
- name: Compute image tag
|
||||
id: tag
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user