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
Dave Barton
GHC
Commits
cbfc0e93
Commit
cbfc0e93
authored
3 years ago
by
Ben Gamari
Committed by
Marge Bot
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ci: Isolate build from HOME
parent
ca88d91c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+3
-0
3 additions, 0 deletions
.gitlab-ci.yml
.gitlab/ci.sh
+22
-15
22 additions, 15 deletions
.gitlab/ci.sh
with
25 additions
and
15 deletions
.gitlab-ci.yml
+
3
−
0
View file @
cbfc0e93
...
...
@@ -21,6 +21,9 @@ variables:
HACKAGE_INDEX_STATE
:
"
2020-12-21T14:48:20Z"
# Makes ci.sh isolate CABAL_DIR
HERMETIC
:
"
YES"
# Reduce XZ compression level for regular jobs (it is bumped to 9 for releases
# and nightly jobs). In my experiments I've got the following bindist size in
# the given time for each compression level (with the quick flavour):
...
...
This diff is collapsed.
Click to expand it.
.gitlab/ci.sh
+
22
−
15
View file @
cbfc0e93
...
...
@@ -65,6 +65,7 @@ Environment variables affecting both build systems:
IGNORE_PERF_FAILURES
Whether to ignore perf failures (one of "increases",
"decreases", or "all")
HERMETIC Take measures to avoid looking at anything in
\$
HOME
Environment variables determining build configuration of Make system:
...
...
@@ -160,7 +161,7 @@ toolchain="$TOP/toolchain"
mkdir
-p
"
$toolchain
/bin"
PATH
=
"
$toolchain
/bin:
$PATH
"
export
METRICS_FILE
=
"
$
CI_PROJECT_DIR
/performance-metrics.tsv"
export
METRICS_FILE
=
"
$
TOP
/performance-metrics.tsv"
cores
=
"
$(
mk/detect-cpu-count.sh
)
"
...
...
@@ -213,10 +214,10 @@ function set_toolchain_paths() {
# Extract GHC toolchain
function
setup
()
{
if
[
-d
"
$
{
CABAL_CACHE
}
"
]
;
then
info
"Extracting cabal cache from
$
{
CABAL_CACHE
}
to
$
cabal_dir
..."
mkdir
-p
"
$
cabal_dir
"
cp
-Rf
"
$
{
CABAL_CACHE
}
"
/
*
"
$
cabal_dir
"
if
[
-d
"
$CABAL_CACHE
"
]
;
then
info
"Extracting cabal cache from
$CABAL_CACHE
to
$
CABAL_DIR
..."
mkdir
-p
"
$
CABAL_DIR
"
cp
-Rf
"
$CABAL_CACHE
"
/
*
"
$
CABAL_DIR
"
fi
if
[[
"
$needs_toolchain
"
=
"1"
]]
;
then
...
...
@@ -510,8 +511,8 @@ function run_perf_test() {
}
function
save_cache
()
{
info
"Storing cabal cache from
$
cabal_dir
to
$
{
CABAL_CACHE
}
..."
cp
-Rf
"
$
cabal_dir
"
"
$
{
CABAL_CACHE
}
"
info
"Storing cabal cache from
$
CABAL_DIR
to
$CABAL_CACHE
..."
cp
-Rf
"
$
CABAL_DIR
"
"
$CABAL_CACHE
"
}
function
clean
()
{
...
...
@@ -547,17 +548,23 @@ function shell() {
setup_locale
# Determine Cabal data directory
# Platform-specific environment initialization
if
[
-n
"
${
HERMETIC
:-}
"
]
;
then
export
CABAL_DIR
=
"
$TOP
/cabal"
export
HOME
=
"/nonexistent"
else
BIN_DIST_NAME
=
"
${
BIN_DIST_NAME
:-}
"
case
"
$(
uname
)
"
in
MSYS_
*
|
MINGW
*
)
CABAL_DIR
=
"
$APPDATA
/cabal"
;;
*
)
CABAL_DIR
=
"
$HOME
/.cabal"
;;
esac
fi
case
"
$(
uname
)
"
in
MSYS_
*
|
MINGW
*
)
exe
=
".exe"
;
cabal_dir
=
"
$APPDATA
/cabal"
;;
*
)
cabal_dir
=
"
$HOME
/.cabal"
;
exe
=
""
;;
MSYS_
*
|
MINGW
*
)
exe
=
".exe"
;;
*
)
exe
=
""
;;
esac
echo
"Cabal_dir is
$cabal_dir
"
echo
"
$(
uname
-m
)
"
echo
"
${
CABAL_CACHE
}
"
# Platform-specific environment initialization
MAKE
=
"make"
TAR
=
"tar"
case
"
$(
uname
)
"
in
...
...
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