Restructure CI/CD into proper dev -> stage -> main gated pipeline
- ci-dev.yaml: push to dev only (remove stale PR trigger) - ci-stage.yaml: PR from dev validates, push to stage publishes to foundation-stage; add -lm/-Wl,--allow-multiple-definition flags and all 9 native --test suites - sdk-release.yaml: add PR to main trigger for validation, gate publish/release/dispatch on push (post-merge) only; add -lm flags and all 9 native --test suites to main as well
This commit is contained in:
@@ -4,9 +4,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- dev
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
build-and-test:
|
||||||
|
|||||||
+106
-10
@@ -1,4 +1,4 @@
|
|||||||
name: El SDK CI — stage
|
name: El SDK CI - stage
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -19,7 +19,7 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Enforce source branch (stage ← dev only)
|
- name: Enforce source branch (stage <- dev only)
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
SOURCE="${GITHUB_HEAD_REF}"
|
SOURCE="${GITHUB_HEAD_REF}"
|
||||||
@@ -27,7 +27,7 @@ jobs:
|
|||||||
echo "ERROR: Stage branch only accepts PRs from 'dev'. Source was: '${SOURCE}'"
|
echo "ERROR: Stage branch only accepts PRs from 'dev'. Source was: '${SOURCE}'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Source branch check passed: ${SOURCE} → stage"
|
echo "Source branch check passed: ${SOURCE} -> stage"
|
||||||
|
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -37,18 +37,21 @@ jobs:
|
|||||||
# Gen2: compile the bootstrap C source into a working elc binary
|
# Gen2: compile the bootstrap C source into a working elc binary
|
||||||
- name: Build elc from bootstrap (gen2)
|
- name: Build elc from bootstrap (gen2)
|
||||||
run: |
|
run: |
|
||||||
|
# -Wl,--allow-multiple-definition: elc-bootstrap.c and el_runtime.c both define
|
||||||
|
# is_digit/is_whitespace; bootstrap predates the text-processing primitives commit
|
||||||
gcc -O2 \
|
gcc -O2 \
|
||||||
-I el-compiler/runtime \
|
-I el-compiler/runtime \
|
||||||
dist/elc-bootstrap.c \
|
dist/elc-bootstrap.c \
|
||||||
el-compiler/runtime/el_runtime.c \
|
el-compiler/runtime/el_runtime.c \
|
||||||
-lcurl -lpthread \
|
-lcurl -lpthread -lm \
|
||||||
|
-Wl,--allow-multiple-definition \
|
||||||
-o dist/elc-gen2
|
-o dist/elc-gen2
|
||||||
chmod +x dist/elc-gen2
|
chmod +x dist/elc-gen2
|
||||||
echo "gen2 elc built"
|
echo "gen2 elc built"
|
||||||
dist/elc-gen2 --version || true
|
dist/elc-gen2 --version || true
|
||||||
|
|
||||||
# Gen3: use gen2 to compile the El compiler from its own El source (self-host)
|
# Gen3: use gen2 to compile the El compiler from its own El source (self-host)
|
||||||
- name: Self-host: compile El compiler with gen2 (gen3)
|
- name: Self-host compile El compiler with gen2 (gen3)
|
||||||
run: |
|
run: |
|
||||||
mkdir -p dist/platform
|
mkdir -p dist/platform
|
||||||
dist/elc-gen2 el-compiler/src/compiler.el > dist/elc-gen3.c
|
dist/elc-gen2 el-compiler/src/compiler.el > dist/elc-gen3.c
|
||||||
@@ -56,37 +59,130 @@ jobs:
|
|||||||
-I el-compiler/runtime \
|
-I el-compiler/runtime \
|
||||||
dist/elc-gen3.c \
|
dist/elc-gen3.c \
|
||||||
el-compiler/runtime/el_runtime.c \
|
el-compiler/runtime/el_runtime.c \
|
||||||
-lcurl -lpthread \
|
-lcurl -lpthread -lm \
|
||||||
-o dist/platform/elc
|
-o dist/platform/elc
|
||||||
chmod +x dist/platform/elc
|
chmod +x dist/platform/elc
|
||||||
echo "gen3 (self-hosted) elc built"
|
echo "gen3 (self-hosted) elc built"
|
||||||
dist/platform/elc --version || true
|
dist/platform/elc --version || true
|
||||||
|
|
||||||
- name: Run tests — text
|
- name: Run tests - text
|
||||||
run: |
|
run: |
|
||||||
ELC="$(pwd)/dist/platform/elc" \
|
ELC="$(pwd)/dist/platform/elc" \
|
||||||
EL_HOME="$(pwd)" \
|
EL_HOME="$(pwd)" \
|
||||||
bash tests/text/run.sh
|
bash tests/text/run.sh
|
||||||
|
|
||||||
- name: Run tests — calendar
|
- name: Run tests - calendar
|
||||||
run: |
|
run: |
|
||||||
ELC="$(pwd)/dist/platform/elc" \
|
ELC="$(pwd)/dist/platform/elc" \
|
||||||
EL_HOME="$(pwd)" \
|
EL_HOME="$(pwd)" \
|
||||||
bash tests/calendar/run.sh
|
bash tests/calendar/run.sh
|
||||||
|
|
||||||
- name: Run tests — time
|
- name: Run tests - time
|
||||||
run: |
|
run: |
|
||||||
ELC="$(pwd)/dist/platform/elc" \
|
ELC="$(pwd)/dist/platform/elc" \
|
||||||
EL_HOME="$(pwd)" \
|
EL_HOME="$(pwd)" \
|
||||||
bash tests/time/run.sh
|
bash tests/time/run.sh
|
||||||
|
|
||||||
- name: Run tests — html_sanitizer
|
- name: Run tests - html_sanitizer
|
||||||
run: |
|
run: |
|
||||||
ELC="$(pwd)/dist/platform/elc" \
|
ELC="$(pwd)/dist/platform/elc" \
|
||||||
EL_HOME="$(pwd)" \
|
EL_HOME="$(pwd)" \
|
||||||
bash tests/html_sanitizer/run.sh
|
bash tests/html_sanitizer/run.sh
|
||||||
|
|
||||||
|
# Native El test suites (elc --test, compile-link-run)
|
||||||
|
- name: Run tests - native (core)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ELC="$(pwd)/dist/platform/elc"
|
||||||
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
|
"$ELC" --test tests/native/test_core.el > /tmp/el_native_core.c
|
||||||
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_core.c "$RUNTIME/el_runtime.c" \
|
||||||
|
-lcurl -lpthread -lm -o /tmp/el_native_core
|
||||||
|
/tmp/el_native_core
|
||||||
|
|
||||||
|
- name: Run tests - native (text)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ELC="$(pwd)/dist/platform/elc"
|
||||||
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
|
"$ELC" --test tests/native/test_text.el > /tmp/el_native_text.c
|
||||||
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_text.c "$RUNTIME/el_runtime.c" \
|
||||||
|
-lcurl -lpthread -lm -o /tmp/el_native_text
|
||||||
|
/tmp/el_native_text
|
||||||
|
|
||||||
|
- name: Run tests - native (string)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ELC="$(pwd)/dist/platform/elc"
|
||||||
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
|
"$ELC" --test tests/native/test_string.el > /tmp/el_native_string.c
|
||||||
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_string.c "$RUNTIME/el_runtime.c" \
|
||||||
|
-lcurl -lpthread -lm -o /tmp/el_native_string
|
||||||
|
/tmp/el_native_string
|
||||||
|
|
||||||
|
- name: Run tests - native (math)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ELC="$(pwd)/dist/platform/elc"
|
||||||
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
|
"$ELC" --test tests/native/test_math.el > /tmp/el_native_math.c
|
||||||
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_math.c "$RUNTIME/el_runtime.c" \
|
||||||
|
-lcurl -lpthread -lm -o /tmp/el_native_math
|
||||||
|
/tmp/el_native_math
|
||||||
|
|
||||||
|
- name: Run tests - native (state)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ELC="$(pwd)/dist/platform/elc"
|
||||||
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
|
"$ELC" --test tests/native/test_state.el > /tmp/el_native_state.c
|
||||||
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_state.c "$RUNTIME/el_runtime.c" \
|
||||||
|
-lcurl -lpthread -lm -o /tmp/el_native_state
|
||||||
|
/tmp/el_native_state
|
||||||
|
|
||||||
|
- name: Run tests - native (time)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ELC="$(pwd)/dist/platform/elc"
|
||||||
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
|
"$ELC" --test tests/native/test_time.el > /tmp/el_native_time.c
|
||||||
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_time.c "$RUNTIME/el_runtime.c" \
|
||||||
|
-lcurl -lpthread -lm -o /tmp/el_native_time
|
||||||
|
/tmp/el_native_time
|
||||||
|
|
||||||
|
- name: Run tests - native (json)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ELC="$(pwd)/dist/platform/elc"
|
||||||
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
|
"$ELC" --test tests/native/test_json.el > /tmp/el_native_json.c
|
||||||
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_json.c "$RUNTIME/el_runtime.c" \
|
||||||
|
-lcurl -lpthread -lm -o /tmp/el_native_json
|
||||||
|
/tmp/el_native_json
|
||||||
|
|
||||||
|
- name: Run tests - native (env)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ELC="$(pwd)/dist/platform/elc"
|
||||||
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
|
"$ELC" --test tests/native/test_env.el > /tmp/el_native_env.c
|
||||||
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_env.c "$RUNTIME/el_runtime.c" \
|
||||||
|
-lcurl -lpthread -lm -o /tmp/el_native_env
|
||||||
|
/tmp/el_native_env
|
||||||
|
|
||||||
|
- name: Run tests - native (fs)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ELC="$(pwd)/dist/platform/elc"
|
||||||
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
|
"$ELC" --test tests/native/test_fs.el > /tmp/el_native_fs.c
|
||||||
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_fs.c "$RUNTIME/el_runtime.c" \
|
||||||
|
-lcurl -lpthread -lm -o /tmp/el_native_fs
|
||||||
|
/tmp/el_native_fs
|
||||||
|
|
||||||
|
# Publish only after merge (push event), not on PR validation runs
|
||||||
- name: Publish El SDK to Artifact Registry (stage)
|
- name: Publish El SDK to Artifact Registry (stage)
|
||||||
|
if: github.event_name == 'push'
|
||||||
env:
|
env:
|
||||||
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
|
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-release:
|
build-and-release:
|
||||||
@@ -16,7 +19,7 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Enforce source branch (main ← stage only)
|
- name: Enforce source branch (main <- stage only)
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
SOURCE="${GITHUB_HEAD_REF}"
|
SOURCE="${GITHUB_HEAD_REF}"
|
||||||
@@ -24,7 +27,7 @@ jobs:
|
|||||||
echo "ERROR: Main branch only accepts PRs from 'stage'. Source was: '${SOURCE}'"
|
echo "ERROR: Main branch only accepts PRs from 'stage'. Source was: '${SOURCE}'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Source branch check passed: ${SOURCE} → main"
|
echo "Source branch check passed: ${SOURCE} -> main"
|
||||||
|
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -34,18 +37,21 @@ jobs:
|
|||||||
# Gen2: compile the bootstrap C source into a working elc binary
|
# Gen2: compile the bootstrap C source into a working elc binary
|
||||||
- name: Build elc from bootstrap (gen2)
|
- name: Build elc from bootstrap (gen2)
|
||||||
run: |
|
run: |
|
||||||
|
# -Wl,--allow-multiple-definition: elc-bootstrap.c and el_runtime.c both define
|
||||||
|
# is_digit/is_whitespace; bootstrap predates the text-processing primitives commit
|
||||||
gcc -O2 \
|
gcc -O2 \
|
||||||
-I el-compiler/runtime \
|
-I el-compiler/runtime \
|
||||||
dist/elc-bootstrap.c \
|
dist/elc-bootstrap.c \
|
||||||
el-compiler/runtime/el_runtime.c \
|
el-compiler/runtime/el_runtime.c \
|
||||||
-lcurl -lpthread \
|
-lcurl -lpthread -lm \
|
||||||
|
-Wl,--allow-multiple-definition \
|
||||||
-o dist/elc-gen2
|
-o dist/elc-gen2
|
||||||
chmod +x dist/elc-gen2
|
chmod +x dist/elc-gen2
|
||||||
echo "gen2 elc built"
|
echo "gen2 elc built"
|
||||||
dist/elc-gen2 --version || true
|
dist/elc-gen2 --version || true
|
||||||
|
|
||||||
# Gen3: use gen2 to compile the El compiler from its own El source (self-host)
|
# Gen3: use gen2 to compile the El compiler from its own El source (self-host)
|
||||||
- name: Self-host: compile El compiler with gen2 (gen3)
|
- name: Self-host compile El compiler with gen2 (gen3)
|
||||||
run: |
|
run: |
|
||||||
mkdir -p dist/platform
|
mkdir -p dist/platform
|
||||||
dist/elc-gen2 el-compiler/src/compiler.el > dist/elc-gen3.c
|
dist/elc-gen2 el-compiler/src/compiler.el > dist/elc-gen3.c
|
||||||
@@ -53,7 +59,7 @@ jobs:
|
|||||||
-I el-compiler/runtime \
|
-I el-compiler/runtime \
|
||||||
dist/elc-gen3.c \
|
dist/elc-gen3.c \
|
||||||
el-compiler/runtime/el_runtime.c \
|
el-compiler/runtime/el_runtime.c \
|
||||||
-lcurl -lpthread \
|
-lcurl -lpthread -lm \
|
||||||
-o dist/platform/elc
|
-o dist/platform/elc
|
||||||
chmod +x dist/platform/elc
|
chmod +x dist/platform/elc
|
||||||
echo "gen3 (self-hosted) elc built"
|
echo "gen3 (self-hosted) elc built"
|
||||||
@@ -68,7 +74,7 @@ jobs:
|
|||||||
-I el-compiler/runtime \
|
-I el-compiler/runtime \
|
||||||
dist/elb.c \
|
dist/elb.c \
|
||||||
el-compiler/runtime/el_runtime.c \
|
el-compiler/runtime/el_runtime.c \
|
||||||
-lcurl -lpthread \
|
-lcurl -lpthread -lm \
|
||||||
-o dist/bin/elb
|
-o dist/bin/elb
|
||||||
chmod +x dist/bin/elb
|
chmod +x dist/bin/elb
|
||||||
echo "elb built"
|
echo "elb built"
|
||||||
@@ -81,7 +87,7 @@ jobs:
|
|||||||
-I el-compiler/runtime \
|
-I el-compiler/runtime \
|
||||||
dist/epm.c \
|
dist/epm.c \
|
||||||
el-compiler/runtime/el_runtime.c \
|
el-compiler/runtime/el_runtime.c \
|
||||||
-lcurl -lpthread \
|
-lcurl -lpthread -lm \
|
||||||
-o dist/bin/epm
|
-o dist/bin/epm
|
||||||
chmod +x dist/bin/epm
|
chmod +x dist/bin/epm
|
||||||
echo "epm built"
|
echo "epm built"
|
||||||
@@ -94,37 +100,129 @@ jobs:
|
|||||||
-I el-compiler/runtime \
|
-I el-compiler/runtime \
|
||||||
dist/el-install.c \
|
dist/el-install.c \
|
||||||
el-compiler/runtime/el_runtime.c \
|
el-compiler/runtime/el_runtime.c \
|
||||||
-lcurl -lpthread \
|
-lcurl -lpthread -lm \
|
||||||
-o dist/bin/el-install
|
-o dist/bin/el-install
|
||||||
chmod +x dist/bin/el-install
|
chmod +x dist/bin/el-install
|
||||||
echo "el-install built"
|
echo "el-install built"
|
||||||
|
|
||||||
- name: Run tests — text
|
- name: Run tests - text
|
||||||
run: |
|
run: |
|
||||||
ELC="$(pwd)/dist/platform/elc" \
|
ELC="$(pwd)/dist/platform/elc" \
|
||||||
EL_HOME="$(pwd)" \
|
EL_HOME="$(pwd)" \
|
||||||
bash tests/text/run.sh
|
bash tests/text/run.sh
|
||||||
|
|
||||||
- name: Run tests — calendar
|
- name: Run tests - calendar
|
||||||
run: |
|
run: |
|
||||||
ELC="$(pwd)/dist/platform/elc" \
|
ELC="$(pwd)/dist/platform/elc" \
|
||||||
EL_HOME="$(pwd)" \
|
EL_HOME="$(pwd)" \
|
||||||
bash tests/calendar/run.sh
|
bash tests/calendar/run.sh
|
||||||
|
|
||||||
- name: Run tests — time
|
- name: Run tests - time
|
||||||
run: |
|
run: |
|
||||||
ELC="$(pwd)/dist/platform/elc" \
|
ELC="$(pwd)/dist/platform/elc" \
|
||||||
EL_HOME="$(pwd)" \
|
EL_HOME="$(pwd)" \
|
||||||
bash tests/time/run.sh
|
bash tests/time/run.sh
|
||||||
|
|
||||||
- name: Run tests — html_sanitizer
|
- name: Run tests - html_sanitizer
|
||||||
run: |
|
run: |
|
||||||
ELC="$(pwd)/dist/platform/elc" \
|
ELC="$(pwd)/dist/platform/elc" \
|
||||||
EL_HOME="$(pwd)" \
|
EL_HOME="$(pwd)" \
|
||||||
bash tests/html_sanitizer/run.sh
|
bash tests/html_sanitizer/run.sh
|
||||||
|
|
||||||
# Bundle the SDK tarball — runs from the repo root to reference lang/ paths correctly
|
# Native El test suites (elc --test, compile-link-run)
|
||||||
|
- name: Run tests - native (core)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ELC="$(pwd)/dist/platform/elc"
|
||||||
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
|
"$ELC" --test tests/native/test_core.el > /tmp/el_native_core.c
|
||||||
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_core.c "$RUNTIME/el_runtime.c" \
|
||||||
|
-lcurl -lpthread -lm -o /tmp/el_native_core
|
||||||
|
/tmp/el_native_core
|
||||||
|
|
||||||
|
- name: Run tests - native (text)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ELC="$(pwd)/dist/platform/elc"
|
||||||
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
|
"$ELC" --test tests/native/test_text.el > /tmp/el_native_text.c
|
||||||
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_text.c "$RUNTIME/el_runtime.c" \
|
||||||
|
-lcurl -lpthread -lm -o /tmp/el_native_text
|
||||||
|
/tmp/el_native_text
|
||||||
|
|
||||||
|
- name: Run tests - native (string)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ELC="$(pwd)/dist/platform/elc"
|
||||||
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
|
"$ELC" --test tests/native/test_string.el > /tmp/el_native_string.c
|
||||||
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_string.c "$RUNTIME/el_runtime.c" \
|
||||||
|
-lcurl -lpthread -lm -o /tmp/el_native_string
|
||||||
|
/tmp/el_native_string
|
||||||
|
|
||||||
|
- name: Run tests - native (math)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ELC="$(pwd)/dist/platform/elc"
|
||||||
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
|
"$ELC" --test tests/native/test_math.el > /tmp/el_native_math.c
|
||||||
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_math.c "$RUNTIME/el_runtime.c" \
|
||||||
|
-lcurl -lpthread -lm -o /tmp/el_native_math
|
||||||
|
/tmp/el_native_math
|
||||||
|
|
||||||
|
- name: Run tests - native (state)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ELC="$(pwd)/dist/platform/elc"
|
||||||
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
|
"$ELC" --test tests/native/test_state.el > /tmp/el_native_state.c
|
||||||
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_state.c "$RUNTIME/el_runtime.c" \
|
||||||
|
-lcurl -lpthread -lm -o /tmp/el_native_state
|
||||||
|
/tmp/el_native_state
|
||||||
|
|
||||||
|
- name: Run tests - native (time)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ELC="$(pwd)/dist/platform/elc"
|
||||||
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
|
"$ELC" --test tests/native/test_time.el > /tmp/el_native_time.c
|
||||||
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_time.c "$RUNTIME/el_runtime.c" \
|
||||||
|
-lcurl -lpthread -lm -o /tmp/el_native_time
|
||||||
|
/tmp/el_native_time
|
||||||
|
|
||||||
|
- name: Run tests - native (json)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ELC="$(pwd)/dist/platform/elc"
|
||||||
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
|
"$ELC" --test tests/native/test_json.el > /tmp/el_native_json.c
|
||||||
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_json.c "$RUNTIME/el_runtime.c" \
|
||||||
|
-lcurl -lpthread -lm -o /tmp/el_native_json
|
||||||
|
/tmp/el_native_json
|
||||||
|
|
||||||
|
- name: Run tests - native (env)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ELC="$(pwd)/dist/platform/elc"
|
||||||
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
|
"$ELC" --test tests/native/test_env.el > /tmp/el_native_env.c
|
||||||
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_env.c "$RUNTIME/el_runtime.c" \
|
||||||
|
-lcurl -lpthread -lm -o /tmp/el_native_env
|
||||||
|
/tmp/el_native_env
|
||||||
|
|
||||||
|
- name: Run tests - native (fs)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ELC="$(pwd)/dist/platform/elc"
|
||||||
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
|
"$ELC" --test tests/native/test_fs.el > /tmp/el_native_fs.c
|
||||||
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_fs.c "$RUNTIME/el_runtime.c" \
|
||||||
|
-lcurl -lpthread -lm -o /tmp/el_native_fs
|
||||||
|
/tmp/el_native_fs
|
||||||
|
|
||||||
|
# Bundle the SDK tarball - runs from the repo root to reference lang/ paths correctly
|
||||||
- name: Bundle SDK tarball
|
- name: Bundle SDK tarball
|
||||||
|
if: github.event_name == 'push'
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p dist/sdk/bin dist/sdk/runtime
|
mkdir -p dist/sdk/bin dist/sdk/runtime
|
||||||
@@ -140,6 +238,7 @@ jobs:
|
|||||||
|
|
||||||
# Publish / update the `latest` release with all SDK assets
|
# Publish / update the `latest` release with all SDK assets
|
||||||
- name: Publish latest release
|
- name: Publish latest release
|
||||||
|
if: github.event_name == 'push'
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
@@ -198,6 +297,7 @@ jobs:
|
|||||||
echo "Release published successfully"
|
echo "Release published successfully"
|
||||||
|
|
||||||
- name: Publish El SDK to Artifact Registry (prod)
|
- name: Publish El SDK to Artifact Registry (prod)
|
||||||
|
if: github.event_name == 'push'
|
||||||
env:
|
env:
|
||||||
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
|
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
|
||||||
run: |
|
run: |
|
||||||
@@ -239,6 +339,7 @@ jobs:
|
|||||||
rm -f /tmp/gcp-key.json
|
rm -f /tmp/gcp-key.json
|
||||||
|
|
||||||
- name: Dispatch el-sdk-updated to downstream repos
|
- name: Dispatch el-sdk-updated to downstream repos
|
||||||
|
if: github.event_name == 'push'
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
GITEA_API: https://git.neuralplatform.ai/api/v1
|
GITEA_API: https://git.neuralplatform.ai/api/v1
|
||||||
|
|||||||
Reference in New Issue
Block a user