summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTechcable2022-08-21 21:01:58 -0700
committerTechcable2022-08-21 21:02:23 -0700
commiteaba73a9930a2830eb5770547198d9edd104492e (patch)
tree5ac18ec6ca602f98f7554a2b28853d0d07b24fe2
parente85a6e896f97dd8816f9b5af0cdbff2591abb4d7 (diff)
downloadaur-eaba73a9930a2830eb5770547198d9edd104492e.tar.gz
Add basic check function (runs hello world)
-rw-r--r--PKGBUILD8
1 files changed, 8 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b2fcc2ea8aaf..5cc19f716c7f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -68,6 +68,14 @@ prepare() {
popd > /dev/null;
}
+check() {
+ hello_file="$(realpath ../hello.zig)"
+ cd "${srcdir}/zig-linux-${CARCH}-${pkgver//_/-}";
+ echo "Running Zig Hello World"
+ ./zig run "$hello_file"
+ ./zig test "$hello_file"
+}
+
package() {
cd "${srcdir}/zig-linux-${CARCH}-${pkgver//_/-}"
install -d "${pkgdir}/usr/bin"