Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
ghcup-hs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
Haskell
ghcup-hs
Commits
327b80cf
Verified
Commit
327b80cf
authored
3 years ago
by
Julian Ospald
Browse files
Options
Downloads
Patches
Plain Diff
Add cross compilation to CI test
parent
005c9fbb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!120
Fix cross installation
Pipeline
#38138
passed
3 years ago
Stage: hlint
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+23
-0
23 additions, 0 deletions
.gitlab-ci.yml
.gitlab/before_script/linux/install_deps.sh
+10
-3
10 additions, 3 deletions
.gitlab/before_script/linux/install_deps.sh
.gitlab/script/ghcup_cross.sh
+52
-0
52 additions, 0 deletions
.gitlab/script/ghcup_cross.sh
with
85 additions
and
3 deletions
.gitlab-ci.yml
+
23
−
0
View file @
327b80cf
...
...
@@ -21,6 +21,7 @@ variables:
OS
:
"
LINUX"
ARCH
:
"
64"
CABAL_DIR
:
"
$CI_PROJECT_DIR/cabal"
CROSS
:
"
"
.alpine:64bit
:
image
:
"
alpine:3.12"
...
...
@@ -268,6 +269,24 @@ test:linux:latest:
CABAL_VERSION
:
"
3.4.0.0"
needs
:
[]
test:linux:cross-armv7
:
stage
:
test
extends
:
-
.test_ghcup_version
-
.debian
variables
:
GHC_VERSION
:
"
8.10.4"
GHC_TARGET_VERSION
:
"
8.10.5"
CABAL_VERSION
:
"
3.4.0.0"
CROSS
:
"
arm-linux-gnueabihf"
needs
:
[]
when
:
manual
before_script
:
-
./.gitlab/before_script/linux/install_deps.sh
script
:
-
./.gitlab/script/ghcup_cross.sh
######## linux 32bit test ########
test:linux:recommended:32bit
:
...
...
@@ -286,6 +305,7 @@ test:linux:recommended:armv7:
variables
:
GHC_VERSION
:
"
8.10.4"
CABAL_VERSION
:
"
3.4.0.0"
CROSS
:
"
"
when
:
manual
needs
:
[]
...
...
@@ -295,6 +315,7 @@ test:linux:recommended:aarch64:
variables
:
GHC_VERSION
:
"
8.10.4"
CABAL_VERSION
:
"
3.4.0.0"
CROSS
:
"
"
when
:
manual
needs
:
[]
...
...
@@ -394,6 +415,7 @@ release:linux:armv7:
ARTIFACT
:
"
armv7-linux-ghcup"
GHC_VERSION
:
"
8.10.4"
CABAL_VERSION
:
"
3.4.0.0"
CROSS
:
"
"
release:linux:aarch64
:
stage
:
release
...
...
@@ -407,6 +429,7 @@ release:linux:aarch64:
ARTIFACT
:
"
aarch64-linux-ghcup"
GHC_VERSION
:
"
8.10.4"
CABAL_VERSION
:
"
3.4.0.0"
CROSS
:
"
"
######## darwin release ########
...
...
This diff is collapsed.
Click to expand it.
.gitlab/before_script/linux/install_deps.sh
+
10
−
3
View file @
327b80cf
...
...
@@ -9,6 +9,13 @@ mkdir -p "${TMPDIR}"
sudo
apt-get update
-y
sudo
apt-get
install
-y
libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https
if
[
"
${
CROSS
}
"
=
"arm-linux-gnueabihf"
]
;
then
sudo
apt-get
install
-y
autoconf build-essential gcc-arm-linux-gnueabihf
sudo
dpkg
--add-architecture
armhf
sudo
apt-get update
-y
sudo
apt-get
install
-y
libncurses-dev:armhf
fi
case
"
${
ARCH
}
"
in
ARM
*
)
case
"
${
ARCH
}
"
in
...
...
@@ -57,9 +64,9 @@ case "${ARCH}" in
chmod
+x ghcup-bin
./ghcup-bin upgrade
-i
-f
./ghcup-bin
install
${
GHC_VERSION
}
./ghcup-bin
set
${
GHC_VERSION
}
./ghcup-bin install
-
cabal
${
CABAL_VERSION
}
./ghcup-bin
install
ghc
${
GHC_VERSION
}
./ghcup-bin
set
ghc
${
GHC_VERSION
}
./ghcup-bin
install
cabal
${
CABAL_VERSION
}
;;
esac
...
...
This diff is collapsed.
Click to expand it.
.gitlab/script/ghcup_cross.sh
0 → 100755
+
52
−
0
View file @
327b80cf
#!/bin/sh
set
-eux
.
"
$(
cd
"
$(
dirname
"
$0
"
)
"
;
pwd
-P
)
/../ghcup_env"
mkdir
-p
"
$CI_PROJECT_DIR
"
/.local/bin
CI_PROJECT_DIR
=
$(
pwd
)
ecabal
()
{
cabal
"
$@
"
}
eghcup
()
{
ghcup
-v
-c
-s
file://
$CI_PROJECT_DIR
/ghcup-
${
JSON_VERSION
}
.yaml
"
$@
"
}
git describe
--always
### build
ecabal update
ecabal build
-w
ghc-
${
GHC_VERSION
}
cp
"
$(
ecabal new-exec
-w
ghc-
${
GHC_VERSION
}
--verbose
=
0
--offline
sh
--
-c
'command -v ghcup'
)
"
"
$CI_PROJECT_DIR
"
/.local/bin/ghcup
### cleanup
rm
-rf
"
${
GHCUP_INSTALL_BASE_PREFIX
}
"
/.ghcup
### manual cli based testing
eghcup
--numeric-version
eghcup
install
ghc
${
GHC_VERSION
}
eghcup
set
ghc
${
GHC_VERSION
}
eghcup
install
cabal
${
CABAL_VERSION
}
cabal
--version
eghcup debug-info
eghcup compile ghc
-j
$(
nproc
)
-v
${
GHC_TARGET_VERSION
}
-b
${
GHC_VERSION
}
-x
${
CROSS
}
--
--enable-unregisterised
eghcup
set
ghc
${
CROSS
}
-
${
GHC_TARGET_VERSION
}
[
`
$(
eghcup whereis ghc
${
CROSS
}
-
${
GHC_TARGET_VERSION
}
)
--numeric-version
`
=
"
${
GHC_TARGET_VERSION
}
"
]
# nuke
eghcup nuke
[
!
-e
"
${
GHCUP_INSTALL_BASE_PREFIX
}
/.ghcup"
]
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