summaryrefslogtreecommitdiff
path: root/.gitlab/ci.sh
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-07-25 15:36:23 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-09-23 16:00:17 -0400
commit55112fbfe6d1fad61b27780d3361a330359d48b3 (patch)
treee7f6b1b04390d4c58b54691a50397c9cc4bcaf2e /.gitlab/ci.sh
parentcbfc0e933660626c9f4eaf5480076b6fcd31dceb (diff)
downloadhaskell-55112fbfe6d1fad61b27780d3361a330359d48b3.tar.gz
ci: Move phase timing logic into ci.sh
Diffstat (limited to '.gitlab/ci.sh')
-rwxr-xr-x.gitlab/ci.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index f6e6dddcf7..85fd59cd59 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -214,6 +214,8 @@ function set_toolchain_paths() {
# Extract GHC toolchain
function setup() {
+ echo "=== TIMINGS ===" > ci-timings
+
if [ -d "$CABAL_CACHE" ]; then
info "Extracting cabal cache from $CABAL_CACHE to $CABAL_DIR..."
mkdir -p "$CABAL_DIR"
@@ -221,7 +223,7 @@ function setup() {
fi
if [[ "$needs_toolchain" = "1" ]]; then
- setup_toolchain
+ time_it "setup" setup_toolchain
fi
cabal update --index="$HACKAGE_INDEX_STATE"
@@ -610,22 +612,22 @@ set_toolchain_paths
case $1 in
usage) usage ;;
setup) setup && cleanup_submodules ;;
- configure) configure ;;
- build_make) build_make ;;
+ configure) time_it "configure" configure ;;
+ build_make) time_it "build" build_make ;;
test_make)
fetch_perf_notes
res=0
- test_make || res=$?
+ time_it "test" test_make || res=$?
push_perf_notes
exit $res ;;
- build_hadrian) build_hadrian ;;
+ build_hadrian) time_it "build" build_hadrian ;;
# N.B. Always push notes, even if the build fails. This is okay to do as the
# testsuite driver doesn't record notes for tests that fail due to
# correctness.
test_hadrian)
fetch_perf_notes
res=0
- test_hadrian || res=$?
+ time_it "test" test_hadrian || res=$?
push_perf_notes
exit $res ;;
run_hadrian) shift; run_hadrian "$@" ;;