CI Improvements #143

Merged
lucas merged 2 commits from feat/ci into master 2023-11-23 20:27:55 +01:00
2 changed files with 12 additions and 4 deletions
Showing only changes of commit fa3f517aed - Show all commits

View file

@ -155,6 +155,7 @@ jobs:
- artifact/dtmt - artifact/dtmt
- artifact/dtmm - artifact/dtmm
- artifact/*.exe - artifact/*.exe
- artifact/*.sha256
- name: build-linux - name: build-linux
on_success: on_success:
@ -212,3 +213,5 @@ jobs:
- artifact/dtmt - artifact/dtmt
- artifact/dtmm - artifact/dtmm
- artifact/*.exe - artifact/*.exe
- artifact/*.sha256

View file

@ -12,6 +12,11 @@ title() {
printf "\033[1m%s\033[0m\n" "$1" printf "\033[1m%s\033[0m\n" "$1"
} }
install_artifact() {
install -v -t "$OUTPUT/" "$1"
sha256sum "$1" | cut -d' ' -f1 > "$OUTPUT/$(basename "$1").sha256"
}
cd "repo" cd "repo"
if [ -n "${PR:-}" ]; then if [ -n "${PR:-}" ]; then
@ -32,8 +37,8 @@ case "$TARGET" in
cargo build --color always --locked --release --target x86_64-pc-windows-msvc -Zbuild-std cargo build --color always --locked --release --target x86_64-pc-windows-msvc -Zbuild-std
title "Install artifacts" title "Install artifacts"
install -v -t "$OUTPUT/" target/x86_64-pc-windows-msvc/release/dtmt.exe install_artifact target/x86_64-pc-windows-msvc/release/dtmt.exe
install -v -t "$OUTPUT/" target/x86_64-pc-windows-msvc/release/dtmm.exe install_artifact target/x86_64-pc-windows-msvc/release/dtmm.exe
;; ;;
linux) linux)
cp /src/*.a ./lib/oodle/ cp /src/*.a ./lib/oodle/
@ -42,8 +47,8 @@ case "$TARGET" in
cargo build --color always --locked --profile release-lto cargo build --color always --locked --profile release-lto
title "Installing artifacts" title "Installing artifacts"
install -v -t "$OUTPUT/" target/release-lto/dtmt install_artifact target/release-lto/dtmt
install -v -t "$OUTPUT/" target/release-lto/dtmm install_artifact target/release-lto/dtmm
;; ;;
*) *)
echo -e "\033[31;1mEnv var 'TARGET' must either be 'msvc' or 'linux'. Got '$TARGET'.\033[0m" >&2 echo -e "\033[31;1mEnv var 'TARGET' must either be 'msvc' or 'linux'. Got '$TARGET'.\033[0m" >&2