dtmt/.ci/tasks/build.sh
Lucas Schwiderski feff4b83be
All checks were successful
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
feat(ci): Implement pipeline for PRs
This includes using Gitea's Commit Status API to add checks to the PR
UI.
2023-03-30 10:42:00 +02:00

27 lines
789 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/*.so ./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