cicd: new workflow

This commit is contained in:
Andrew Hlynskyi 2023-04-04 02:38:29 +03:00
parent 1b1c3974f7
commit cc4f932d17
14 changed files with 611 additions and 228 deletions

10
.github/scripts/cross.sh vendored Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
set -x
set -e
if [ "$CROSS" != 1 ]; then
exit 111
fi
docker run --rm -v /home/runner:/home/runner -w "$PWD" "$CROSS_IMAGE" "$@"

19
.github/scripts/make.sh vendored Executable file
View file

@ -0,0 +1,19 @@
#!/bin/bash
set -x
set -e
if [ "$CROSS" = 1 ]; then
if [ -z "$CC" ]; then
echo "make.sh: CC is not set" >&2
exit 111
fi
if [ -z "$AR" ]; then
echo "make.sh: AR is not set" >&2
exit 111
fi
cross.sh make CC=$CC AR=$AR "$@"
else
make "$@"
fi

12
.github/scripts/tree-sitter.sh vendored Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
set -x
set -e
tree_sitter="$ROOT"/target/"$TARGET"/release/tree-sitter
if [ "$CROSS" = 1 ]; then
cross.sh $CROSS_RUNNER "$tree_sitter" "$@"
else
"$tree_sitter" "$@"
fi