mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 06:51:51 +08:00
d9fdda8cf2
Add a simple CI compilation test to ensure that the Go toolchain is functional. Signed-off-by: George Sapkin <george@sapk.in>
24 lines
301 B
Bash
Executable File
24 lines
301 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
case "$1" in
|
|
golang*doc|golang*misc|golang*src|golang*tests) exit ;;
|
|
esac
|
|
|
|
go version | grep -F " go$PKG_VERSION "
|
|
|
|
cat <<'EOF' > hello.go
|
|
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
fmt.Println("Hello, World!")
|
|
}
|
|
|
|
EOF
|
|
|
|
go run hello.go
|
|
rm hello.go
|