Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
160
Issues
160
List
Board
Labels
Milestones
Merge Requests
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
80e4a368
Commit
80e4a368
authored
May 15, 2023
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/adinapoli/issue-188' into dev
parents
98bbb7b4
82baf54d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
9 deletions
+89
-9
.gitlab-ci.yml
.gitlab-ci.yml
+16
-5
Dockerfile
devops/docker/Dockerfile
+73
-4
No files found.
.gitlab-ci.yml
View file @
80e4a368
...
...
@@ -2,8 +2,7 @@
# https://vadosware.io/post/zero-to-continuous-integrated-testing-a-haskell-project-with-gitlab/
#
#
image
:
cgenie/stack-build:lts-18.18-garg
#image: cgenie/nixos-stack:latest
image
:
adinapoli/gargantext:v1
variables
:
STACK_ROOT
:
"
${CI_PROJECT_DIR}/.stack-root"
...
...
@@ -28,7 +27,7 @@ deps:
-
.stack-work/
-
target
script
:
-
stack build --no-terminal --haddock --no-haddock-deps --only-dependencies --fast
-
stack
--nix
build --no-terminal --haddock --no-haddock-deps --only-dependencies --fast
docs
:
cache
:
...
...
@@ -40,7 +39,7 @@ docs:
-
.stack-work/
-
target
script
:
-
stack build --no-terminal --haddock --no-haddock-deps --fast
-
stack
--nix
build --no-terminal --haddock --no-haddock-deps --fast
-
cp -R "$(stack path --local-install-root)"/doc ./output
artifacts
:
paths
:
...
...
@@ -57,7 +56,19 @@ test:
-
.stack-work/
-
target
script
:
-
stack test --no-terminal --fast
-
stack
--nix
test --no-terminal --fast
# TOOO
cabal
:
cache
:
# cache per branch name
# key: ${CI_COMMIT_REF_SLUG}
paths
:
-
.stack
-
.stack-root/
-
.stack-work/
-
target
script
:
-
nix-shell && hpack && cabal v2-build --dry-run
devops/docker/Dockerfile
View file @
80e4a368
FROM
fpco/stack-build:lts-18.18
FROM
ubuntu:focal
#RUN apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys 8B1DA6120C2BF624
ARG
DEBIAN_FRONTEND=noninteractive
ENV
TZ=Europe/Rome
RUN
apt-get update
&&
\
apt-get
install
-y
ca-certificates git libigraph0-dev
&&
\
rm
-rf
/var/lib/apt/lists/
*
apt-get
install
--no-install-recommends
-y
\
apt-transport-https
\
autoconf
\
automake
\
build-essential
\
ca-certificates
\
curl
\
gcc
\
git
\
gnupg2
\
libffi-dev
\
libffi7
\
libgmp-dev
\
libgmp10
\
libncurses-dev
\
libncurses5
\
libnuma-dev
\
libtinfo5
\
locales
\
lsb-release
\
software-properties-common
\
sudo
\
wget
\
xz-utils
\
zlib1g-dev
&&
\
apt-get clean
&&
rm
-rf
/var/lib/apt/lists/
*
&&
\
mkdir
-m
0755 /nix
&&
groupadd
-r
nixbld
&&
chown
root /nix
&&
\
for
n
in
$(
seq
1 10
)
;
do
useradd
-c
"Nix build user
$n
"
-d
/var/empty
-g
nixbld
-G
nixbld
-M
-N
-r
-s
"
$(
command
-v
nologin
)
"
"nixbld
$n
"
;
done
RUN
gpg
--batch
--keyserver
keys.openpgp.org
--recv-keys
7D1E8AFD1D4A16D71FADA2F2CCC85C0E40C06A8C
RUN
gpg
--batch
--keyserver
keyserver.ubuntu.com
--recv-keys
FE5AB6C91FEA597C3B31180B73EDE9E8CFBAEF01
SHELL
["/bin/bash", "-o", "pipefail", "-c"]
RUN
set
-o
pipefail
&&
curl
-L
https://releases.nixos.org/nix/nix-2.11.0/install | bash
# Fixes locale-related issues: https://gitlab.haskell.org/ghc/ghc/-/issues/8118
RUN
locale-gen en_US.UTF-8
ENV
LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
ENV
USER=root
ENV
SHELL /bin/bash
RUN
.
"
$HOME
/.nix-profile/etc/profile.d/nix.sh"
&&
\
mkdir
"
$HOME
/gargantext/"
&&
\
echo
"source
$HOME
/.nix-profile/etc/profile.d/nix.sh"
>>
"
$HOME
/.bashrc"
&&
\
echo
`
which nix-env
`
ENV
PATH=/root/.nix-profile/bin:$PATH
RUN
.
$HOME
/.bashrc
&&
nix-env
--version
RUN
\
curl https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup
>
/usr/bin/ghcup
&&
\
chmod
+x /usr/bin/ghcup
&&
\
ghcup config
set
gpg-setting GPGLax
ARG
GHC=8.10.7
ARG
STACK=2.7.3
ARG
CABAL=3.10.1.0
# install GHC, stack and cabal
RUN
\
ghcup
-v
install
ghc
--force
${
GHC
}
&&
\
ghcup
-v
install
cabal
--force
${
CABAL
}
&&
\
ghcup
-v
install
stack
--force
${
STACK
}
ENV
PATH=/root/.ghcup/bin:$PATH
ENV
PATH=/root/.local/bin:$PATH
RUN
ghcup
set
8.10.7
&&
ghc
--version
RUN
cabal v2-update
&&
cabal v2-install hpack
--overwrite-policy
=
always
WORKDIR
"$HOME/gargantext/"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment