diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 596f183..63c5788 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -80,8 +80,7 @@ jobs: 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" + echo "EL_HOME=$DEST/lang" >> "$GITHUB_ENV" - name: Authenticate to GCP id: auth @@ -104,15 +103,12 @@ 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) + - name: Get elc (pre-built linux/amd64 from El repo) 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" + chmod +x "$EL_HOME/dist/platform/elc-linux-amd64" + ln -sf "$EL_HOME/dist/platform/elc-linux-amd64" "$EL_HOME/dist/platform/elc" - name: Compute image tag id: tag diff --git a/.gitea/workflows/dev.yaml b/.gitea/workflows/dev.yaml index 70c9891..9bb5d96 100644 --- a/.gitea/workflows/dev.yaml +++ b/.gitea/workflows/dev.yaml @@ -34,36 +34,18 @@ jobs: with: fetch-depth: 2 - - name: Set up El SDK (build linux elc from repo C source) + - name: Set up El SDK env: CHECKOUT_TOKEN: ${{ secrets.CHECKOUT_TOKEN }} run: | set -euo pipefail - - # Install curl dev libs — needed to link elc.c. - # ci-base has gcc but not libcurl4-openssl-dev. - sudo apt-get update -qq - sudo apt-get install -y -qq libcurl4-openssl-dev libssl-dev - DEST="${{ github.workspace }}/../foundation-el" - - # Clone El repo for source files, runtime, and JS runtime - git -c "http.extraheader=Authorization: token ${CHECKOUT_TOKEN}" clone \ - --depth=1 \ - "https://git.neuralplatform.ai/neuron-technologies/el.git" \ + git clone --depth=1 \ + "https://will:${CHECKOUT_TOKEN}@git.neuralplatform.ai/neuron-technologies/el.git" \ "$DEST" - - # Compile elc.c (committed C source of the El compiler) for linux/amd64. - # The darwin arm64 binary at lang/dist/platform/elc can't run on linux. - # Note: -lcurl -lpthread must come AFTER source files on gcc/linux. - cc -std=c11 -O2 \ - -I "$DEST/lang/el-compiler/runtime" \ - -o "$DEST/lang/dist/platform/elc" \ - "$DEST/lang/dist/platform/elc.c" \ - "$DEST/lang/el-compiler/runtime/el_runtime.c" \ - -lcurl -lpthread - - chmod +x "$DEST/lang/dist/platform/elc" + # Use the pre-built linux/amd64 binary — no C compilation needed in CI. + chmod +x "$DEST/lang/dist/platform/elc-linux-amd64" + ln -sf "$DEST/lang/dist/platform/elc-linux-amd64" "$DEST/lang/dist/platform/elc" echo "EL_HOME=$DEST/lang" >> "$GITHUB_ENV" - name: Authenticate to GCP @@ -84,9 +66,6 @@ jobs: run: echo "tag=dev-${GITHUB_SHA:0:8}" >> "$GITHUB_OUTPUT" - name: Touch HTML placeholder files - # El binary regenerates these at startup via fs_write. They must exist - # in the build context for Dockerfile COPY to succeed. touch is - # 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) @@ -104,8 +83,6 @@ jobs: -e LANDING_ROOT=/srv/landing \ "$IMAGE" - # entrypoint.sh sleeps 4s for soul-demo to load before starting neuron-web. - # Poll up to 45s total. for i in $(seq 1 15); do STATUS=$(curl -sSo /dev/null -w "%{http_code}" --max-time 5 http://localhost:8080/ || echo "000") echo "Attempt $i/15: HTTP $STATUS" diff --git a/.gitea/workflows/stage.yaml b/.gitea/workflows/stage.yaml index 46246b6..4976bbd 100644 --- a/.gitea/workflows/stage.yaml +++ b/.gitea/workflows/stage.yaml @@ -78,7 +78,7 @@ jobs: git clone --depth 1 \ "https://will:${CHECKOUT_TOKEN}@git.neuralplatform.ai/neuron-technologies/el.git" \ "$DEST" - echo "EL_HOME=$DEST" >> "$GITHUB_ENV" + echo "EL_HOME=$DEST/lang" >> "$GITHUB_ENV" - name: Authenticate to GCP uses: google-github-actions/auth@v2 @@ -97,19 +97,8 @@ jobs: 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 + chmod +x "$EL_HOME/dist/platform/elc-linux-amd64" + ln -sf "$EL_HOME/dist/platform/elc-linux-amd64" "$EL_HOME/dist/platform/elc" - name: Compute image tag id: tag