Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Stack
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
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Julian Ospald
Stack
Commits
5678b550
Unverified
Commit
5678b550
authored
4 years ago
by
Julian Ospald
Browse files
Options
Downloads
Patches
Plain Diff
f
parent
0f06f147
No related branches found
No related tags found
No related merge requests found
Pipeline
#38975
failed
4 years ago
Stage: hlint
Stage: test
Stage: release
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+1
-1
1 addition, 1 deletion
.gitlab-ci.yml
.gitlab/script/stack_release.sh
+1
-36
1 addition, 36 deletions
.gitlab/script/stack_release.sh
.gitlab/script/stack_unit_test.sh
+28
-8
28 additions, 8 deletions
.gitlab/script/stack_unit_test.sh
with
30 additions
and
45 deletions
.gitlab-ci.yml
+
1
−
1
View file @
5678b550
...
...
@@ -209,7 +209,7 @@ variables:
artifacts
:
expire_in
:
2 week
paths
:
-
_release/stack-*
-
$CI_PROJECT_DIR/.local/bin/
only
:
-
tags
...
...
This diff is collapsed.
Click to expand it.
.gitlab/script/stack_release.sh
+
1
−
36
View file @
5678b550
...
...
@@ -6,40 +6,5 @@ set -eux
mkdir
-p
"
$CI_PROJECT_DIR
"
/.local/bin
ecabal
()
{
cabal
"
$@
"
}
git config
--global
core.fscache
false
git describe
if
[
"
${
OS
}
"
=
"LINUX"
]
then
# Retry installing nix due to nondeterministic error
# Fatal error: glibc detected an invalid stdio handle
# See:
# https://github.com/nh2/static-haskell-nix/pull/27#issuecomment-502652181
# https://github.com/NixOS/nix/issues/2733
#
mkdir
-m
0755 /nix
&&
chown
root /nix
(
for
i
in
{
1..5
}
;
do
sh <
(
curl
-sSL
https://nixos.org/nix/install
)
&&
exit
0
;
done
;
exit
1
)
.
~/.nix-profile/etc/profile.d/nix.sh
nix-channel
--add
https://nixos.org/channels/nixos-19.09 nixpkgs
nix-channel
--update
elif
[
"
${
OS
}
"
==
"WINDOWS"
]
then
# choco install nsis-unicode -y
echo
"nothing"
fi
# Do this in the same step as installing deps to get relevant env var modifications
if
[
"
${
OS
}
"
=
"LINUX"
]
then
stack etc/scripts/release.hs check
--allow-dirty
--alpine
stack etc/scripts/release.hs build
--allow-dirty
--alpine
else
stack etc/scripts/release.hs check
--allow-dirty
stack etc/scripts/release.hs build
--allow-dirty
fi
stack build
--flag
stack:integration-tests stack
--exec
stack-integration-test
This diff is collapsed.
Click to expand it.
.gitlab/script/stack_unit_test.sh
+
28
−
8
View file @
5678b550
...
...
@@ -20,6 +20,12 @@ fi
git describe
--always
if
[
"
${
OS
}
"
=
"WINDOWS"
]
;
then
ext
=
".exe"
else
ext
=
''
fi
### build
ecabal update
...
...
@@ -27,17 +33,31 @@ ecabal update
echo
''
>>
stack.yaml
echo
'allow-different-user: true'
>>
stack.yaml
ecabal build
-w
ghc-
${
GHC_VERSION
}
ecabal
test
-w
ghc-
${
GHC_VERSION
}
ecabal haddock
-w
ghc-
${
GHC_VERSION
}
if
[
"
${
OS
}
"
=
"WINDOWS"
]
;
then
ext
=
".exe"
if
[
"
${
OS
}
"
=
"LINUX"
]
;
then
if
[
"
${
ARCH
}
"
=
"32"
]
;
then
ecabal build
-w
ghc-
${
GHC_VERSION
}
--ghc-options
=
'-split-sections -optl-static'
cp
"
$(
ecabal new-exec
-w
ghc-
${
GHC_VERSION
}
--ghc-options
=
'-split-sections -optl-static'
--verbose
=
0
--offline
sh
--
-c
'command -v stack'
)
"
"
$CI_PROJECT_DIR
"
/.local/bin/stack
${
ext
}
elif
[
"
${
ARCH
}
"
=
"64"
]
;
then
ecabal build
-w
ghc-
${
GHC_VERSION
}
--ghc-options
=
'-split-sections -optl-static'
cp
"
$(
ecabal new-exec
-w
ghc-
${
GHC_VERSION
}
--ghc-options
=
'-split-sections -optl-static'
--verbose
=
0
--offline
sh
--
-c
'command -v stack'
)
"
"
$CI_PROJECT_DIR
"
/.local/bin/stack
${
ext
}
else
ecabal build
-w
ghc-
${
GHC_VERSION
}
cp
"
$(
ecabal new-exec
-w
ghc-
${
GHC_VERSION
}
--verbose
=
0
--offline
sh
--
-c
'command -v stack'
)
"
"
$CI_PROJECT_DIR
"
/.local/bin/stack
${
ext
}
fi
elif
[
"
${
OS
}
"
=
"FREEBSD"
]
;
then
ecabal build
-w
ghc-
${
GHC_VERSION
}
--ghc-options
=
'-split-sections'
cp
"
$(
ecabal new-exec
-w
ghc-
${
GHC_VERSION
}
--ghc-options
=
'-split-sections'
--verbose
=
0
--offline
sh
--
-c
'command -v stack'
)
"
"
$CI_PROJECT_DIR
"
/.local/bin/stack
${
ext
}
elif
[
"
${
OS
}
"
=
"WINDOWS"
]
;
then
ecabal build
-w
ghc-
${
GHC_VERSION
}
cp
"
$(
ecabal new-exec
-w
ghc-
${
GHC_VERSION
}
--verbose
=
0
--offline
sh
--
-c
'command -v stack'
)
"
"
$CI_PROJECT_DIR
"
/.local/bin/stack
${
ext
}
else
ext
=
''
ecabal build
-w
ghc-
${
GHC_VERSION
}
cp
"
$(
ecabal new-exec
-w
ghc-
${
GHC_VERSION
}
--verbose
=
0
--offline
sh
--
-c
'command -v stack'
)
"
"
$CI_PROJECT_DIR
"
/.local/bin/stack
${
ext
}
fi
cp
"
$(
ecabal new-exec
-w
ghc-
${
GHC_VERSION
}
--verbose
=
0
--offline
sh
--
-c
'command -v stack'
)
"
"
$CI_PROJECT_DIR
"
/.local/bin/stack
${
ext
}
ecabal
test
-w
ghc-
${
GHC_VERSION
}
ecabal haddock
-w
ghc-
${
GHC_VERSION
}
### cleanup
...
...
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