2021-05-30 11:30:40 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-12-02 07:15:00 +01:00
|
|
|
set -e
|
|
|
|
|
2021-05-30 11:30:40 +02:00
|
|
|
TARGET=${TARGET-x86_64-unknown-linux-gnu}
|
|
|
|
if [ "$TARGET" != "" ]; then
|
|
|
|
TGT="--target $TARGET"
|
|
|
|
fi
|
|
|
|
VERSION=debug
|
2021-12-02 07:15:00 +01:00
|
|
|
if [ "$1" == "--release" ]; then
|
2021-05-30 11:30:40 +02:00
|
|
|
VERSION=release
|
|
|
|
fi
|
2021-06-19 07:39:59 +02:00
|
|
|
|
2022-01-06 12:00:19 +01:00
|
|
|
# We have to build the three binaries seprately for the following reason :
|
|
|
|
# The runtimetest MUST be compiled from its own directory, if compiled from root,
|
|
|
|
# it will not work as intended to test the runtime from inside
|
|
|
|
# So we just compile all thre binaries separately.
|
|
|
|
# To see why runtime test must be compiled in its own directory, see its Readme or its docs
|
|
|
|
|
|
|
|
cargo build --bin youki --verbose $TGT $1
|
|
|
|
cargo build --bin integration_test --verbose $TGT $1
|
|
|
|
cd crates/runtimetest
|
2021-06-19 07:39:59 +02:00
|
|
|
cargo build --verbose $TGT $1
|
2022-01-06 12:00:19 +01:00
|
|
|
cd ../../
|
2021-12-02 07:15:00 +01:00
|
|
|
|
2021-05-30 11:30:40 +02:00
|
|
|
cp target/$TARGET/$VERSION/youki .
|
2021-10-21 18:09:26 +02:00
|
|
|
cp target/$TARGET/$VERSION/integration_test ./youki_integration_test
|
2022-01-06 12:00:19 +01:00
|
|
|
cp target/$TARGET/$VERSION/runtimetest ./runtimetest
|