diff --git a/.gitea/workflows/ci-dev.yaml b/.gitea/workflows/ci-dev.yaml index 51e0b83..51aa463 100644 --- a/.gitea/workflows/ci-dev.yaml +++ b/.gitea/workflows/ci-dev.yaml @@ -174,6 +174,28 @@ jobs: -lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_fs /tmp/el_native_fs + # Build epm binary using elb (epm lives at repo root, not inside lang/) + - name: Build epm + run: | + ABS_ELB="$(pwd)/dist/bin/elb" + ABS_ELC="$(pwd)/dist/platform/elc" + ABS_RUNTIME="$(pwd)/el-compiler/runtime" + ABS_OUT="$(pwd)/dist/bin" + (cd ../epm && "$ABS_ELB" --clean --elc="$ABS_ELC" --runtime="$ABS_RUNTIME" --out="$ABS_OUT") + chmod +x dist/bin/epm + echo "epm built" + + # Build el-install binary using elb + - name: Build el-install + run: | + ABS_ELB="$(pwd)/dist/bin/elb" + ABS_ELC="$(pwd)/dist/platform/elc" + ABS_RUNTIME="$(pwd)/el-compiler/runtime" + ABS_OUT="$(pwd)/dist/bin" + (cd tools/install && "$ABS_ELB" --clean --elc="$ABS_ELC" --runtime="$ABS_RUNTIME" --out="$ABS_OUT") + chmod +x dist/bin/el-install + echo "el-install built" + # Publish only after merge (push event), not on PR validation runs - name: Publish El SDK to Artifact Registry (dev) if: github.event_name == 'push' diff --git a/.gitea/workflows/ci-stage.yaml b/.gitea/workflows/ci-stage.yaml index 5dc7a40..5f4f016 100644 --- a/.gitea/workflows/ci-stage.yaml +++ b/.gitea/workflows/ci-stage.yaml @@ -170,6 +170,42 @@ jobs: -lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_fs /tmp/el_native_fs + # Build elb (needed for epm and el-install builds below) + - name: Build elb + run: | + mkdir -p dist/bin + dist/platform/elc elb.el > dist/elb.c + gcc -O2 \ + -I el-compiler/runtime \ + dist/elb.c \ + el-compiler/runtime/el_runtime.c \ + -lcurl -lssl -lcrypto -lpthread -lm \ + -o dist/bin/elb + chmod +x dist/bin/elb + echo "elb built" + + # Build epm binary using elb (epm lives at repo root, not inside lang/) + - name: Build epm + run: | + ABS_ELB="$(pwd)/dist/bin/elb" + ABS_ELC="$(pwd)/dist/platform/elc" + ABS_RUNTIME="$(pwd)/el-compiler/runtime" + ABS_OUT="$(pwd)/dist/bin" + (cd ../epm && "$ABS_ELB" --clean --elc="$ABS_ELC" --runtime="$ABS_RUNTIME" --out="$ABS_OUT") + chmod +x dist/bin/epm + echo "epm built" + + # Build el-install binary using elb + - name: Build el-install + run: | + ABS_ELB="$(pwd)/dist/bin/elb" + ABS_ELC="$(pwd)/dist/platform/elc" + ABS_RUNTIME="$(pwd)/el-compiler/runtime" + ABS_OUT="$(pwd)/dist/bin" + (cd tools/install && "$ABS_ELB" --clean --elc="$ABS_ELC" --runtime="$ABS_RUNTIME" --out="$ABS_OUT") + chmod +x dist/bin/el-install + echo "el-install built" + # Publish only after merge (push event), not on PR validation runs - name: Publish El SDK to Artifact Registry (stage) if: github.event_name == 'push' diff --git a/.gitea/workflows/sdk-release.yaml b/.gitea/workflows/sdk-release.yaml index c326259..35f2fc6 100644 --- a/.gitea/workflows/sdk-release.yaml +++ b/.gitea/workflows/sdk-release.yaml @@ -77,7 +77,7 @@ jobs: ABS_ELC="$(pwd)/dist/platform/elc" ABS_RUNTIME="$(pwd)/el-compiler/runtime" ABS_OUT="$(pwd)/dist/bin" - (cd ../epm && "$ABS_ELB" --elc="$ABS_ELC" --runtime="$ABS_RUNTIME" --out="$ABS_OUT") + (cd ../epm && "$ABS_ELB" --clean --elc="$ABS_ELC" --runtime="$ABS_RUNTIME" --out="$ABS_OUT") chmod +x dist/bin/epm echo "epm built" @@ -88,7 +88,7 @@ jobs: ABS_ELC="$(pwd)/dist/platform/elc" ABS_RUNTIME="$(pwd)/el-compiler/runtime" ABS_OUT="$(pwd)/dist/bin" - (cd tools/install && "$ABS_ELB" --elc="$ABS_ELC" --runtime="$ABS_RUNTIME" --out="$ABS_OUT") + (cd tools/install && "$ABS_ELB" --clean --elc="$ABS_ELC" --runtime="$ABS_RUNTIME" --out="$ABS_OUT") chmod +x dist/bin/el-install echo "el-install built" diff --git a/lang/tools/install/el-install.el b/lang/tools/install/el-install.el index c0c98de..79a1eec 100644 --- a/lang/tools/install/el-install.el +++ b/lang/tools/install/el-install.el @@ -10,15 +10,6 @@ // export PATH="$HOME/.el/bin:$PATH" // export EL_HOME="$HOME/.el" -// ── Imports ─────────────────────────────────────────────────────────────────── - -import "../../runtime/string.el" -import "../../runtime/env.el" -import "../../runtime/fs.el" -import "../../runtime/exec.el" -import "../../runtime/json.el" -import "../../runtime/http.el" - // ── Constants ───────────────────────────────────────────────────────────────── fn gitea_releases_url() -> String {