summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
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.yml
parentcbfc0e933660626c9f4eaf5480076b6fcd31dceb (diff)
downloadhaskell-55112fbfe6d1fad61b27780d3361a330359d48b3.tar.gz
ci: Move phase timing logic into ci.sh
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml120
1 files changed, 25 insertions, 95 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 246b8c94fa..5b7a21b183 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -304,6 +304,7 @@ lint-release-changelogs:
after_script:
- .gitlab/ci.sh save_cache
- .gitlab/ci.sh clean
+ - cat ci-timings
tags:
- x86_64-linux
@@ -377,6 +378,7 @@ hadrian-ghc-in-ghci:
- echo ":q" | hadrian/ghci -j`mk/detect-cpu-count.sh`| tail -n2 | grep "Ok,"
after_script:
- .gitlab/ci.sh save_cache
+ - cat ci-timings
cache:
key: hadrian-ghci
paths:
@@ -402,6 +404,7 @@ hadrian-ghc-in-ghci:
- .gitlab/ci.sh setup
after_script:
- .gitlab/ci.sh save_cache
+ - cat ci-timings
variables:
GHC_FLAGS: -Werror
cache:
@@ -432,36 +435,10 @@ lint-libs:
if [[ "$RELEASE_JOB" = "yes" ]]; then
HADDOCK_HYPERLINKED_SOURCES=1
fi
- TIME_START=$(date +%s)
- time .gitlab/ci.sh setup 2>&1
- TIME_SETUP=$(date +%s)
- TIME_SETUP_DELTA=$(expr $TIME_SETUP - $TIME_START)
- echo "Setup took $TIME_SETUP_DELTA seconds"
-
- time .gitlab/ci.sh configure 2>&1
- TIME_CONFIGURE=$(date +%s)
- TIME_CONFIGURE_DELTA=$(expr $TIME_CONFIGURE - $TIME_SETUP)
- echo "Configure took $TIME_CONFIGURE_DELTA seconds"
-
- time .gitlab/ci.sh build_make 2>&1
- TIME_BUILD=$(date +%s)
- TIME_BUILD_DELTA=$(expr $TIME_BUILD - $TIME_CONFIGURE)
- echo "Build took $TIME_BUILD_DELTA seconds"
-
- set +e
- time .gitlab/ci.sh test_make 2>&1
- status=$?
- set -e
- TIME_TEST=$(date +%s)
- TIME_TEST_DELTA=$(expr $TIME_TEST - $TIME_BUILD)
- echo "Test took $TIME_TEST_DELTA seconds"
-
- echo "=== TIMINGS ==="
- echo "Setup | $TIME_SETUP_DELTA"
- echo "Configure | $TIME_CONFIGURE_DELTA"
- echo "Build | $TIME_BUILD_DELTA"
- echo "Test | $TIME_TEST_DELTA"
- exit $status
+ .gitlab/ci.sh setup
+ .gitlab/ci.sh configure
+ .gitlab/ci.sh build_make
+ .gitlab/ci.sh test_make
dependencies: []
artifacts:
@@ -497,6 +474,7 @@ lint-libs:
after_script:
- .gitlab/ci.sh save_cache
- .gitlab/ci.sh clean
+ - cat ci-timings
artifacts:
when: always
expire_in: 2 week
@@ -536,6 +514,7 @@ release-x86_64-freebsd:
after_script:
- .gitlab/ci.sh save_cache
- .gitlab/ci.sh clean
+ - cat ci-timings
artifacts:
when: always
expire_in: 2 week
@@ -589,6 +568,7 @@ validate-x86_64-darwin:
IGNORE_PERF_FAILURES: "all"
after_script:
- .gitlab/ci.sh clean
+ - cat ci-timings
# I wish we could just use the nix #! logic, but we can't --run and -i bash
# behave very differently. -i bash does not pass any nix related env vars
@@ -614,47 +594,20 @@ validate-x86_64-darwin:
# fix up config.sub in libraries for the time.
# aarch64-darwin is not supported in older config.sub's
- TIME_START=$(date +%s)
find libraries -name config.sub -exec cp config.sub {} \;
- runInNixShell ".gitlab/ci.sh setup" 2>&1
- TIME_SETUP=$(date +%s)
- TIME_SETUP_DELTA=$(expr $TIME_SETUP - $TIME_START)
- echo "Setup took $TIME_SETUP_DELTA seconds"
+ runInNixShell ".gitlab/ci.sh setup"
# make sure $HOME is prisine
echo "Deleting $HOME/.cabal"
rm -fR $HOME/.cabal
- runInNixShell "cabal update --index=$HACKAGE_INDEX_STATE" 2>&1
-
- runInNixShell ".gitlab/ci.sh configure" 2>&1
- TIME_CONFIGURE=$(date +%s)
- TIME_CONFIGURE_DELTA=$(expr $TIME_CONFIGURE - $TIME_SETUP)
- echo "Configure took $TIME_CONFIGURE_DELTA seconds"
-
- runInNixShell ".gitlab/ci.sh build_hadrian" 2>&1
- TIME_BUILD=$(date +%s)
- TIME_BUILD_DELTA=$(expr $TIME_BUILD - $TIME_CONFIGURE)
- echo "Build took $TIME_BUILD_DELTA seconds"
-
- set +e
- runInNixShell ".gitlab/ci.sh test_hadrian" 2>&1
- status=$?
- set -e
-
- TIME_TEST=$(date +%s)
- TIME_TEST_DELTA=$(expr $TIME_TEST - $TIME_BUILD)
- echo "Test took $TIME_TEST_DELTA seconds"
+ runInNixShell "cabal update --index=$HACKAGE_INDEX_STATE"
+ runInNixShell ".gitlab/ci.sh configure"
+ runInNixShell ".gitlab/ci.sh build_hadrian"
+ runInNixShell ".gitlab/ci.sh test_hadrian"
# Important to run this in nix-shell because $HOME is different in there
- runInNixShell ".gitlab/ci.sh save_cache" 2>&1
-
- echo "=== TIMINGS ==="
- echo "Setup | $TIME_SETUP_DELTA"
- echo "Configure | $TIME_CONFIGURE_DELTA"
- echo "Build | $TIME_BUILD_DELTA"
- echo "Test | $TIME_TEST_DELTA"
- exit $status
+ runInNixShell ".gitlab/ci.sh save_cache"
artifacts:
when: always
@@ -687,6 +640,7 @@ validate-aarch64-darwin:
TEST_ENV: "aarch64-darwin-hadrian"
after_script:
- .gitlab/ci.sh clean
+ - cat ci-timings
# I wish we could just use the nix #! logic, but we can't --run and -i bash
# behave very differently. -i bash does not pass any nix related env vars
@@ -711,46 +665,20 @@ validate-aarch64-darwin:
# fix up config.sub in libraries for the time.
# aarch64-darwin is not supported in older config.sub's
- TIME_START=$(date +%s)
find libraries -name config.sub -exec cp config.sub {} \;
- time runInNixShell ".gitlab/ci.sh setup" 2>&1
- TIME_SETUP=$(date +%s)
- TIME_SETUP_DELTA=$(expr $TIME_SETUP - $TIME_START)
- echo "Setup took $TIME_SETUP_DELTA seconds"
+ runInNixShell ".gitlab/ci.sh setup"
# make sure $HOME is prisine
echo "Deleting $HOME/.cabal"
rm -fR $HOME/.cabal
- runInNixShell "cabal update --index=$HACKAGE_INDEX_STATE" 2>&1
-
- runInNixShell ".gitlab/ci.sh configure" 2>&1
- TIME_CONFIGURE=$(date +%s)
- TIME_CONFIGURE_DELTA=$(expr $TIME_CONFIGURE - $TIME_SETUP)
- echo "Setup took $TIME_CONFIGURE_DELTA seconds"
-
- runInNixShell ".gitlab/ci.sh build_hadrian" 2>&1
- TIME_BUILD=$(date +%s)
- TIME_BUILD_DELTA=$(expr $TIME_BUILD - $TIME_CONFIGURE)
- echo "Build took $TIME_BUILD_DELTA seconds"
-
- set +e
- runInNixShell ".gitlab/ci.sh test_hadrian" 2>&1
- status=$?
- set -e
- TIME_TEST=$(date +%s)
- TIME_TEST_DELTA=$(expr $TIME_TEST - $TIME_BUILD)
- echo "Test took $TIME_TEST_DELTA seconds"
+ runInNixShell "cabal update --index=$HACKAGE_INDEX_STATE"
+ runInNixShell ".gitlab/ci.sh configure"
+ runInNixShell ".gitlab/ci.sh build_hadrian"
+ runInNixShell ".gitlab/ci.sh test_hadrian"
# Important to run this in nix-shell because $HOME is different there
- runInNixShell ".gitlab/ci.sh save_cache" 2>&1
-
- echo "=== TIMINGS ==="
- echo "Setup | $TIME_SETUP_DELTA"
- echo "Configure | $TIME_CONFIGURE_DELTA"
- echo "Build | $TIME_BUILD_DELTA"
- echo "Test | $TIME_TEST_DELTA"
- exit $status
+ runInNixShell ".gitlab/ci.sh save_cache"
artifacts:
when: always
@@ -769,6 +697,7 @@ validate-aarch64-darwin:
- sudo chown ghc:ghc -R .
after_script:
- cp -Rf $HOME/.cabal cabal-cache
+ - cat ci-timings
cache:
key: linux
paths:
@@ -1205,6 +1134,7 @@ release-x86_64-linux-fedora27-dwarf:
after_script:
- bash .gitlab/ci.sh save_cache
- bash .gitlab/ci.sh clean
+ - type ci-timings
dependencies: []
variables:
#FORCE_SYMLINKS: 1