ci:test helloword with embed target
This commit is contained in:
14
.github/actions/test-helloworld/action.yml
vendored
14
.github/actions/test-helloworld/action.yml
vendored
@@ -38,7 +38,7 @@ runs:
|
|||||||
Hello, LLGo!
|
Hello, LLGo!
|
||||||
Hello, LLGo!
|
Hello, LLGo!
|
||||||
Hello LLGo by cpp/std.Str"
|
Hello LLGo by cpp/std.Str"
|
||||||
OUTPUT=$(llgo run -v . 2>&1 | tee /dev/stderr)
|
OUTPUT=$(llgo run . 2>&1 | tee /dev/stderr)
|
||||||
if echo "$OUTPUT" | grep -qF "$EXPECTED"; then
|
if echo "$OUTPUT" | grep -qF "$EXPECTED"; then
|
||||||
echo "Basic test passed"
|
echo "Basic test passed"
|
||||||
else
|
else
|
||||||
@@ -50,4 +50,14 @@ runs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#TODO(zzy): Test embed targets, need dispatch target dir
|
cd ../..
|
||||||
|
mkdir -p _test/emb && cd _test/emb
|
||||||
|
cat > main.go << 'EOL'
|
||||||
|
package main
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
}
|
||||||
|
EOL
|
||||||
|
llgo build -v -target esp32-coreboard-v2 -o demo.out .
|
||||||
|
test -f demo.out.elf && echo "ESP32 cross-compilation test passed: demo.out.elf generated"
|
||||||
|
exit $?
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ archives:
|
|||||||
- LICENSE
|
- LICENSE
|
||||||
- README.md
|
- README.md
|
||||||
- runtime
|
- runtime
|
||||||
|
- targets
|
||||||
- src: ".sysroot/{{.Os}}/{{.Arch}}/crosscompile/clang"
|
- src: ".sysroot/{{.Os}}/{{.Arch}}/crosscompile/clang"
|
||||||
dst: crosscompile/clang
|
dst: crosscompile/clang
|
||||||
info:
|
info:
|
||||||
|
|||||||
Reference in New Issue
Block a user