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
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Grégoire Locqueville
haskell-gargantext
Commits
c2e18be2
Commit
c2e18be2
authored
May 16, 2023
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/adinapoli/issue-188' into dev
parents
7ab982ea
5bd96135
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
24 deletions
+38
-24
.gitlab-ci.yml
.gitlab-ci.yml
+17
-5
Dockerfile
devops/docker/Dockerfile
+21
-19
No files found.
.gitlab-ci.yml
View file @
c2e18be2
...
...
@@ -14,32 +14,38 @@ variables:
stages
:
-
deps
-
docs
-
cabal
-
test
-
docs
deps
:
stage
:
deps
cache
:
# cache per branch name
# key: ${CI_COMMIT_REF_SLUG}
paths
:
-
/nix
-
.stack
-
.stack-root/
-
.stack-work/
-
target
script
:
-
stack --nix build --no-terminal --haddock --no-haddock-deps --only-dependencies --fast
-
echo "Building the project from '$CI_PROJECT_DIR'"
-
nix-shell && export LC_ALL=C.UTF-8 && stack -v build --no-terminal --haddock --no-haddock-deps --only-dependencies --fast
docs
:
stage
:
docs
cache
:
# cache per branch name
# key: ${CI_COMMIT_REF_SLUG}
paths
:
-
/nix
-
.stack
-
.stack-root/
-
.stack-work/
-
target
script
:
-
stack --nix
build --no-terminal --haddock --no-haddock-deps --fast
-
nix-shell && export LC_ALL=C.UTF-8 && stack
build --no-terminal --haddock --no-haddock-deps --fast
-
cp -R "$(stack path --local-install-root)"/doc ./output
artifacts
:
paths
:
...
...
@@ -47,28 +53,34 @@ docs:
expire_in
:
1 week
test
:
stage
:
test
cache
:
# cache per branch name
# key: ${CI_COMMIT_REF_SLUG}
paths
:
-
/nix
-
.stack
-
.stack-root/
-
.stack-work/
-
target
script
:
-
stack --nix
test --no-terminal --fast
-
nix-shell && export LC_ALL=C.UTF-8 && stack
test --no-terminal --fast
# TOOO
cabal
:
stage
:
cabal
cache
:
# cache per branch name
# key: ${CI_COMMIT_REF_SLUG}
paths
:
-
/nix
-
.stack
-
.stack-root/
-
.stack-work/
-
.local/
-
.cabal/
-
target
script
:
-
nix-shell && hpack && cabal v2-build --dry-run
-
nix-shell &&
export LC_ALL=C.UTF-8 &&
hpack && cabal v2-build --dry-run
devops/docker/Dockerfile
View file @
c2e18be2
FROM
ubuntu:
focal
FROM
ubuntu:
jammy
ARG
DEBIAN_FRONTEND=noninteractive
ARG
GHC=8.10.7
ARG
STACK=2.7.3
ARG
CABAL=3.10.1.0
COPY
./shell.nix /builds/gargantext/shell.nix
COPY
./nix/pkgs.nix /builds/gargantext/nix/pkgs.nix
COPY
./nix/pinned-22.05.nix /builds/gargantext/nix/pinned-22.05.nix
ENV
TZ=Europe/Rome
RUN
apt-get update
&&
\
apt-get
install
--no-install-recommends
-y
\
...
...
@@ -26,24 +33,26 @@ RUN apt-get update && \
software-properties-common
\
sudo
\
wget
\
vim
\
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
RUN
gpg
--batch
--keyserver
keys.openpgp.org
--recv-keys
7D1E8AFD1D4A16D71FADA2F2CCC85C0E40C06A8C
&&
\
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'
RUN
set
-o
pipefail
&&
\
bash <
(
curl
-L
https://releases.nixos.org/nix/nix-2.15.0/install
)
--no-daemon
&&
\
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/
"
&&
\
mkdir
-p
"/builds/gargantext/"
&&
chmod
777
-R
"/builds/gargantext
"
&&
\
echo
"source
$HOME
/.nix-profile/etc/profile.d/nix.sh"
>>
"
$HOME
/.bashrc"
&&
\
echo
`
which nix-env
`
...
...
@@ -54,14 +63,7 @@ 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 config
set
gpg-setting GPGLax
&&
\
ghcup
-v
install
ghc
--force
${
GHC
}
&&
\
ghcup
-v
install
cabal
--force
${
CABAL
}
&&
\
ghcup
-v
install
stack
--force
${
STACK
}
...
...
@@ -69,8 +71,8 @@ RUN \
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
RUN
cd
/builds/gargantext
&&
nix-shell
RUN
ghcup
set
8.10.7
&&
cabal v2-update
&&
cabal v2-install hpack
--overwrite-policy
=
always
WORKDIR
"
$HOME
/gargantext/"
WORKDIR
"
/builds
/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