Created
May 17, 2016 16:22
-
-
Save pietro/29ff75461465b9c7a5f961006456a121 to your computer and use it in GitHub Desktop.
Ring build script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eux -o pipefail | |
IFS=$'\n\t' | |
$CC_X --version | |
$CXX_X --version | |
make --version | |
cargo version | |
rustc --version | |
mkdir -p .cargo | |
echo "[target.$TARGET_X]" > .cargo/config | |
echo "linker= \"$CC_X\"" >> .cargo/config | |
cat .cargo/config | |
build_dir="target/${TARGET_X}" | |
if [[ "${MODE_X-}" == "RELWITHDEBINFO" ]]; then | |
build_dir="${build_dir}/release" | |
mode=--release; | |
else | |
build_dir="${build_dir}/debug" | |
fi | |
CC=$CC_X CXX=$CXX_X cargo build -j2 ${mode-} --verbose --target=$TARGET_X | |
CC=$CC_X CXX=$CXX_X cargo test -j2 ${mode-} --no-run --verbose --target=$TARGET_X | |
echo "Ring built at: ${build_dir}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment