Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reinier Maas
GHC
Commits
fdcf7645
Commit
fdcf7645
authored
4 years ago
by
Ben Gamari
Committed by
Marge Bot
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
gitlab-ci: Use MR base commit as performance baseline
parent
194b25ee
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+18
-2
18 additions, 2 deletions
.gitlab-ci.yml
.gitlab/ci.sh
+7
-0
7 additions, 0 deletions
.gitlab/ci.sh
hadrian/src/Settings/Builders/RunTest.hs
+4
-0
4 additions, 0 deletions
hadrian/src/Settings/Builders/RunTest.hs
testsuite/mk/test.mk
+4
-0
4 additions, 0 deletions
testsuite/mk/test.mk
with
33 additions
and
2 deletions
.gitlab-ci.yml
+
18
−
2
View file @
fdcf7645
...
...
@@ -26,12 +26,28 @@ stages:
-
testing
# head.hackage correctness and compiler performance testing
-
deploy
# push documentation
# Note [The CI Story]
# ~~~~~~~~~~~~~~~~~~~
#
# There are two different types of pipelines:
#
# - marge-bot merges to `master`. Here we perform an exhaustive validation
# across all of the platforms which we support. In addition, we push
# performance metric notes upstream, providing a persistent record of the
# performance characteristics of the compiler.
#
# - merge requests. Here we perform a slightly less exhaustive battery of
# testing. Namely we omit some configurations (e.g. the unregisterised job).
# These use the merge request's base commit for performance metric
# comparisons.
#
workflow
:
# N.B.Don't run on wip/ branches, instead on run on merge requests.
# N.B.
Don't run on wip/ branches, instead on run on merge requests.
rules
:
-
if
:
$CI_MERGE_REQUEST_ID
-
if
:
$CI_COMMIT_TAG
-
if
:
'
$CI_COMMIT_BRANCH
==
"
master
"'
-
if
:
'
$CI_COMMIT_BRANCH
==
"
wip/marge_bot_batch_merge_job
"'
-
if
:
'
$CI_COMMIT_BRANCH
=~
/ghc-[0.9]+\.[0-9]+/'
-
if
:
'
$CI_PIPELINE_SOURCE
==
"web"'
...
...
This diff is collapsed.
Click to expand it.
.gitlab/ci.sh
+
7
−
0
View file @
fdcf7645
...
...
@@ -363,6 +363,13 @@ function push_perf_notes() {
"
$TOP
/.gitlab/test-metrics.sh"
push
}
# Figure out which commit should be used by the testsuite driver as a
# performance baseline. See Note [The CI Story].
function
determine_metric_baseline
()
{
export
PERF_BASELINE_COMMIT
=
"
$(
git merge-base
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
HEAD
)
"
info
"Using
$PERF_BASELINE_COMMIT
for performance metric baseline..."
}
function
test_make
()
{
run
"
$MAKE
"
test_bindist
TEST_PREP
=
YES
run
"
$MAKE
"
V
=
0
test
\
...
...
This diff is collapsed.
Click to expand it.
hadrian/src/Settings/Builders/RunTest.hs
+
4
−
0
View file @
fdcf7645
...
...
@@ -78,6 +78,7 @@ runTestBuilderArgs = builder RunTest ? do
<*>
(
maybe
False
(
==
"YES"
)
<$>
lookupEnv
"OS"
)
(
testEnv
,
testMetricsFile
)
<-
expr
.
liftIO
$
(,)
<$>
lookupEnv
"TEST_ENV"
<*>
lookupEnv
"METRICS_FILE"
perfBaseline
<-
expr
.
liftIO
$
lookupEnv
"PERF_BASELINE_COMMIT"
threads
<-
shakeThreads
<$>
expr
getShakeOptions
os
<-
getTestSetting
TestHostOS
...
...
@@ -141,6 +142,9 @@ runTestBuilderArgs = builder RunTest ? do
,
arg
"--config"
,
arg
$
"timeout_prog="
++
show
(
top
-/-
timeoutProg
)
,
arg
"--config"
,
arg
$
"stats_files_dir="
++
statsFilesDir
,
arg
$
"--threads="
++
show
threads
,
case
perfBaseline
of
Just
commit
|
not
(
null
commit
)
->
arg
(
"--perf-baseline="
++
show
commit
)
_
->
mempty
,
emitWhenSet
testEnv
$
\
env
->
arg
(
"--test-env="
++
show
env
)
,
emitWhenSet
testMetricsFile
$
\
file
->
arg
(
"--metrics-file="
++
file
)
,
getTestArgs
-- User-provided arguments from command line.
...
...
This diff is collapsed.
Click to expand it.
testsuite/mk/test.mk
+
4
−
0
View file @
fdcf7645
...
...
@@ -232,6 +232,10 @@ ifneq "$(VERBOSE)" ""
RUNTEST_OPTS
+=
--verbose
=
$(
VERBOSE
)
endif
ifneq
"$(PERF_TEST_BASELINE_COMMIT)" ""
RUNTEST_OPTS
+=
--perf-baseline
=
$(
PERF_TEST_BASELINE_COMMIT
)
endif
ifeq
"$(SKIP_PERF_TESTS)" "YES"
RUNTEST_OPTS
+=
--skip-perf-tests
endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment