Verified Commit d428ae72 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

Merge branch 'dev' into dev-openalex

parents aa827322 53424dfd
Pipeline #4328 failed with stages
in 89 minutes and 22 seconds
......@@ -2,9 +2,6 @@
*lock
# Cabal
*.cabal
# Profiling
*.prof
profiling
......
......@@ -2,7 +2,7 @@
# https://vadosware.io/post/zero-to-continuous-integrated-testing-a-haskell-project-with-gitlab/
#
#
image: adinapoli/gargantext:v1
image: adinapoli/gargantext:v2
variables:
STACK_ROOT: "${CI_PROJECT_DIR}/.stack-root"
......@@ -13,13 +13,13 @@ variables:
#- apt-get install make xz-utils
stages:
- deps
- stack
- cabal
- test
- docs
- cabal
deps:
stage: deps
stack:
stage: stack
cache:
# cache per branch name
# key: ${CI_COMMIT_REF_SLUG}
......@@ -29,8 +29,7 @@ deps:
- target
script:
- echo "Building the project from '$CI_PROJECT_DIR'"
- hpack
- nix-shell --run "LC_ALL=C.UTF-8 stack build --no-terminal --haddock --no-haddock-deps --only-dependencies --fast"
- nix-shell --run "stack build --no-terminal --haddock --no-haddock-deps --only-dependencies --fast --dry-run"
docs:
stage: docs
......@@ -42,8 +41,7 @@ docs:
- .stack-work/
- target
script:
- hpack
- nix-shell --run "LC_ALL=C.UTF-8 stack build --no-terminal --haddock --no-haddock-deps --fast"
- nix-shell --run "stack build --no-terminal --haddock --no-haddock-deps --fast --dry-run"
- cp -R "$(stack path --local-install-root)"/doc ./output
artifacts:
paths:
......@@ -51,24 +49,22 @@ docs:
expire_in: 1 week
allow_failure: true
test:
stage: test
cabal:
stage: cabal
cache:
# cache per branch name
# key: ${CI_COMMIT_REF_SLUG}
paths:
- .stack-root/
- .stack-work/
- dist-newstyle/
- target
script:
- hpack
- nix-shell --run "stack test --no-terminal --fast"
# TOOO
- nix-shell --run "./bin/update-cabal-project && cabal v2-build"
allow_failure: false
cabal:
# FIXME(adinapoli) A temporary hack until we switch to cabal 3.10.1.0 properly
stage: cabal
test:
stage: test
cache:
# cache per branch name
# key: ${CI_COMMIT_REF_SLUG}
......@@ -78,7 +74,5 @@ cabal:
- dist-newstyle/
- target
script:
- hpack
- nix-shell --run "./bin/update-cabal-project && cabal v2-build --dry-run"
allow_failure: false
- nix-shell --run "cabal v2-test --test-show-details=streaming"
......@@ -47,7 +47,7 @@ cd haskell-gargantext
#### 1. Installation
This project can be built with either Stack or Cabal. For historical
reasons, we generate a `cabal.project` from the `package.yaml`, and
reasons, we generate a `cabal.project` from the `stack.yaml`, and
we do not commit the former to the repo, to have a single "source of truth".
However, it's always possible to generate a `cabal.project` thanks
to [stack2cabal](https://hackage.haskell.org/package/stack2cabal).
......
#!/usr/bin/env bash
cabal v2-update 'hackage.haskell.org,2023-06-25T00:00:00Z'
cabal v2-install hpack-0.35.0 --overwrite-policy=always
cabal v2-install stack2cabal-1.0.14 --overwrite-policy=always
stack2cabal --no-run-hpack -p '2023-06-25'
......@@ -18,84 +18,40 @@ sudo apt upgrade
# Tmux to avoid disconnections during the installation process
# Htop for visual monitoring
sudo apt install tmux htop
sudo apt install tmux htop git iptables curl
########################################################################
sudo sed -i "s/stretch/buster/g" /etc/apt/sources.list
sudo sed -i "s/bullseye/bookworm/g" /etc/apt/sources.list
sudo apt update
sudo apt dist-upgrade
# sudo reboot #recommended
########################################################################
#sudo apt update
sudo apt install liblzma-dev libpcre3-dev libblas-dev liblapack-dev pkg-config libgsl-dev libbz2-dev postgresql postgresql-server-dev-11 nginx libigraph0-dev libgfortran-9-dev
sudo apt install postgresql postgresql-server-dev-15
sudo apt install git
#git config --global user.email "contact@gargantext.org"
#git config --global user.name "Gargantua"
########################################################################
echo "Which user?"
#read USER
USER="gargantua"
sudo adduser --disabled-password --gecos "" $USER
########################################################################
#cd /home
#sudo mv -if /home/$USER /srv/
#sudo ln -s /srv/$USER
curl -sSL https://get.haskellstack.org/ | sh
sudo apt install curl
sudo su $USER
stack update
stack upgrade
#git clone https://gitlab.iscpif.fr/gargantext/haskell-gargantext.git
#cd haskell-gargantext
##########
if [[ ! -d "purescript-gargantext" ]]; then
./devops/debian/install-purescript
fi
#########################################################################
# stack install should be enough but all process is the following steps
stack setup && stack build && stack install
echo "Installing Nix"
sh <(curl -L https://nixos.org/nix/install) --daemon
#########################################################################
# build deps
if [[ ! -d "deps" ]]; then
mkdir -v deps
cd deps
sudo apt install default-jdk
if [[ ! -f "coreNLP.tar.bz2" ]]; then
wget https://dl.gargantext.org/coreNLP.tar.bz2
fi
if [[ ! -d "home" ]]; then
tar xvjf coreNLP.tar.bz2
fi
# CoreNLP needs to be started
# ./startServer.sh
cd ..
fi
#######################################################################
# Get the Sources
git clone https://gitlab.iscpif.fr/gargantext/haskell-gargantext.git
cd haskell-gargantext
git clone https://gitlab.iscpif.fr/gargantext/purescript-gargantext.git
# Specific to our servers
#### Configure timezone and locale ###################################
# todo sync dates
#echo "########### LOCALES & TZ #################"
#echo "Europe/Paris" > /etc/timezone
#dpkg-reconfigure --frontend=noninteractive tzdata
#sudo dpkg-reconfigure --frontend=noninteractive tzdata
##ENV TZ "Europe/Paris"
#
#sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \
......@@ -109,13 +65,12 @@ fi
# Database configuration
# CREATE USER gargantua WITH PASSWORD $(grep DB_PASS gargantext.ini)
# GRANT ALL PRIVILEGES ON DATABASE gargandbV4 to gargantua
# sudo su postgres
# createdb gargandb
#######################################################################
## POSTGRESQL DATA (as ROOT)
#######################################################################
./devops/debian/install-postgres
# configure the database with script in devops/postgres
# edit gargantext.ini
......@@ -4,9 +4,16 @@ 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
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
COPY ./nix/overlays/Cabal-3.10.1.0.nix /builds/gargantext/nix/overlays/Cabal-3.10.1.0.nix
COPY ./nix/overlays/cabal-install-3.10.1.0.nix /builds/gargantext/nix/overlays/cabal-install-3.10.1.0.nix
COPY ./nix/overlays/cabal-install-solver-3.10.1.0.nix /builds/gargantext/nix/overlays/cabal-install-solver-3.10.1.0.nix
COPY ./nix/overlays/Cabal-syntax-3.10.1.0.nix /builds/gargantext/nix/overlays/Cabal-syntax-3.10.1.0.nix
COPY ./nix/overlays/directory-1.3.7.0.nix /builds/gargantext/nix/overlays/directory-1.3.7.0.nix
COPY ./nix/overlays/hackage-security-0.6.2.3.nix /builds/gargantext/nix/overlays/hackage-security-0.6.2.3.nix
COPY ./nix/overlays/process-1.6.15.0.nix /builds/gargantext/nix/overlays/process-1.6.15.0.nix
ENV TZ=Europe/Rome
RUN apt-get update && \
......@@ -61,19 +68,7 @@ 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 && \
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 cd /builds/gargantext && nix-shell
RUN ghcup set 8.10.7 && cabal v2-update && cabal v2-install hpack --overwrite-policy=always
WORKDIR "/builds/gargantext/"
cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.35.1.
--
-- see: https://github.com/sol/hpack
name: gargantext
version: 0.0.6.9.9.7
synopsis: Search, map, share
......@@ -59,12 +55,13 @@ library
Gargantext.Core.Text.Context
Gargantext.Core.Text.Corpus.API
Gargantext.Core.Text.Corpus.API.Arxiv
Gargantext.Core.Text.Corpus.API.Pubmed
Gargantext.Core.Text.Corpus.API.OpenAlex
Gargantext.Core.Text.Corpus.API.Pubmed
Gargantext.Core.Text.Corpus.Query
Gargantext.Core.Text.Corpus.Parsers
Gargantext.Core.Text.Corpus.Parsers.CSV
Gargantext.Core.Text.Corpus.Parsers.Date.Parsec
Gargantext.Core.Text.Corpus.Parsers.JSON
Gargantext.Core.Text.List.Formats.CSV
Gargantext.Core.Text.Metrics
Gargantext.Core.Text.Metrics.CharByChar
......@@ -203,7 +200,6 @@ library
Gargantext.Core.Text.Corpus.Parsers.GrandDebat
Gargantext.Core.Text.Corpus.Parsers.Iramuteq
Gargantext.Core.Text.Corpus.Parsers.Isidore
Gargantext.Core.Text.Corpus.Parsers.JSON
Gargantext.Core.Text.Corpus.Parsers.Json2Csv
Gargantext.Core.Text.Corpus.Parsers.RIS
Gargantext.Core.Text.Corpus.Parsers.RIS.Presse
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment