Go backend plus C (libsodium) and C++ (OpenSSL) simulated boards enroll through a Mosquitto 2.1 broker with Dynamic Security using X25519/HKDF/ Ed25519; a web view shows the run live. The Gitea workflow validates and builds the images, redeploys the stack on the server with the viewer on port 8099 and fails unless both boards pass all checks. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
19 lines
541 B
Bash
19 lines
541 B
Bash
#!/usr/bin/env bash
|
|
# Builds and runs the Go, C and C++ programs, then diffs their outputs.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
mkdir -p out
|
|
|
|
(cd go && go build -buildvcs=false -o ../out/spike-go .)
|
|
gcc -std=c11 -Wall -Wextra -O2 -o out/spike-c c/main.c -lcrypto
|
|
g++ -std=c++17 -Wall -Wextra -O2 -o out/spike-cpp cpp/main.cpp -lcrypto
|
|
|
|
./out/spike-go > out/go.txt
|
|
./out/spike-c > out/c.txt
|
|
./out/spike-cpp > out/cpp.txt
|
|
|
|
diff out/go.txt out/c.txt && echo "go == c"
|
|
diff out/go.txt out/cpp.txt && echo "go == c++"
|
|
echo
|
|
cat out/go.txt
|