Update `build-lua` to also build the Lua crate

This commit is contained in:
wtfsck 2022-05-18 21:06:35 +02:00
parent 598e106c83
commit f41483652b
1 changed files with 24 additions and 0 deletions

View File

@ -7,6 +7,7 @@ if [ ! -f "$root_dir/LICENSE.txt" ]; then
echo "Couldn't find the root dir" echo "Couldn't find the root dir"
exit 1 exit 1
fi fi
luacrate_dir="$root_dir/src/rust/loona"
luasrc_dir="$root_dir/src/rust/iced-x86-lua" luasrc_dir="$root_dir/src/rust/iced-x86-lua"
cargo_toml="$luasrc_dir/Cargo.toml" cargo_toml="$luasrc_dir/Cargo.toml"
@ -68,6 +69,28 @@ patchci_undo_patch() {
git checkout "$cargo_toml" git checkout "$cargo_toml"
} }
test_lua_crate() {
new_func "Test Lua crate"
curr_dir=$(pwd)
cd "$luacrate_dir"
set -- \
"lua51" \
"lua52" \
"lua53" \
"lua54"
for features in "$@"; do
echo "==== CLIPPY RELEASE $features ===="
cargo clippy --color always --release --features "$features"
done
echo "==== RUST FORMAT CHECK ===="
cargo fmt -- --color always --check
cd "$curr_dir"
}
build_test_rock() { build_test_rock() {
(build_test_rock_lua 5 1) (build_test_rock_lua 5 1)
(build_test_rock_lua 5 2) (build_test_rock_lua 5 2)
@ -152,6 +175,7 @@ echo "stylua version"
stylua --version stylua --version
patchci_patch patchci_patch
test_lua_crate
build_test_rock build_test_rock
if [ "$full_check" = "y" ]; then if [ "$full_check" = "y" ]; then
misc_tests misc_tests