ci: fix gen2/gen3 gcc flags and step name formatting
El SDK CI - dev / build-and-test (pull_request) Failing after 7s

- add -lm (el_runtime.c uses pow/sqrt/log/sin/cos/exp)
- add -Wl,--allow-multiple-definition to gen2 (is_digit/is_whitespace
  defined in both elc-bootstrap.c and el_runtime.c; bootstrap predates
  the text-processing primitives commit)
- remove colon from Self-host step name (Gitea YAML parser rejects it)
- replace em dashes in step names with hyphens
This commit is contained in:
Will Anderson
2026-05-05 03:04:54 -05:00
parent bdd7b56703
commit a6d093536a
5 changed files with 775 additions and 250 deletions
+119 -52
View File
@@ -1,31 +1,42 @@
// epm/src/epm.el El Package Manager entry point
//
// epm manages vessels: the deployable, versioned units of El code.
// Vessels are stored in Engram (the graph database) and installed locally
// under .epm/vessels/.
// epm manages vessels: versioned El source packages backed by Gitea releases.
// Each vessel corresponds to a Gitea repository under a shared org. Versions
// are Gitea release tags; source archives are attached as release assets named
// "<name>-<version>.tar.gz".
//
// Vessels are installed to ~/.el/packages/<name>/<version>/.
// The installed registry lives at ~/.el/packages/installed.json.
//
// Usage:
// epm publish # publish current project to registry
// epm install # install all dependencies from manifest.el
// epm install <vessel> # install a specific vessel
// epm list # list all vessels in the registry
// epm install <vessel> # install a specific vessel (latest)
// epm install <vessel>@<ver> # install a specific vessel at a version
// epm list # list installed vessels
// epm info <vessel> # show metadata for a vessel
// epm info <vessel> <version> # show metadata for a specific version
// epm update # update all installed vessels
// epm update <vessel> # update a specific vessel
// epm check # check for available updates (no install)
//
// Configuration (environment):
// ENGRAM_URL Engram base URL (default: http://localhost:8742)
// EPM_GITEA_API Gitea API base URL (default: https://git.neuralplatform.ai/api/v1)
// EPM_REGISTRY_ORG org hosting vessel repos (default: neuron-technologies)
// EPM_TOKEN Gitea personal access token (required for publish)
//
// Import order: manifest.el, registry.el, install.el must be compiled first.
// This file imports all three and is the build entry point.
// Import order: manifest.el, registry.el, install.el, update.el must be
// compiled first. This file imports all four and is the build entry point.
import "manifest.el"
import "registry.el"
import "install.el"
import "update.el"
// Subcommand handlers
// cmd_publish reads manifest.el from the current directory and publishes
// the vessel/package to the Engram registry.
// the vessel to the Gitea registry as a release.
fn cmd_publish() -> Void {
let src: String = fs_read("manifest.el")
if str_eq(src, "") {
@@ -51,13 +62,13 @@ fn cmd_publish() -> Void {
println("epm: publishing " + name + " " + version + " ...")
let node_id: String = registry_publish(name, version, description, entry, deps_json)
if str_eq(node_id, "") {
let release_id: String = registry_publish(name, version, description, entry, deps_json)
if str_eq(release_id, "") {
println("epm: publish failed")
exit(1)
}
println("epm: published " + name + " " + version + " (node: " + node_id + ")")
println("epm: published " + name + " " + version + " (release: " + release_id + ")")
}
// cmd_install_named installs a specific vessel by name (with optional version).
@@ -74,41 +85,73 @@ fn cmd_install_named(spec: String) -> Void {
println("epm: installing " + vname + " ...")
let mk1: Int = exec_command("mkdir -p .epm/vessels")
let ok: Bool = install_vessel(vname, vver)
if !ok {
println("epm: install failed")
exit(1)
}
// Notify about other available updates after a successful install
let outdated: Int = check_updates()
if outdated > 0 {
println("")
println(" note: " + native_int_to_str(outdated) + " vessel(s) have newer versions available — run 'epm update' to upgrade")
}
}
// cmd_list prints all vessels registered in Engram.
// cmd_list prints all locally installed vessels.
fn cmd_list() -> Void {
println("epm: fetching vessel list from registry ...")
let raw: String = registry_list()
let n: Int = json_array_len(raw)
if n == 0 {
println("epm: no vessels found in registry")
let installed: String = read_installed()
if str_eq(installed, "") {
println("epm: no vessels installed")
return
}
if str_eq(installed, "{}") {
println("epm: no vessels installed")
return
}
println("epm: " + native_int_to_str(n) + " vessel(s) in registry:")
let inner_len: Int = str_len(installed)
if inner_len < 2 {
println("epm: no vessels installed")
return
}
let body: String = str_slice(installed, 1, inner_len - 1)
let body_trimmed: String = str_trim(body)
if str_eq(body_trimmed, "") {
println("epm: no vessels installed")
return
}
println("epm: installed vessels:")
println("")
let pairs: [String] = str_split(body_trimmed, ",")
let pair_count: Int = native_list_len(pairs)
let i: Int = 0
while i < n {
// Each element is a quoted+escaped content JSON blob
let elem: String = json_array_get_string(raw, i)
let vname: String = json_get_string(elem, "name")
let vver: String = json_get_string(elem, "version")
let vdesc: String = json_get_string(elem, "description")
println(" " + vname + " " + vver + "" + vdesc)
while i < pair_count {
let pair: String = str_trim(native_list_get(pairs, i))
let colon: Int = str_index_of(pair, ":")
if colon > 0 {
let raw_key: String = str_trim(str_slice(pair, 0, colon))
let raw_val: String = str_trim(str_slice(pair, colon + 1, str_len(pair)))
let key_len: Int = str_len(raw_key)
let val_len: Int = str_len(raw_val)
let vname2: String = raw_key
let vver2: String = raw_val
if str_starts_with(raw_key, "\"") {
let vname2 = str_slice(raw_key, 1, key_len - 1)
}
if str_starts_with(raw_val, "\"") {
let vver2 = str_slice(raw_val, 1, val_len - 1)
}
println(" " + vname2 + " " + vver2)
}
let i = i + 1
}
}
// cmd_info prints detailed metadata for a specific vessel.
// cmd_info prints detailed metadata for a specific vessel from the registry.
// argv is the full args list; idx is the position of the vessel name.
fn cmd_info(argv: [String], idx: Int) -> Void {
let argc: Int = native_list_len(argv)
@@ -132,27 +175,18 @@ fn cmd_info(argv: [String], idx: Int) -> Void {
let name: String = json_get_string(content, "name")
let ver: String = json_get_string(content, "version")
let desc: String = json_get_string(content, "description")
let entry: String = json_get_string(content, "entry")
let deps_raw: String = json_get_raw(content, "deps")
let dl_url: String = json_get_string(content, "download_url")
println("name: " + name)
println("version: " + ver)
println("description: " + desc)
println("entry: " + entry)
println("download: " + dl_url)
let dep_n: Int = json_array_len(deps_raw)
if dep_n == 0 {
println("dependencies: (none)")
let local_ver: String = installed_version(name)
if !str_eq(local_ver, "") {
println("installed: " + local_ver)
} else {
println("dependencies:")
let di: Int = 0
while di < dep_n {
let dep: String = json_array_get(deps_raw, di)
let dep_name: String = json_get_string(dep, "name")
let dep_ver: String = json_get_string(dep, "version")
println(" " + dep_name + " " + dep_ver)
let di = di + 1
}
println("installed: (not installed)")
}
}
@@ -167,16 +201,21 @@ fn main() -> Void {
println("epm — El Package Manager")
println("")
println("usage:")
println(" epm publish publish current project to registry")
println(" epm install install all dependencies (from manifest.el)")
println(" epm install <vessel> install a specific vessel")
println(" epm install <vessel>@<ver> install a specific vessel at a version")
println(" epm list list all vessels in the registry")
println(" epm info <vessel> show vessel metadata")
println(" epm info <vessel> <version> show metadata for a specific version")
println(" epm publish publish current project to registry")
println(" epm install install all dependencies (from manifest.el)")
println(" epm install <vessel> install a specific vessel (latest version)")
println(" epm install <vessel>@<ver> install a specific vessel at a version")
println(" epm list list installed vessels")
println(" epm info <vessel> show vessel metadata from registry")
println(" epm info <vessel> <version> show metadata for a specific version")
println(" epm update update all installed vessels")
println(" epm update <vessel> update a specific vessel")
println(" epm check check for available updates (no install)")
println("")
println("configuration:")
println(" ENGRAM_URL Engram base URL (default: http://localhost:8742)")
println(" EPM_GITEA_API Gitea API base URL (default: https://git.neuralplatform.ai/api/v1)")
println(" EPM_REGISTRY_ORG org hosting vessel repos (default: neuron-technologies)")
println(" EPM_TOKEN Gitea personal access token (required for publish)")
exit(0)
}
@@ -193,6 +232,12 @@ fn main() -> Void {
cmd_install_named(spec)
} else {
cmd_install()
// Notify about other available updates after a successful install
let outdated: Int = check_updates()
if outdated > 0 {
println("")
println(" note: " + native_int_to_str(outdated) + " vessel(s) have newer versions available — run 'epm update' to upgrade")
}
}
return
}
@@ -207,6 +252,28 @@ fn main() -> Void {
return
}
if str_eq(sub, "update") {
if argc >= 3 {
let vessel_arg: String = native_list_get(argv, 2)
cmd_update(vessel_arg)
} else {
cmd_update("")
}
return
}
if str_eq(sub, "check") {
println("epm: checking for updates ...")
let outdated: Int = check_updates()
if outdated == 0 {
println("epm: all installed vessels are up to date")
} else {
println("")
println("epm: " + native_int_to_str(outdated) + " vessel(s) have newer versions available — run 'epm update' to upgrade")
}
return
}
println("epm: unknown subcommand '" + sub + "'")
println("run 'epm' with no arguments for usage")
exit(1)