This commit is contained in:
nora 2023-01-14 16:03:33 +01:00
parent 3d90a3ea0a
commit d415bb7ae9
6 changed files with 84 additions and 86 deletions

21
build_and_run.sh Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
if ! which rustc > /dev/null;
then
echo "ERROR: Rust must be installed: https://www.rust-lang.org/tools/install"
exit 1
fi
echo "${BASH_SOURCE[0]}"
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
echo "Building Rust library..."
cargo build --release "--manifest-path=$SCRIPT_DIR/Cargo.toml"
export LD_LIBRARY_PATH="$SCRIPT_DIR/target/release"
echo "Setting LD_LIBRARY_PATH to $LD_LIBRARY_PATH"
echo "Running Java tests. If this fails, there's something wrong :/"
cd "$SCRIPT_DIR/minmax-java"
./gradlew build