Improve CI log output
Some checks failed
lint/clippy Checking for common mistakes and opportunities for code improvement
build/linux Build for the target platform: linux
build/msvc Build for the target platform: msvc
Some checks failed
lint/clippy Checking for common mistakes and opportunities for code improvement
build/linux Build for the target platform: linux
build/msvc Build for the target platform: msvc
This commit is contained in:
parent
d956e75146
commit
4c96bcf5ba
2 changed files with 23 additions and 12 deletions
|
@ -12,39 +12,42 @@ title() {
|
|||
printf "\033[1m%s\033[0m\n" "$1"
|
||||
}
|
||||
|
||||
cd "repo"
|
||||
|
||||
if [ -n "${PR:-}" ]; then
|
||||
title "PR: $(echo "$PR" | jq '.number') - $(echo "$PR" | jq '.title')"
|
||||
ref="pr-$(echo "$PR" | jq '.number')-$(git rev-parse --short HEAD 2>/dev/null || echo 'manual')"
|
||||
ref="pr-$(echo "$PR" | jq '.number')-$(git rev-parse --short $(cat .git/ref || echo "HEAD")) 2>/dev/null || echo 'manual')"
|
||||
else
|
||||
ref=$(git describe --tags)
|
||||
fi
|
||||
|
||||
title "Version is '$ref'"
|
||||
title "Version: '$ref'"
|
||||
echo "$ref" > "$OUTPUT/version"
|
||||
|
||||
cd "repo"
|
||||
case "$TARGET" in
|
||||
msvc)
|
||||
cp /src/*.lib ./lib/oodle/
|
||||
|
||||
title "Build project for target $TARGET"
|
||||
title "Building project for target $TARGET"
|
||||
cargo build --color always --locked --release --target x86_64-pc-windows-msvc -Zbuild-std
|
||||
|
||||
title "Install artifacts"
|
||||
install -t "$OUTPUT/" target/x86_64-pc-windows-msvc/release/dtmt.exe
|
||||
install -t "$OUTPUT/" target/x86_64-pc-windows-msvc/release/dtmm.exe
|
||||
install -v -t "$OUTPUT/" target/x86_64-pc-windows-msvc/release/dtmt.exe
|
||||
install -v -t "$OUTPUT/" target/x86_64-pc-windows-msvc/release/dtmm.exe
|
||||
;;
|
||||
linux)
|
||||
cp /src/*.a ./lib/oodle/
|
||||
|
||||
title "Build project for target $TARGET"
|
||||
title "Building project for target $TARGET"
|
||||
cargo build --color always --locked --profile release-lto
|
||||
|
||||
title "Install artifacts"
|
||||
install -t "$OUTPUT/" target/release-lto/dtmt
|
||||
install -t "$OUTPUT/" target/release-lto/dtmm
|
||||
title "Installing artifacts"
|
||||
install -v -t "$OUTPUT/" target/release-lto/dtmt
|
||||
install -v -t "$OUTPUT/" target/release-lto/dtmm
|
||||
;;
|
||||
*)
|
||||
echo "Env var 'TARGET' must either be 'msvc' or 'linux'. Got '$TARGET'." >&2
|
||||
echo -e "\033[31;1mEnv var 'TARGET' must either be 'msvc' or 'linux'. Got '$TARGET'.\033[0m" >&2
|
||||
exit 1
|
||||
esac
|
||||
|
||||
title "Done"
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
set -eu
|
||||
|
||||
title() {
|
||||
printf "\033[1m%s\033[0m\n" "$1"
|
||||
}
|
||||
|
||||
title "Install clippy"
|
||||
rustup component add clippy
|
||||
|
||||
title "Run clippy"
|
||||
cargo clippy --color always --no-deps
|
||||
|
||||
title "Done"
|
||||
|
|
Loading…
Add table
Reference in a new issue