Commit 5bd96135 authored by Alfredo Di Napoli's avatar Alfredo Di Napoli

Cache nix-shell

parent 17a8c04a
Pipeline #4013 failed with stages
in 9 minutes and 31 seconds
......@@ -31,7 +31,7 @@ deps:
- target
script:
- echo "Building the project from '$CI_PROJECT_DIR'"
- nix-shell && stack -v build --no-terminal --haddock --no-haddock-deps --only-dependencies --fast
- nix-shell && export LC_ALL=C.UTF-8 && stack -v build --no-terminal --haddock --no-haddock-deps --only-dependencies --fast
docs:
stage: docs
......@@ -45,7 +45,7 @@ docs:
- .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:
......@@ -64,7 +64,7 @@ test:
- .stack-work/
- target
script:
- stack --nix test --no-terminal --fast
- nix-shell && export LC_ALL=C.UTF-8 && stack test --no-terminal --fast
# TOOO
......@@ -82,5 +82,5 @@ cabal:
- .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
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 \
......@@ -56,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}
......@@ -71,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 "/builds/gargantext/"
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