aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2022-07-27 16:47:49 +0200
committerDaniel Gavin <danielgavin5@hotmail.com>2022-07-27 16:47:49 +0200
commit56c8aa0362f8e6f2b8b1c019f4d09fc1230b5eaa (patch)
treede1f60f659af13317019cb4aab1e5526579b527b /build.sh
parent1895b3b04fb0a88a2a8b1778908140555a372074 (diff)
CI added for odinfmt
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh24
1 files changed, 13 insertions, 11 deletions
diff --git a/build.sh b/build.sh
index f09b75e..91cc8cc 100755
--- a/build.sh
+++ b/build.sh
@@ -1,27 +1,29 @@
#!/usr/bin/env bash
-if [[ $1 == "CI" ]]
-then
- ODIN="Odin/odin"
-else
- ODIN="odin"
-fi
-
if [[ $1 == "CI" ]]
then
+ export PATH=$PATH:$PWD/Odin
#BUG in odin test, it makes the executable with the same name as a folder and gets confused.
cd tests
- ../${ODIN} test ../tests -collection:shared=../src -opt:2
+ odin test ../tests -collection:shared=../src -opt:2
if ([ $? -ne 0 ])
then
- echo "Test failed"
+ echo "Ols tests failed"
exit 1
fi
cd ..
+
+ tools/odinfmt/tests.sh
+
+ if ([ $? -ne 0 ])
+ then
+ echo "Odinfmt tests failed"
+ exit 1
+ fi
fi
if [[ $1 == "test" ]]
@@ -29,7 +31,7 @@ then
#BUG in odin test, it makes the executable with the same name as a folder and gets confused.
cd tests
- ${ODIN} test ../tests -collection:shared=../src
+ odin test ../tests -collection:shared=../src
if ([ $? -ne 0 ])
then
@@ -40,4 +42,4 @@ then
cd ..
fi
-${ODIN} build src/ -show-timings -collection:shared=src -out:ols -o:speed
+odin build src/ -collection:shared=src -out:ols -o:speed