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

Cache nix-shell

parent 17a8c04a
...@@ -31,7 +31,7 @@ deps: ...@@ -31,7 +31,7 @@ deps:
- target - target
script: script:
- echo "Building the project from '$CI_PROJECT_DIR'" - 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: docs:
stage: docs stage: docs
...@@ -45,7 +45,7 @@ docs: ...@@ -45,7 +45,7 @@ docs:
- .stack-work/ - .stack-work/
- target - target
script: 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 - cp -R "$(stack path --local-install-root)"/doc ./output
artifacts: artifacts:
paths: paths:
...@@ -64,7 +64,7 @@ test: ...@@ -64,7 +64,7 @@ test:
- .stack-work/ - .stack-work/
- target - target
script: script:
- stack --nix test --no-terminal --fast - nix-shell && export LC_ALL=C.UTF-8 && stack test --no-terminal --fast
# TOOO # TOOO
...@@ -82,5 +82,5 @@ cabal: ...@@ -82,5 +82,5 @@ cabal:
- .cabal/ - .cabal/
- target - target
script: 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 FROM ubuntu:jammy
ARG DEBIAN_FRONTEND=noninteractive 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 ENV TZ=Europe/Rome
RUN apt-get update && \ RUN apt-get update && \
apt-get install --no-install-recommends -y \ apt-get install --no-install-recommends -y \
...@@ -56,14 +63,7 @@ RUN . $HOME/.bashrc && nix-env --version ...@@ -56,14 +63,7 @@ RUN . $HOME/.bashrc && nix-env --version
RUN \ RUN \
curl https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > /usr/bin/ghcup && \ curl https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > /usr/bin/ghcup && \
chmod +x /usr/bin/ghcup && \ chmod +x /usr/bin/ghcup && \
ghcup config set gpg-setting GPGLax 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 ghc --force ${GHC} && \
ghcup -v install cabal --force ${CABAL} && \ ghcup -v install cabal --force ${CABAL} && \
ghcup -v install stack --force ${STACK} ghcup -v install stack --force ${STACK}
...@@ -71,8 +71,8 @@ RUN \ ...@@ -71,8 +71,8 @@ RUN \
ENV PATH=/root/.ghcup/bin:$PATH ENV PATH=/root/.ghcup/bin:$PATH
ENV PATH=/root/.local/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/" 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