Merge pull request 'fix: add -lssl -lcrypto to all CI gcc linker commands' (#6) from fix/ci-openssl-linker into dev
El SDK CI - dev / build-and-test (push) Failing after 3m25s
El SDK CI - dev / build-and-test (push) Failing after 3m25s
This commit was merged in pull request #6.
This commit is contained in:
@@ -24,35 +24,25 @@ jobs:
|
|||||||
apt-get update -qq
|
apt-get update -qq
|
||||||
apt-get install -y gcc libcurl4-openssl-dev
|
apt-get install -y gcc libcurl4-openssl-dev
|
||||||
|
|
||||||
# Gen2: compile the bootstrap C source into a working elc binary
|
# Seed: use the committed linux-amd64 binary as the bootstrap
|
||||||
- name: Build elc from bootstrap (gen2)
|
- name: Bootstrap from committed linux binary (seed)
|
||||||
run: |
|
run: |
|
||||||
# -Wl,--allow-multiple-definition: elc-bootstrap.c and el_runtime.c both define
|
chmod +x dist/platform/elc-linux-amd64
|
||||||
# is_digit/is_whitespace; bootstrap predates the text-processing primitives commit
|
echo "seed elc (committed linux-amd64 binary)"
|
||||||
gcc -O2 \
|
dist/platform/elc-linux-amd64 --version || true
|
||||||
-I el-compiler/runtime \
|
|
||||||
dist/elc-bootstrap.c \
|
|
||||||
el-compiler/runtime/el_runtime.c \
|
|
||||||
-lcurl -lpthread -lm \
|
|
||||||
-Wl,--allow-multiple-definition \
|
|
||||||
-o dist/elc-gen2
|
|
||||||
chmod +x dist/elc-gen2
|
|
||||||
echo "gen2 elc built"
|
|
||||||
dist/elc-gen2 --version || true
|
|
||||||
|
|
||||||
# Gen3: use gen2 to compile the El compiler from its own El source (self-host)
|
# Gen2: use seed to self-host compile the El compiler
|
||||||
- name: Self-host compile El compiler with gen2 (gen3)
|
- name: Self-host compile El compiler (gen2)
|
||||||
run: |
|
run: |
|
||||||
mkdir -p dist/platform
|
dist/platform/elc-linux-amd64 elc-cli.el > dist/elc-gen2.c
|
||||||
dist/elc-gen2 el-compiler/src/compiler.el > dist/elc-gen3.c
|
|
||||||
gcc -O2 \
|
gcc -O2 \
|
||||||
-I el-compiler/runtime \
|
-I el-compiler/runtime \
|
||||||
dist/elc-gen3.c \
|
dist/elc-gen2.c \
|
||||||
el-compiler/runtime/el_runtime.c \
|
el-compiler/runtime/el_runtime.c \
|
||||||
-lcurl -lpthread -lm \
|
-lcurl -lssl -lcrypto -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 "gen2 (self-hosted) elc built"
|
||||||
dist/platform/elc --version || true
|
dist/platform/elc --version || true
|
||||||
|
|
||||||
- name: Run tests - text
|
- name: Run tests - text
|
||||||
@@ -87,7 +77,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_core.el > /tmp/el_native_core.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_core.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_core
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_core
|
||||||
/tmp/el_native_core
|
/tmp/el_native_core
|
||||||
|
|
||||||
- name: Run tests - native (text)
|
- name: Run tests - native (text)
|
||||||
@@ -97,7 +87,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_text.el > /tmp/el_native_text.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_text.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_text
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_text
|
||||||
/tmp/el_native_text
|
/tmp/el_native_text
|
||||||
|
|
||||||
- name: Run tests - native (string)
|
- name: Run tests - native (string)
|
||||||
@@ -107,7 +97,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_string.el > /tmp/el_native_string.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_string.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_string
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_string
|
||||||
/tmp/el_native_string
|
/tmp/el_native_string
|
||||||
|
|
||||||
- name: Run tests - native (math)
|
- name: Run tests - native (math)
|
||||||
@@ -117,7 +107,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_math.el > /tmp/el_native_math.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_math.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_math
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_math
|
||||||
/tmp/el_native_math
|
/tmp/el_native_math
|
||||||
|
|
||||||
- name: Run tests - native (state)
|
- name: Run tests - native (state)
|
||||||
@@ -127,7 +117,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_state.el > /tmp/el_native_state.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_state.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_state
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_state
|
||||||
/tmp/el_native_state
|
/tmp/el_native_state
|
||||||
|
|
||||||
- name: Run tests - native (time)
|
- name: Run tests - native (time)
|
||||||
@@ -137,7 +127,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_time.el > /tmp/el_native_time.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_time.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_time
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_time
|
||||||
/tmp/el_native_time
|
/tmp/el_native_time
|
||||||
|
|
||||||
- name: Run tests - native (json)
|
- name: Run tests - native (json)
|
||||||
@@ -147,7 +137,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_json.el > /tmp/el_native_json.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_json.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_json
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_json
|
||||||
/tmp/el_native_json
|
/tmp/el_native_json
|
||||||
|
|
||||||
- name: Run tests - native (env)
|
- name: Run tests - native (env)
|
||||||
@@ -157,7 +147,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_env.el > /tmp/el_native_env.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_env.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_env
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_env
|
||||||
/tmp/el_native_env
|
/tmp/el_native_env
|
||||||
|
|
||||||
- name: Run tests - native (fs)
|
- name: Run tests - native (fs)
|
||||||
@@ -167,7 +157,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_fs.el > /tmp/el_native_fs.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_fs.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_fs
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_fs
|
||||||
/tmp/el_native_fs
|
/tmp/el_native_fs
|
||||||
|
|
||||||
# Publish only after merge (push event), not on PR validation runs
|
# Publish only after merge (push event), not on PR validation runs
|
||||||
|
|||||||
@@ -34,35 +34,25 @@ jobs:
|
|||||||
apt-get update -qq
|
apt-get update -qq
|
||||||
apt-get install -y gcc libcurl4-openssl-dev
|
apt-get install -y gcc libcurl4-openssl-dev
|
||||||
|
|
||||||
# Gen2: compile the bootstrap C source into a working elc binary
|
# Seed: use the committed linux-amd64 binary as the bootstrap
|
||||||
- name: Build elc from bootstrap (gen2)
|
- name: Bootstrap from committed linux binary (seed)
|
||||||
run: |
|
run: |
|
||||||
# -Wl,--allow-multiple-definition: elc-bootstrap.c and el_runtime.c both define
|
chmod +x dist/platform/elc-linux-amd64
|
||||||
# is_digit/is_whitespace; bootstrap predates the text-processing primitives commit
|
echo "seed elc (committed linux-amd64 binary)"
|
||||||
gcc -O2 \
|
dist/platform/elc-linux-amd64 --version || true
|
||||||
-I el-compiler/runtime \
|
|
||||||
dist/elc-bootstrap.c \
|
|
||||||
el-compiler/runtime/el_runtime.c \
|
|
||||||
-lcurl -lpthread -lm \
|
|
||||||
-Wl,--allow-multiple-definition \
|
|
||||||
-o dist/elc-gen2
|
|
||||||
chmod +x dist/elc-gen2
|
|
||||||
echo "gen2 elc built"
|
|
||||||
dist/elc-gen2 --version || true
|
|
||||||
|
|
||||||
# Gen3: use gen2 to compile the El compiler from its own El source (self-host)
|
# Gen2: use seed to self-host compile the El compiler
|
||||||
- name: Self-host compile El compiler with gen2 (gen3)
|
- name: Self-host compile El compiler (gen2)
|
||||||
run: |
|
run: |
|
||||||
mkdir -p dist/platform
|
dist/platform/elc-linux-amd64 elc-cli.el > dist/elc-gen2.c
|
||||||
dist/elc-gen2 el-compiler/src/compiler.el > dist/elc-gen3.c
|
|
||||||
gcc -O2 \
|
gcc -O2 \
|
||||||
-I el-compiler/runtime \
|
-I el-compiler/runtime \
|
||||||
dist/elc-gen3.c \
|
dist/elc-gen2.c \
|
||||||
el-compiler/runtime/el_runtime.c \
|
el-compiler/runtime/el_runtime.c \
|
||||||
-lcurl -lpthread -lm \
|
-lcurl -lssl -lcrypto -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 "gen2 (self-hosted) elc built"
|
||||||
dist/platform/elc --version || true
|
dist/platform/elc --version || true
|
||||||
|
|
||||||
- name: Run tests - text
|
- name: Run tests - text
|
||||||
@@ -97,7 +87,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_core.el > /tmp/el_native_core.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_core.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_core
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_core
|
||||||
/tmp/el_native_core
|
/tmp/el_native_core
|
||||||
|
|
||||||
- name: Run tests - native (text)
|
- name: Run tests - native (text)
|
||||||
@@ -107,7 +97,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_text.el > /tmp/el_native_text.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_text.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_text
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_text
|
||||||
/tmp/el_native_text
|
/tmp/el_native_text
|
||||||
|
|
||||||
- name: Run tests - native (string)
|
- name: Run tests - native (string)
|
||||||
@@ -117,7 +107,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_string.el > /tmp/el_native_string.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_string.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_string
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_string
|
||||||
/tmp/el_native_string
|
/tmp/el_native_string
|
||||||
|
|
||||||
- name: Run tests - native (math)
|
- name: Run tests - native (math)
|
||||||
@@ -127,7 +117,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_math.el > /tmp/el_native_math.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_math.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_math
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_math
|
||||||
/tmp/el_native_math
|
/tmp/el_native_math
|
||||||
|
|
||||||
- name: Run tests - native (state)
|
- name: Run tests - native (state)
|
||||||
@@ -137,7 +127,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_state.el > /tmp/el_native_state.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_state.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_state
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_state
|
||||||
/tmp/el_native_state
|
/tmp/el_native_state
|
||||||
|
|
||||||
- name: Run tests - native (time)
|
- name: Run tests - native (time)
|
||||||
@@ -147,7 +137,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_time.el > /tmp/el_native_time.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_time.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_time
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_time
|
||||||
/tmp/el_native_time
|
/tmp/el_native_time
|
||||||
|
|
||||||
- name: Run tests - native (json)
|
- name: Run tests - native (json)
|
||||||
@@ -157,7 +147,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_json.el > /tmp/el_native_json.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_json.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_json
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_json
|
||||||
/tmp/el_native_json
|
/tmp/el_native_json
|
||||||
|
|
||||||
- name: Run tests - native (env)
|
- name: Run tests - native (env)
|
||||||
@@ -167,7 +157,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_env.el > /tmp/el_native_env.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_env.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_env
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_env
|
||||||
/tmp/el_native_env
|
/tmp/el_native_env
|
||||||
|
|
||||||
- name: Run tests - native (fs)
|
- name: Run tests - native (fs)
|
||||||
@@ -177,7 +167,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_fs.el > /tmp/el_native_fs.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_fs.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_fs
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_fs
|
||||||
/tmp/el_native_fs
|
/tmp/el_native_fs
|
||||||
|
|
||||||
# Publish only after merge (push event), not on PR validation runs
|
# Publish only after merge (push event), not on PR validation runs
|
||||||
|
|||||||
@@ -34,35 +34,26 @@ jobs:
|
|||||||
apt-get update -qq
|
apt-get update -qq
|
||||||
apt-get install -y gcc libcurl4-openssl-dev
|
apt-get install -y gcc libcurl4-openssl-dev
|
||||||
|
|
||||||
# Gen2: compile the bootstrap C source into a working elc binary
|
# Seed: use the committed linux-amd64 binary as the bootstrap
|
||||||
- name: Build elc from bootstrap (gen2)
|
- name: Bootstrap from committed linux binary (seed)
|
||||||
run: |
|
run: |
|
||||||
# -Wl,--allow-multiple-definition: elc-bootstrap.c and el_runtime.c both define
|
chmod +x dist/platform/elc-linux-amd64
|
||||||
# is_digit/is_whitespace; bootstrap predates the text-processing primitives commit
|
echo "seed elc (committed linux-amd64 binary)"
|
||||||
gcc -O2 \
|
dist/platform/elc-linux-amd64 --version || true
|
||||||
-I el-compiler/runtime \
|
|
||||||
dist/elc-bootstrap.c \
|
|
||||||
el-compiler/runtime/el_runtime.c \
|
|
||||||
-lcurl -lpthread -lm \
|
|
||||||
-Wl,--allow-multiple-definition \
|
|
||||||
-o dist/elc-gen2
|
|
||||||
chmod +x dist/elc-gen2
|
|
||||||
echo "gen2 elc built"
|
|
||||||
dist/elc-gen2 --version || true
|
|
||||||
|
|
||||||
# Gen3: use gen2 to compile the El compiler from its own El source (self-host)
|
# Gen2: use seed to self-host compile the El compiler
|
||||||
- name: Self-host compile El compiler with gen2 (gen3)
|
- name: Self-host compile El compiler (gen2)
|
||||||
run: |
|
run: |
|
||||||
mkdir -p dist/platform
|
mkdir -p dist/platform
|
||||||
dist/elc-gen2 el-compiler/src/compiler.el > dist/elc-gen3.c
|
dist/platform/elc-linux-amd64 elc-cli.el > dist/elc-gen2.c
|
||||||
gcc -O2 \
|
gcc -O2 \
|
||||||
-I el-compiler/runtime \
|
-I el-compiler/runtime \
|
||||||
dist/elc-gen3.c \
|
dist/elc-gen2.c \
|
||||||
el-compiler/runtime/el_runtime.c \
|
el-compiler/runtime/el_runtime.c \
|
||||||
-lcurl -lpthread -lm \
|
-lcurl -lssl -lcrypto -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 "gen2 (self-hosted) elc built"
|
||||||
dist/platform/elc --version || true
|
dist/platform/elc --version || true
|
||||||
|
|
||||||
# Build elb binary
|
# Build elb binary
|
||||||
@@ -74,7 +65,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 -lm \
|
-lcurl -lssl -lcrypto -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"
|
||||||
@@ -87,7 +78,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 -lm \
|
-lcurl -lssl -lcrypto -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"
|
||||||
@@ -100,7 +91,7 @@ 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 -lm \
|
-lcurl -lssl -lcrypto -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"
|
||||||
@@ -137,7 +128,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_core.el > /tmp/el_native_core.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_core.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_core
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_core
|
||||||
/tmp/el_native_core
|
/tmp/el_native_core
|
||||||
|
|
||||||
- name: Run tests - native (text)
|
- name: Run tests - native (text)
|
||||||
@@ -147,7 +138,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_text.el > /tmp/el_native_text.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_text.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_text
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_text
|
||||||
/tmp/el_native_text
|
/tmp/el_native_text
|
||||||
|
|
||||||
- name: Run tests - native (string)
|
- name: Run tests - native (string)
|
||||||
@@ -157,7 +148,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_string.el > /tmp/el_native_string.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_string.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_string
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_string
|
||||||
/tmp/el_native_string
|
/tmp/el_native_string
|
||||||
|
|
||||||
- name: Run tests - native (math)
|
- name: Run tests - native (math)
|
||||||
@@ -167,7 +158,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_math.el > /tmp/el_native_math.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_math.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_math
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_math
|
||||||
/tmp/el_native_math
|
/tmp/el_native_math
|
||||||
|
|
||||||
- name: Run tests - native (state)
|
- name: Run tests - native (state)
|
||||||
@@ -177,7 +168,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_state.el > /tmp/el_native_state.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_state.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_state
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_state
|
||||||
/tmp/el_native_state
|
/tmp/el_native_state
|
||||||
|
|
||||||
- name: Run tests - native (time)
|
- name: Run tests - native (time)
|
||||||
@@ -187,7 +178,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_time.el > /tmp/el_native_time.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_time.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_time
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_time
|
||||||
/tmp/el_native_time
|
/tmp/el_native_time
|
||||||
|
|
||||||
- name: Run tests - native (json)
|
- name: Run tests - native (json)
|
||||||
@@ -197,7 +188,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_json.el > /tmp/el_native_json.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_json.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_json
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_json
|
||||||
/tmp/el_native_json
|
/tmp/el_native_json
|
||||||
|
|
||||||
- name: Run tests - native (env)
|
- name: Run tests - native (env)
|
||||||
@@ -207,7 +198,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_env.el > /tmp/el_native_env.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_env.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_env
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_env
|
||||||
/tmp/el_native_env
|
/tmp/el_native_env
|
||||||
|
|
||||||
- name: Run tests - native (fs)
|
- name: Run tests - native (fs)
|
||||||
@@ -217,7 +208,7 @@ jobs:
|
|||||||
RUNTIME="$(pwd)/el-compiler/runtime"
|
RUNTIME="$(pwd)/el-compiler/runtime"
|
||||||
"$ELC" --test tests/native/test_fs.el > /tmp/el_native_fs.c
|
"$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" \
|
gcc -O2 -I "$RUNTIME" /tmp/el_native_fs.c "$RUNTIME/el_runtime.c" \
|
||||||
-lcurl -lpthread -lm -o /tmp/el_native_fs
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/el_native_fs
|
||||||
/tmp/el_native_fs
|
/tmp/el_native_fs
|
||||||
|
|
||||||
# Bundle the SDK tarball - runs from the repo root to reference lang/ paths correctly
|
# Bundle the SDK tarball - runs from the repo root to reference lang/ paths correctly
|
||||||
|
|||||||
@@ -4999,7 +4999,13 @@ el_val_t state_get_or(el_val_t key, el_val_t default_val) {
|
|||||||
|
|
||||||
el_val_t float_to_str(el_val_t f) {
|
el_val_t float_to_str(el_val_t f) {
|
||||||
char buf[64];
|
char buf[64];
|
||||||
snprintf(buf, sizeof(buf), "%g", el_to_float(f));
|
double v = el_to_float(f);
|
||||||
|
/* Normalize NaN to "nan" regardless of sign — platform-independent. */
|
||||||
|
if (isnan(v)) {
|
||||||
|
snprintf(buf, sizeof(buf), "nan");
|
||||||
|
} else {
|
||||||
|
snprintf(buf, sizeof(buf), "%g", v);
|
||||||
|
}
|
||||||
return el_wrap_str(el_strdup(buf));
|
return el_wrap_str(el_strdup(buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ run_runtime_case() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if ! cc -O2 -I "${RUNTIME_DIR}" "${out_c}" "${RUNTIME_DIR}/el_runtime.c" \
|
if ! cc -O2 -I "${RUNTIME_DIR}" "${out_c}" "${RUNTIME_DIR}/el_runtime.c" \
|
||||||
-lcurl -lpthread -o "${out_bin}" 2>/tmp/cal_test.cc.err; then
|
-lcurl -lssl -lcrypto -lpthread -lm -o "${out_bin}" 2>/tmp/cal_test.cc.err; then
|
||||||
echo "FAIL ${name} — cc failed:"
|
echo "FAIL ${name} — cc failed:"
|
||||||
cat /tmp/cal_test.cc.err | sed 's/^/ /'
|
cat /tmp/cal_test.cc.err | sed 's/^/ /'
|
||||||
FAIL=$((FAIL+1))
|
FAIL=$((FAIL+1))
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ echo "==> Compiling runner.el via ${ELC}"
|
|||||||
|
|
||||||
echo "==> Linking against ${RUNTIME_DIR}/el_runtime.c"
|
echo "==> Linking against ${RUNTIME_DIR}/el_runtime.c"
|
||||||
cc -O2 -I "${RUNTIME_DIR}" "${OUT_C}" "${RUNTIME_DIR}/el_runtime.c" \
|
cc -O2 -I "${RUNTIME_DIR}" "${OUT_C}" "${RUNTIME_DIR}/el_runtime.c" \
|
||||||
-lcurl -lpthread -o "${OUT_BIN}"
|
-lcurl -lssl -lcrypto -lpthread -lm -o "${OUT_BIN}"
|
||||||
|
|
||||||
echo "==> Running"
|
echo "==> Running"
|
||||||
"${OUT_BIN}"
|
"${OUT_BIN}"
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ run_runtime_case() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if ! cc -O2 -I "${RUNTIME_DIR}" "${out_c}" "${RUNTIME_DIR}/el_runtime.c" \
|
if ! cc -O2 -I "${RUNTIME_DIR}" "${out_c}" "${RUNTIME_DIR}/el_runtime.c" \
|
||||||
-lcurl -lpthread -o "${out_bin}" 2>/tmp/text_test.cc.err; then
|
-lcurl -lssl -lcrypto -lpthread -lm -o "${out_bin}" 2>/tmp/text_test.cc.err; then
|
||||||
echo "FAIL ${name} — cc failed:"
|
echo "FAIL ${name} — cc failed:"
|
||||||
cat /tmp/text_test.cc.err | sed 's/^/ /'
|
cat /tmp/text_test.cc.err | sed 's/^/ /'
|
||||||
FAIL=$((FAIL+1))
|
FAIL=$((FAIL+1))
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ run_runtime_case() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if ! cc -O2 -I "${RUNTIME_DIR}" "${out_c}" "${RUNTIME_DIR}/el_runtime.c" \
|
if ! cc -O2 -I "${RUNTIME_DIR}" "${out_c}" "${RUNTIME_DIR}/el_runtime.c" \
|
||||||
-lcurl -lpthread -o "${out_bin}" 2>/tmp/time_test.cc.err; then
|
-lcurl -lssl -lcrypto -lpthread -lm -o "${out_bin}" 2>/tmp/time_test.cc.err; then
|
||||||
echo "FAIL ${name} — cc failed:"
|
echo "FAIL ${name} — cc failed:"
|
||||||
cat /tmp/time_test.cc.err | sed 's/^/ /'
|
cat /tmp/time_test.cc.err | sed 's/^/ /'
|
||||||
FAIL=$((FAIL+1))
|
FAIL=$((FAIL+1))
|
||||||
@@ -116,7 +116,7 @@ run_typeerror_case() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if cc -O2 -I "${RUNTIME_DIR}" "${out_c}" "${RUNTIME_DIR}/el_runtime.c" \
|
if cc -O2 -I "${RUNTIME_DIR}" "${out_c}" "${RUNTIME_DIR}/el_runtime.c" \
|
||||||
-lcurl -lpthread -o /tmp/time_test_should_not_link 2>/tmp/time_test.cc.err; then
|
-lcurl -lssl -lcrypto -lpthread -lm -o /tmp/time_test_should_not_link 2>/tmp/time_test.cc.err; then
|
||||||
echo "FAIL ${name} — cc unexpectedly succeeded; type rule did not fire"
|
echo "FAIL ${name} — cc unexpectedly succeeded; type rule did not fire"
|
||||||
FAIL=$((FAIL+1))
|
FAIL=$((FAIL+1))
|
||||||
FAILED_NAMES+=("${name}")
|
FAILED_NAMES+=("${name}")
|
||||||
|
|||||||
Reference in New Issue
Block a user