ci: Delimit building each commit with a collapsible section.

This commit is contained in:
Giovanni Mascellani 2024-04-04 23:04:14 +02:00 committed by Alexandre Julliard
parent 5ab1ef1cad
commit ca2f54e729
Notes: Alexandre Julliard 2024-04-09 15:46:38 -05:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/762
5 changed files with 23 additions and 14 deletions

View File

@ -1,10 +1,9 @@
#!/bin/bash #!/bin/bash
echo "Building $(git log -1)"
echo "---"
COMMIT=$(printf '%03d-%s' $(git cherry $CI_MERGE_REQUEST_DIFF_BASE_SHA HEAD^ | wc -l) $(git rev-parse --short HEAD)) COMMIT=$(printf '%03d-%s' $(git cherry $CI_MERGE_REQUEST_DIFF_BASE_SHA HEAD^ | wc -l) $(git rev-parse --short HEAD))
echo -e "\e[0Ksection_start:`date +%s`:commit_$COMMIT\r\e[0KBuilding commit $COMMIT"
set -Eeuxo pipefail set -Eeuxo pipefail
# Building with -Wno-array-bounds because MinGW headers currently emit # Building with -Wno-array-bounds because MinGW headers currently emit
@ -25,3 +24,5 @@ rsync -Rr config.log tests/*.txt tests/*.exe ../artifacts/$COMMIT || true
cp tests/driver.cross64.exe ../artifacts cp tests/driver.cross64.exe ../artifacts
git reset --hard git reset --hard
echo -e "\e[0Ksection_end:`date +%s`:commit_$COMMIT\r\e[0K"

View File

@ -1,10 +1,9 @@
#!/bin/bash #!/bin/bash
echo "Building $(git log -1)"
echo "---"
COMMIT=$(printf '%03d-%s' $(git cherry $CI_MERGE_REQUEST_DIFF_BASE_SHA HEAD^ | wc -l) $(git rev-parse --short HEAD)) COMMIT=$(printf '%03d-%s' $(git cherry $CI_MERGE_REQUEST_DIFF_BASE_SHA HEAD^ | wc -l) $(git rev-parse --short HEAD))
echo -e "\e[0Ksection_start:`date +%s`:commit_$COMMIT\r\e[0KBuilding commit $COMMIT"
set -Eeuxo pipefail set -Eeuxo pipefail
./autogen.sh ./autogen.sh
@ -26,3 +25,5 @@ mkdir -p ../artifacts/$COMMIT
rsync -Rr config.log doc/* test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT || true rsync -Rr config.log doc/* test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT || true
git reset --hard git reset --hard
echo -e "\e[0Ksection_end:`date +%s`:commit_$COMMIT\r\e[0K"

View File

@ -1,10 +1,9 @@
#!/bin/bash #!/bin/bash
echo "Building $(git log -1)"
echo "---"
COMMIT=$(printf '%03d-%s' $(git cherry $CI_MERGE_REQUEST_DIFF_BASE_SHA HEAD^ | wc -l) $(git rev-parse --short HEAD)) COMMIT=$(printf '%03d-%s' $(git cherry $CI_MERGE_REQUEST_DIFF_BASE_SHA HEAD^ | wc -l) $(git rev-parse --short HEAD))
echo -e "\033[0Ksection_start:`date +%s`:commit_$COMMIT\r\033[0KBuilding commit $COMMIT"
set -Eeuxo pipefail set -Eeuxo pipefail
./autogen.sh ./autogen.sh
@ -25,3 +24,5 @@ mkdir -p ../artifacts/$COMMIT
rsync -Rr config.log test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT || true rsync -Rr config.log test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT || true
git reset --hard git reset --hard
echo -e "\033[0Ksection_end:`date +%s`:commit_$COMMIT\r\033[0K"

View File

@ -1,10 +1,9 @@
#!/bin/bash #!/bin/bash
echo "Building $(git log -1)"
echo "---"
COMMIT=$(printf '%03d-%s' $(git cherry $CI_MERGE_REQUEST_DIFF_BASE_SHA HEAD^ | wc -l) $(git rev-parse --short HEAD)) COMMIT=$(printf '%03d-%s' $(git cherry $CI_MERGE_REQUEST_DIFF_BASE_SHA HEAD^ | wc -l) $(git rev-parse --short HEAD))
echo -e "\e[0Ksection_start:`date +%s`:commit_$COMMIT\r\e[0KBuilding commit $COMMIT"
set -Eeuxo pipefail set -Eeuxo pipefail
./autogen.sh ./autogen.sh
@ -23,3 +22,5 @@ cp config.log ../artifacts/$COMMIT || true
cp destdir/usr/local/bin/* ../artifacts/$COMMIT || true cp destdir/usr/local/bin/* ../artifacts/$COMMIT || true
git reset --hard git reset --hard
echo -e "\e[0Ksection_end:`date +%s`:commit_$COMMIT\r\e[0K"

View File

@ -19,6 +19,8 @@
#include <stdio.h> #include <stdio.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <time.h>
#include <windows.h> #include <windows.h>
#include <shlobj.h> #include <shlobj.h>
@ -141,8 +143,8 @@ static bool run_tests_for_directory(const char *commit_dir)
if (!test_arch) if (!test_arch)
test_arch = "64"; test_arch = "64";
printf("Building %s\n", commit_dir); printf("\e[0Ksection_start:%I64d:commit_%s\r\e[0KBuilding commit %s\n",
printf("---\n"); (uint64_t)time(NULL), commit_dir, commit_dir);
sprintf(list_filename, "artifacts/%s/tests/shader_tests.txt", commit_dir); sprintf(list_filename, "artifacts/%s/tests/shader_tests.txt", commit_dir);
list_file = fopen(list_filename, "r"); list_file = fopen(list_filename, "r");
@ -232,6 +234,9 @@ static bool run_tests_for_directory(const char *commit_dir)
} }
} }
printf("\e[0Ksection_end:%I64d:commit_%s\r\e[0K\n",
(uint64_t)time(NULL), commit_dir);
return ret; return ret;
} }