dtmt/.ci/tasks/build.sh
Lucas Schwiderski afe4e82c47
Some checks failed
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
ci: Copy the correct library files
2023-11-08 10:50:42 +01:00

27 lines
788 B
Bash
Executable file

#!/bin/sh
set -eux
case "$TARGET" in
msvc)
cp /src/*.lib ./lib/oodle/
cargo build --color always --locked --release --target x86_64-pc-windows-msvc -Zbuild-std
if [ -d "$OUTPUT" ]; then
install -t "$OUTPUT/" target/x86_64-pc-windows-msvc/release/dtmt.exe
install -t "$OUTPUT/" target/x86_64-pc-windows-msvc/release/dtmm.exe
fi
;;
linux)
cp /src/*.a ./lib/oodle/
cargo build --color always --locked --profile release-lto
if [ -d "$OUTPUT" ]; then
install -t "$OUTPUT/" target/release/dtmt
install -t "$OUTPUT/" target/release/dtmm
fi
;;
*)
echo "Env var 'TARGET' must either be 'msvc' or 'linux'. Got '$TARGET'." >&2
exit 1
esac